From: nobu.nakada@... Date: 2004-06-25T20:41:16+09:00 Subject: [ruby-dev:23792] Re: [ruby-cvs] ruby/lib/net, ruby/lib, ruby/ext/socket, ruby: * ext/socket/socket.c (sock_sockaddr): Socket#gethostbyname() なかだです。 At Fri, 25 Jun 2004 08:10:55 +0900, matz wrote in [ruby-cvs:12084]: > 1.283 +9 -9 ruby/io.c > http://www.ruby-lang.org/cgi-bin/cvsweb.cgi/ruby/io.c?cvsroot=src&r1=1.282&r2=1.283 @@ -2382,5 +2382,5 @@ rb_fopen(fname, mode) } #ifdef USE_SETVBUF - if (setvbuf(file, NULL, _IOFBF, 0) != 0) + if (setvbuf(file, NULL, _IOFBF, 0) < 0) rb_warn("setvbuf() can't be honoured for %s", fname); #endif @@ -2425,5 +2425,5 @@ rb_fdopen(fd, mode) #ifdef USE_SETVBUF - if (setvbuf(file, NULL, _IOFBF, 0) != 0) + if (setvbuf(file, NULL, _IOFBF, 0) < 0) rb_warn("setvbuf() can't be honoured (fd=%d)", fd); #endif @@ -3279,5 +3279,5 @@ rb_io_reopen(argc, argv, file) } #ifdef USE_SETVBUF - if (setvbuf(fptr->f, NULL, _IOFBF, 0) != 0) + if (setvbuf(fptr->f, NULL, _IOFBF, 0) < 0) rb_warn("setvbuf() can't be honoured for %s", RSTRING(fname)->ptr); #endif setvbuf()はエラーのときには0以外を返すとしか規定されていないよ うです。 http://www.opengroup.org/onlinepubs/007908799/xsh/setvbuf.html RETURN VALUE Upon successful completion, setvbuf() returns 0. Otherwise, it returns a non-zero value if an invalid value is given for type or if the request cannot be honoured. -- --- 僕の前にBugはない。 --- 僕の後ろにBugはできる。 中田 伸悦