1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* io.c (rb_io_fwrite): check all case errno != 0 [ruby-dev:23648]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6422 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ocean 2004-05-27 11:22:30 +00:00
parent 979de48915
commit 94e5d6ba19
2 changed files with 6 additions and 2 deletions

View file

@ -1,3 +1,7 @@
Thu May 27 20:02:09 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp>
* io.c (rb_io_fwrite): check all case errno != 0 [ruby-dev:23648]
Thu May 27 15:54:02 2004 Shugo Maeda <shugo@ruby-lang.org> Thu May 27 15:54:02 2004 Shugo Maeda <shugo@ruby-lang.org>
* lib/net/ftp.rb (MDTM_REGEXP): fix for demon's ftp server. * lib/net/ftp.rb (MDTM_REGEXP): fix for demon's ftp server.
@ -8,7 +12,7 @@ Thu May 27 14:53:13 2004 WATANABE Hirofumi <eban@ruby-lang.org>
* io.c (rb_io_fwrite): workaround for bcc32's fwrite bug. * io.c (rb_io_fwrite): workaround for bcc32's fwrite bug.
add errno checking. [ruby-dev:23627] add errno checking. [ruby-dev:23627]
* io.c (rb_io_fwrite): should check if errnro == ENOENT, too. * io.c (rb_io_fwrite): should check if errno == ENOENT, too.
Thu May 27 11:25:03 2004 NAKAMURA, Hiroshi <nakahiro@sarion.co.jp> Thu May 27 11:25:03 2004 NAKAMURA, Hiroshi <nakahiro@sarion.co.jp>

2
io.c
View file

@ -411,7 +411,7 @@ rb_io_fwrite(ptr, len, f)
while (errno = 0, ptr += (r = fwrite(ptr, 1, n, f)), (n -= r) > 0) { while (errno = 0, ptr += (r = fwrite(ptr, 1, n, f)), (n -= r) > 0) {
if (ferror(f) if (ferror(f)
#if defined __BORLANDC__ #if defined __BORLANDC__
|| errno == EBADF || errno == ENOENT || errno
#endif #endif
) { ) {
#ifdef __hpux #ifdef __hpux