Eric Pouech : msvcrt: Fix the internal flag computation for _open_osfhandle .
Module: wine Branch: master Commit: 8333cf88d8eea42b0c1fe2f8f18656fe4b631141 URL: http://source.winehq.org/git/wine.git/?a=commit;h=8333cf88d8eea42b0c1fe2f8f1... Author: Eric Pouech <eric.pouech(a)wanadoo.fr> Date: Sun Jan 21 16:33:37 2007 +0100 msvcrt: Fix the internal flag computation for _open_osfhandle. --- dlls/msvcrt/file.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/dlls/msvcrt/file.c b/dlls/msvcrt/file.c index 9ce2039..0cd098b 100644 --- a/dlls/msvcrt/file.c +++ b/dlls/msvcrt/file.c @@ -1567,11 +1567,9 @@ int CDECL _open_osfhandle(long handle, i * file, so set the write flag. It also only sets MSVCRT__O_TEXT if it wants * text - it never sets MSVCRT__O_BINARY. */ - /* FIXME: handle more flags */ - if (!(oflags & (MSVCRT__O_BINARY | MSVCRT__O_TEXT)) && (*__p__fmode() & MSVCRT__O_BINARY)) + /* don't let split_oflags() decide the mode if no mode is passed */ + if (!(oflags & (MSVCRT__O_BINARY | MSVCRT__O_TEXT))) oflags |= MSVCRT__O_BINARY; - else - oflags |= MSVCRT__O_TEXT; fd = msvcrt_alloc_fd((HANDLE)handle, split_oflags(oflags)); TRACE(":handle (%ld) fd (%d) flags 0x%08x\n", handle, fd, oflags);
participants (1)
-
Alexandre Julliard