X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4ea2c29f51d358c9a9bbc37edda1541073c71364..fb29dcac01af849053d8f85b69aae7e7ca8c7d26:/src/common/file.cpp diff --git a/src/common/file.cpp b/src/common/file.cpp index 5c5dd58c9d..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 ///////////////////////////////////////////////////////////////////////////// // ---------------------------------------------------------------------------- @@ -28,7 +28,7 @@ #if wxUSE_FILE // standard -#if defined(__WXMSW__) && !defined(__GNUWIN32__) && !defined(__WXWINE__) && !defined(__WXMICROWIN__) +#if defined(__WXMSW__) && !defined(__GNUWIN32__) && !defined(__WXMICROWIN__) #include #ifndef __SALFORDC__ @@ -56,6 +56,7 @@ #elif (defined(__UNIX__) || defined(__GNUWIN32__)) #include + #include #ifdef __GNUWIN32__ #include #endif @@ -90,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 @@ -200,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);