]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/filefn.cpp
fix warnings (double to int conversions and unused variables); removed hard TABs...
[wxWidgets.git] / src / common / filefn.cpp
index 6b0c967cca4e23fe6f70ec452e8f97d4743a11ad..5c8e11038e1d691438a722ece582b44d71105872 100644 (file)
@@ -907,6 +907,8 @@ wxString wxMacHFSUniStrToString( ConstHFSUniStr255Param uniname )
     return wxMacCFStringHolder(cfMutableString).AsString() ;
 }
 
+#ifndef __LP64__
+
 wxString wxMacFSSpec2MacFilename( const FSSpec *spec )
 {
     FSRef fsRef ;
@@ -924,6 +926,7 @@ void wxMacFilename2FSSpec( const wxString& path , FSSpec *spec )
     wxMacPathToFSRef( path , &fsRef ) ;
     err = FSRefMakeFSSpec( &fsRef , spec ) ;
 }
+#endif
 
 #endif // __WXMAC__
 
@@ -1277,9 +1280,8 @@ bool wxDirExists(const wxChar *pszPathName)
 // Get a temporary filename, opening and closing the file.
 wxChar *wxGetTempFileName(const wxString& prefix, wxChar *buf)
 {
-#if wxUSE_FILE
-    wxString filename = wxFileName::CreateTempFileName(prefix);
-    if ( filename.empty() )
+    wxString filename;
+    if ( !wxGetTempFileName(prefix, filename) )
         return NULL;
 
     if ( buf )
@@ -1288,19 +1290,20 @@ wxChar *wxGetTempFileName(const wxString& prefix, wxChar *buf)
         buf = MYcopystring(filename);
 
     return buf;
-#else
-    wxUnusedVar(prefix);
-    wxUnusedVar(buf);
-    // wxFileName::CreateTempFileName needs wxFile class enabled
-    return NULL;
-#endif
 }
 
 bool wxGetTempFileName(const wxString& prefix, wxString& buf)
 {
-    buf = wxGetTempFileName(prefix);
+#if wxUSE_FILE
+    buf = wxFileName::CreateTempFileName(prefix);
 
     return !buf.empty();
+#else // !wxUSE_FILE
+    wxUnusedVar(prefix);
+    wxUnusedVar(buf);
+
+    return false;
+#endif // wxUSE_FILE/!wxUSE_FILE
 }
 
 // Get first file name matching given wild card.
@@ -1801,6 +1804,7 @@ bool wxIsWritable(const wxString &path)
 #elif defined( __WINDOWS__ )
     return wxCheckGenericPermission(path, GENERIC_WRITE);
 #else
+    wxUnusedVar(path);
     // TODO
     return false;
 #endif
@@ -1814,6 +1818,7 @@ bool wxIsReadable(const wxString &path)
 #elif defined( __WINDOWS__ )
     return wxCheckGenericPermission(path, GENERIC_READ);
 #else
+    wxUnusedVar(path);
     // TODO
     return false;
 #endif
@@ -1827,6 +1832,7 @@ bool wxIsExecutable(const wxString &path)
 #elif defined( __WINDOWS__ )
    return wxCheckGenericPermission(path, GENERIC_EXECUTE);
 #else
+    wxUnusedVar(path);
     // TODO
     return false;
 #endif