summaryrefslogtreecommitdiffstats
path: root/io.c
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-07-26 12:27:04 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-07-26 12:27:04 +0000
commitd9222387d76420cc6604ddbc3d7a67b49b2d24c9 (patch)
tree3151a7f46d7a62433cffd8ffdc7b3c1f4d0f1809 /io.c
parent655063e4f93a5e25c253d72e53a9eb02ffabb10d (diff)
downloadruby-d9222387d76420cc6604ddbc3d7a67b49b2d24c9.tar.gz
ruby-d9222387d76420cc6604ddbc3d7a67b49b2d24c9.tar.xz
ruby-d9222387d76420cc6604ddbc3d7a67b49b2d24c9.zip
* 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: http://svn.ruby-lang.org/repos/ruby/trunk@4172 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r--io.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/io.c b/io.c
index 681ba97ec..debb94a7c 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);
}
}