diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | win32/win32.c | 4 |
2 files changed, 8 insertions, 2 deletions
@@ -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. diff --git a/win32/win32.c b/win32/win32.c index 21d59d41ba..8a19ca0c27 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -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: |