]> git.saurik.com Git - wxWidgets.git/commitdiff
cleanup mac
authorStefan Csomor <csomor@advancedconcepts.ch>
Thu, 22 Nov 2007 13:59:24 +0000 (13:59 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Thu, 22 Nov 2007 13:59:24 +0000 (13:59 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50154 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/file.cpp
src/common/filename.cpp

index 23e04502833bd2142f9633731c6471a8e8f0f8d2..680f9dfb4e502567392d41ce7d6bab53ced5c3d2 100644 (file)
@@ -198,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 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) );
     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);
     if ( fd == -1 )
     {
         wxLogSysError(_("can't create file '%s'"), fileName);
index 7846362846a79b7032457e97f208f41e871205cc..8676863447b1891fac9cc8f9a3f025eb7cbb848c 100644 (file)
@@ -1102,14 +1102,7 @@ bool wxFileName::Mkdir( const wxString& dir, int perm, int flags )
         size_t count = dirs.GetCount();
         for ( size_t i = 0; i < count; i++ )
         {
         size_t count = dirs.GetCount();
         for ( size_t i = 0; i < count; i++ )
         {
-            if ( i > 0 ||
-#if defined(__WXMAC__) && !defined(__DARWIN__)
-            // relative pathnames are exactely the other way round under mac...
-                !filename.IsAbsolute()
-#else
-                filename.IsAbsolute()
-#endif
-            )
+            if ( i > 0 || filename.IsAbsolute() )
                 currPath += wxFILE_SEP_PATH;
             currPath += dirs[i];
 
                 currPath += wxFILE_SEP_PATH;
             currPath += dirs[i];
 
@@ -1954,8 +1947,6 @@ wxPathFormat wxFileName::GetFormat( wxPathFormat format )
     {
 #if defined(__WXMSW__) || defined(__OS2__) || defined(__DOS__)
         format = wxPATH_DOS;
     {
 #if defined(__WXMSW__) || defined(__OS2__) || defined(__DOS__)
         format = wxPATH_DOS;
-#elif defined(__WXMAC__) && !defined(__DARWIN__)
-        format = wxPATH_MAC;
 #elif defined(__VMS)
         format = wxPATH_VMS;
 #else
 #elif defined(__VMS)
         format = wxPATH_VMS;
 #else