]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/filename.cpp
applied patch for safer GIF decoding (502103)
[wxWidgets.git] / src / common / filename.cpp
index 330828e74a6f7c3f953274a83203d563d6cad847..5c2f9b007c215bf932e347a4b0ae148284138c41 100644 (file)
 #include "wx/msw/winundef.h"
 #endif
 
+#if defined(__WXMAC__)
+  #include  "wx/mac/private.h"  // includes mac headers
+#endif
+
 // utime() is POSIX so should normally be available on all Unices
 #ifdef __UNIX_LIKE__
 #include <sys/types.h>
@@ -537,11 +541,11 @@ wxFileName::CreateTempFileName(const wxString& prefix, wxFile *fileTemp)
 #else // !Windows, !OS/2
     if ( dir.empty() )
     {
-#if defined( __WXMAC__ ) && !defined(__DARWIN__)
-             dir = wxMacFindFolder(  (short) kOnSystemDisk, pTemporaryFolder, kCreateFolder ) ;
-#else
+#if defined(__WXMAC__) && !defined(__DARWIN__)
+        dir = wxMacFindFolder(  (short) kOnSystemDisk, pTemporaryFolder, kCreateFolder ) ;
+#else // !Mac
         dir = wxGetenv(_T("TMP"));
-        if ( path.empty() )
+        if ( dir.empty() )
         {
             dir = wxGetenv(_T("TEMP"));
         }
@@ -555,7 +559,7 @@ wxFileName::CreateTempFileName(const wxString& prefix, wxFile *fileTemp)
                 dir = _T("/tmp");
             #endif
         }
-#endif
+#endif // Mac/!Mac
     }
 
     path = dir;