From: Vadim Zeitlin Date: Mon, 3 Jan 2000 10:32:19 +0000 (+0000) Subject: O_BINARY added to wxFile::Create X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/312cd9e93d7c0bf201e52297741e8e12a7298fc9?ds=inline O_BINARY added to wxFile::Create git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5193 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/file.cpp b/src/common/file.cpp index 4a40785270..ef24f40f83 100644 --- a/src/common/file.cpp +++ b/src/common/file.cpp @@ -220,10 +220,11 @@ bool wxFile::Create(const wxChar *szFileName, bool bOverwrite, int accessMode) // if bOverwrite we create a new file or truncate the existing one, // otherwise we only create the new file and fail if it already exists #ifdef __WXMAC__ - int fd = open(wxUnix2MacFilename( szFileName ), O_CREAT | (bOverwrite ? O_TRUNC : O_EXCL), access); + int fd = open(wxUnix2MacFilename( szFileName ), O_CREAT | (bOverwrite ? O_TRUNC : O_EXCL), access); #else int fd = open(wxFNCONV(szFileName), - O_WRONLY | O_CREAT | (bOverwrite ? O_TRUNC : O_EXCL) + O_BINARY | O_WRONLY | O_CREAT | + (bOverwrite ? O_TRUNC : O_EXCL) ACCESS(accessMode)); #endif if ( fd == -1 ) { @@ -260,7 +261,7 @@ bool wxFile::Open(const wxChar *szFileName, OpenMode mode, int accessMode) } #ifdef __WXMAC__ - int fd = open(wxUnix2MacFilename( szFileName ), flags, access); + int fd = open(wxUnix2MacFilename( szFileName ), flags, access); #else int fd = open(wxFNCONV(szFileName), flags ACCESS(accessMode)); #endif