diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-04-17 08:26:13 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-04-17 08:26:13 +0000 |
commit | 1c293eea0871979f65717597f7209360c0e0be7b (patch) | |
tree | 977a5c5463610a629a89acac073f1d2d5495c2cd /io.c | |
parent | d4527f8b86c441603cba416bf1df43403cbbbe3c (diff) |
* eval.c (safe_getter): should use INT2NUM().
* bignum.c (rb_big2long): 2**31 cannot fit in 31 bit long.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1323 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -1367,7 +1367,8 @@ rb_fopen(fname, mode) } } #ifdef USE_SETVBUF - setvbuf(file, NULL, _IOFBF, 0); + if (setvbuf(file, NULL, _IOFBF, 0) != 0) + rb_warn("setvbuf() can't be honered for %s", fname); #endif #ifdef __human68k__ fmode(file, _IOTEXT); @@ -1393,7 +1394,8 @@ rb_fdopen(fd, mode) } } #ifdef USE_SETVBUF - setvbuf(file, NULL, _IOFBF, 0); + if (setvbuf(file, NULL, _IOFBF, 0) != 0) + rb_warn("setvbuf() can't be honered (fd=%d)", fd); #endif return file; @@ -1920,6 +1922,10 @@ rb_io_reopen(argc, argv, file) if (freopen(RSTRING(fname)->ptr, mode, fptr->f) == 0) { rb_sys_fail(fptr->path); } +#ifdef USE_SETVBUF + if (setvbuf(fptr->f, NULL, _IOFBF, 0) != 0) + rb_warn("setvbuf() can't be honered for %s", RSTRING(fname)->ptr); +#endif if (fptr->f2) { if (freopen(RSTRING(fname)->ptr, "w", fptr->f2) == 0) { |