X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/732b838637e8c6d3af1ae0a91023201bd376c9f7..245f35816d761212279e8cf223475efb7a367553:/src/common/file.cpp diff --git a/src/common/file.cpp b/src/common/file.cpp index c02203f65c..04fd887a93 100644 --- a/src/common/file.cpp +++ b/src/common/file.cpp @@ -7,7 +7,7 @@ // Created: 29/01/98 // RCS-ID: $Id$ // Copyright: (c) 1998 Vadim Zeitlin -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// // ---------------------------------------------------------------------------- @@ -91,7 +91,10 @@ #include // SEEK_xxx constants #include // O_RDONLY &c -#if !defined(__MWERKS__) || defined(__WXMSW__) +#ifndef __MWERKS__ + #include // needed for stat + #include // stat +#elif defined(__MWERKS__) && ( defined(__WXMSW__) || defined(__MACH__) ) #include // needed for stat #include // stat #endif @@ -201,7 +204,7 @@ 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 -#if defined(__WXMAC__) && !defined(__UNIX__) +#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(wxUnix2MacFilename( szFileName ), O_CREAT | (bOverwrite ? O_TRUNC : O_EXCL), access); int fd = creat( szFileName , accessMode);