X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/87b6002d7c48dea4ebd53bbf60996d1a87a0a5c6..3e1400ac6a9e5388abe63b3f00ff5c8091fef304:/src/common/file.cpp diff --git a/src/common/file.cpp b/src/common/file.cpp index cf35fd1486..5d0d1bee7b 100644 --- a/src/common/file.cpp +++ b/src/common/file.cpp @@ -345,6 +345,13 @@ bool wxFile::Open(const wxChar *szFileName, OpenMode mode, int accessMode) break; } +#ifdef __WINDOWS__ + // only read/write bits for "all" are supported by this function under + // Windows, and VC++ 8 returns EINVAL if any other bits are used in + // accessMode, so clear them as they have at best no effect anyhow + accessMode &= wxS_IRUSR | wxS_IWUSR; +#endif // __WINDOWS__ + int fd = wxOpen( szFileName, flags ACCESS(accessMode)); #endif if ( fd == -1 )