diff options
author | eban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-05-27 06:34:11 +0000 |
---|---|---|
committer | eban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-05-27 06:34:11 +0000 |
commit | 9f847daa158fa62bcc9bca8dd4a95bd62d9dbfaa (patch) | |
tree | aa510ca635dc5924748916d0de332ebb323528ce /io.c | |
parent | 40289c4de07392216cf8345ea2255c4a96598df7 (diff) |
* io.c (rb_io_fwrite): workaround for bcc32's fwrite bug.
add errno checking. [ruby-dev:23627]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6417 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -394,7 +394,11 @@ rb_io_fwrite(ptr, len, f) } while (--n > 0); #else while (errno = 0, ptr += (r = fwrite(ptr, 1, n, f)), (n -= r) > 0) { - if (ferror(f)) { + if (ferror(f) +#if defined __BORLANDC__ + || errno == EBADF || errno == ENOENT +#endif + ) { #ifdef __hpux if (!errno) errno = EAGAIN; #endif |