mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* io.c (rb_io_fwrite): should check if errnro == ENOENT, too.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6416 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
ec6cb67d03
commit
b629932863
2 changed files with 4 additions and 2 deletions
|
@ -3,6 +3,8 @@ Thu May 27 14:53:13 2004 WATANABE Hirofumi <eban@ruby-lang.org>
|
|||
* io.c (rb_io_fwrite): workaround for bcc32's fwrite bug.
|
||||
add errno checking. [ruby-dev:23627]
|
||||
|
||||
* io.c (rb_io_fwrite): should check if errnro == ENOENT, too.
|
||||
|
||||
Thu May 27 11:25:03 2004 NAKAMURA, Hiroshi <nakahiro@sarion.co.jp>
|
||||
|
||||
* test/csv/test_csv.rb: illegal require module name (../lib/csv.rb).
|
||||
|
|
4
io.c
4
io.c
|
@ -400,7 +400,7 @@ rb_io_fwrite(ptr, len, f)
|
|||
long n, r;
|
||||
|
||||
if ((n = len) <= 0) return n;
|
||||
#if defined __human68k__ || defined __BORLANDC__
|
||||
#if defined __human68k__
|
||||
do {
|
||||
if (fputc(*ptr++, f) == EOF) {
|
||||
if (ferror(f)) return -1L;
|
||||
|
@ -411,7 +411,7 @@ rb_io_fwrite(ptr, len, f)
|
|||
while (errno = 0, ptr += (r = fwrite(ptr, 1, n, f)), (n -= r) > 0) {
|
||||
if (ferror(f)
|
||||
#if defined __BORLANDC__
|
||||
|| errno == EBAF
|
||||
|| errno == EBADF || errno == ENOENT
|
||||
#endif
|
||||
) {
|
||||
#ifdef __hpux
|
||||
|
|
Loading…
Add table
Reference in a new issue