* win32/win32.c (dupfd): use _set_osfhnd.

* win32/win32.c (rb_w32_wopen): use _set_osflags.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50377 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2015-04-23 22:58:05 +00:00
parent 62c2b2e80a
commit cc622e2ac5
2 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,9 @@
Fri Apr 24 06:37:07 2015 NARUSE, Yui <naruse@ruby-lang.org>
* win32/win32.c (dupfd): use _set_osfhnd.
* win32/win32.c (rb_w32_wopen): use _set_osflags.
Thu Apr 24 05:38:01 2015 Koichi Sasada <ko1@atdot.net>
* gc.c (gc_mark_roots): fox to work PRINT_ROOT_TICKS.

View File

@ -4113,7 +4113,7 @@ dupfd(HANDLE hDup, char flags, int minfd)
save_errno = errno;
while (filled > 0) {
int fd = fds[--filled];
_osfhnd(fd) = (intptr_t)INVALID_HANDLE_VALUE;
_set_osfhnd(fd, (intptr_t)INVALID_HANDLE_VALUE);
close(fd);
}
errno = save_errno;
@ -6100,7 +6100,7 @@ rb_w32_wopen(const WCHAR *file, int oflag, ...)
flags |= FAPPEND;
_set_osfhnd(fd, (intptr_t)h);
_osfile(fd) = flags | FOPEN;
_set_osflags(fd, flags | FOPEN);
MTHREAD_ONLY(LeaveCriticalSection(&_pioinfo(fd)->lock));
quit: