X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fe4a282956f13754527f5f7ea090fa8841f07771..b48eedfc694c2050b5d4ad8e7760534b0b4edae6:/src/common/file.cpp diff --git a/src/common/file.cpp b/src/common/file.cpp index 45ab8ade8c..680f9dfb4e 100644 --- a/src/common/file.cpp +++ b/src/common/file.cpp @@ -116,6 +116,7 @@ #include "wx/string.h" #include "wx/intl.h" #include "wx/log.h" + #include "wx/crt.h" #endif // !WX_PRECOMP #include "wx/filename.h" @@ -197,16 +198,10 @@ bool wxFile::Create(const wxString& fileName, 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 -#if defined(__WXMAC__) && !defined(__UNIX__) && !wxUSE_UNICODE - // Dominic Mazzoni [dmazzoni+@cs.cmu.edu] reports that open is still broken on the mac, so we replace - // int fd = open( fileName , O_CREAT | (bOverwrite ? O_TRUNC : O_EXCL), access); - int fd = creat( fileName , accessMode); -#else int fd = wxOpen( fileName, O_BINARY | O_WRONLY | O_CREAT | (bOverwrite ? O_TRUNC : O_EXCL) ACCESS(accessMode) ); -#endif if ( fd == -1 ) { wxLogSysError(_("can't create file '%s'"), fileName);