* io.c (prep_io): local variable renamed.
(rb_io_fdopen): ditto. (prep_stdio): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18740 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
65337c5b2d
commit
e6c300e08a
@ -1,3 +1,9 @@
|
|||||||
|
Thu Aug 21 02:27:03 2008 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
|
* io.c (prep_io): local variable renamed.
|
||||||
|
(rb_io_fdopen): ditto.
|
||||||
|
(prep_stdio): ditto.
|
||||||
|
|
||||||
Thu Aug 21 01:58:59 2008 Shugo Maeda <shugo@ruby-lang.org>
|
Thu Aug 21 01:58:59 2008 Shugo Maeda <shugo@ruby-lang.org>
|
||||||
|
|
||||||
* configure.in: always check timezone().
|
* configure.in: always check timezone().
|
||||||
|
14
io.c
14
io.c
@ -5376,7 +5376,7 @@ stdout_setter(VALUE val, ID id, VALUE *variable)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static VALUE
|
static VALUE
|
||||||
prep_io(int fd, int mode, VALUE klass, const char *path)
|
prep_io(int fd, int flags, VALUE klass, const char *path)
|
||||||
{
|
{
|
||||||
rb_io_t *fp;
|
rb_io_t *fp;
|
||||||
VALUE io = io_alloc(klass);
|
VALUE io = io_alloc(klass);
|
||||||
@ -5385,11 +5385,11 @@ prep_io(int fd, int mode, VALUE klass, const char *path)
|
|||||||
fp->fd = fd;
|
fp->fd = fd;
|
||||||
#ifdef __CYGWIN__
|
#ifdef __CYGWIN__
|
||||||
if (!isatty(fd)) {
|
if (!isatty(fd)) {
|
||||||
mode |= FMODE_BINMODE;
|
flags |= FMODE_BINMODE;
|
||||||
setmode(fd, O_BINARY);
|
setmode(fd, O_BINARY);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
fp->mode = mode;
|
fp->mode = flags;
|
||||||
io_check_tty(fp);
|
io_check_tty(fp);
|
||||||
if (path) fp->path = strdup(path);
|
if (path) fp->path = strdup(path);
|
||||||
|
|
||||||
@ -5397,19 +5397,19 @@ prep_io(int fd, int mode, VALUE klass, const char *path)
|
|||||||
}
|
}
|
||||||
|
|
||||||
VALUE
|
VALUE
|
||||||
rb_io_fdopen(int fd, int mode, const char *path)
|
rb_io_fdopen(int fd, int modenum, const char *path)
|
||||||
{
|
{
|
||||||
VALUE klass = rb_cIO;
|
VALUE klass = rb_cIO;
|
||||||
|
|
||||||
if (path && strcmp(path, "-")) klass = rb_cFile;
|
if (path && strcmp(path, "-")) klass = rb_cFile;
|
||||||
return prep_io(fd, rb_io_modenum_flags(mode), klass, path);
|
return prep_io(fd, rb_io_modenum_flags(modenum), klass, path);
|
||||||
}
|
}
|
||||||
|
|
||||||
static VALUE
|
static VALUE
|
||||||
prep_stdio(FILE *f, int mode, VALUE klass, const char *path)
|
prep_stdio(FILE *f, int flags, VALUE klass, const char *path)
|
||||||
{
|
{
|
||||||
rb_io_t *fptr;
|
rb_io_t *fptr;
|
||||||
VALUE io = prep_io(fileno(f), mode|FMODE_PREP, klass, path);
|
VALUE io = prep_io(fileno(f), flags|FMODE_PREP, klass, path);
|
||||||
|
|
||||||
GetOpenFile(io, fptr);
|
GetOpenFile(io, fptr);
|
||||||
fptr->stdio_file = f;
|
fptr->stdio_file = f;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user