]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/file.cpp
no message
[wxWidgets.git] / src / common / file.cpp
index 45e94a868d5639cac3fcde0bc11caf1bf484688d..372c69246152991dc0c378b395f8794018880df4 100644 (file)
@@ -7,7 +7,7 @@
 // Created:     29/01/98
 // RCS-ID:      $Id$
 // Copyright:   (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
-// Licence:     wxWindows license
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 // ----------------------------------------------------------------------------
@@ -56,6 +56,7 @@
 
 #elif (defined(__UNIX__) || defined(__GNUWIN32__))
     #include  <unistd.h>
+    #include  <sys/stat.h>
     #ifdef __GNUWIN32__
         #include <windows.h>
     #endif
@@ -200,7 +201,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);