From b4312303967924bda5e280e189dbbcf3538ec1dd Mon Sep 17 00:00:00 2001 From: usa Date: Sat, 26 Jul 2003 12:27:04 +0000 Subject: * io.c (rb_fdopen): set errno if it's zero on win32 platforms. * ext/openssl/ossl_ssl.c (TO_SOCKET): define special version when _WIN32 is defined. this is ruby's problem, not OpenSSL. * win32/win32.c: remove some old comments. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4172 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- io.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'io.c') diff --git a/io.c b/io.c index 681ba97ec3..debb94a7cd 100644 --- a/io.c +++ b/io.c @@ -1859,6 +1859,9 @@ rb_fdopen(fd, mode) file = fdopen(fd, mode); } if (!file) { +#ifdef _WIN32 + if (errno == 0) errno = EINVAL; +#endif rb_sys_fail(0); } } -- cgit v1.2.3