From 6d6d06a8dcc46b49b49d43b363dcb3e8f6f9b717 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Fri, 24 Oct 2003 04:21:09 +0000 Subject: [PATCH] Make MSVCRT__sopen() complain louder about unknown oflags, but not about _O_WRONLY. MSVCRT_fopen() should pass third argument to _open() because it may set _O_CREAT. --- dlls/msvcrt/file.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/msvcrt/file.c b/dlls/msvcrt/file.c index 929910a4716..12f1679ed0c 100644 --- a/dlls/msvcrt/file.c +++ b/dlls/msvcrt/file.c @@ -1028,8 +1028,8 @@ int MSVCRT__sopen( const char *path, int oflags, int shflags, ... ) } if (oflags & ~(_O_BINARY|_O_TEXT|_O_APPEND|_O_TRUNC|_O_EXCL - |_O_CREAT|_O_RDWR|_O_TEMPORARY|_O_NOINHERIT)) - TRACE(":unsupported oflags 0x%04x\n",oflags); + |_O_CREAT|_O_RDWR|_O_WRONLY|_O_TEMPORARY|_O_NOINHERIT)) + ERR(":unsupported oflags 0x%04x\n",oflags); sa.nLength = sizeof( SECURITY_ATTRIBUTES ); sa.lpSecurityDescriptor = NULL; @@ -1908,7 +1908,7 @@ MSVCRT_FILE* MSVCRT_fopen(const char *path, const char *mode) FIXME(":unknown flag %c not supported\n",mode[-1]); } - fd = _open(path, flags); + fd = _open(path, flags, _S_IREAD | _S_IWRITE); if (fd < 0) return NULL;