diff options
author | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-09-10 01:53:25 +0000 |
---|---|---|
committer | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-09-10 01:53:25 +0000 |
commit | cc29e1af24e5ba0a420c255809abd60ff7f617d8 (patch) | |
tree | c876366cb56c840b7fb864f4af0f909dccff6b34 /io.c | |
parent | e8c18c977e5277ac1c7dbbbb97478edecf76d096 (diff) |
merge revision(s) 24496:
* io.c (rb_sysopen): workaround for MSVCRT's bug.
[ruby-core:24838]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@24824 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -2905,10 +2905,16 @@ rb_sysopen(fname, flags, mode) { int fd; +#ifdef _WIN32 + errno = EINVAL; +#endif fd = open(fname, flags, mode); if (fd < 0) { if (errno == EMFILE || errno == ENFILE) { rb_gc(); +#ifdef _WIN32 + errno = EINVAL; +#endif fd = open(fname, flags, mode); } if (fd < 0) { |