Commit 6d6d06a8 authored by Pavel Roskin's avatar Pavel Roskin Committed by Alexandre Julliard

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.
parent 367cf414
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment