X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/903b61cc9dc02cc6cdbd7230159f7fb47315133f..65c36a73c679b66d02e5489e26ec53b89bc78fad:/src/common/filename.cpp diff --git a/src/common/filename.cpp b/src/common/filename.cpp index 330828e74a..5c2f9b007c 100644 --- a/src/common/filename.cpp +++ b/src/common/filename.cpp @@ -90,6 +90,10 @@ #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 @@ -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;