]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/filefn.cpp
use tm_gmtoff instead of timezone variable if tm struct member exists
[wxWidgets.git] / src / common / filefn.cpp
index 66009c3b70fa56bd3e399f0a01cac746653983a9..2770a37f388b5d6ce075aa0db1213277318992cf 100644 (file)
@@ -1371,7 +1371,7 @@ static wxString gs_dirPath;
 
 wxString wxFindFirstFile(const wxChar *spec, int flags)
 {
-    gs_dirPath = wxPathOnly(spec);
+    wxSplitPath(spec, &gs_dirPath, NULL, NULL);
     if ( gs_dirPath.IsEmpty() )
         gs_dirPath = wxT(".");
     if ( gs_dirPath.Last() != wxFILE_SEP_PATH )
@@ -1396,7 +1396,7 @@ wxString wxFindFirstFile(const wxChar *spec, int flags)
     }
 
     wxString result;
-    gs_dir->GetFirst(&result, wxFileNameFromPath(spec), dirFlags);
+    gs_dir->GetFirst(&result, wxFileNameFromPath((wxChar) spec), dirFlags);
     if ( result.IsEmpty() )
     {
         wxDELETE(gs_dir);
@@ -1698,7 +1698,7 @@ bool wxIsWild( const wxString& pattern )
 
 bool wxMatchWild( const wxString& pat, const wxString& text, bool dot_special )
 
-#if defined(HAVE_FNMATCH_H)
+#ifdef HAVE_FNMATCH
 {
 // this probably won't work well for multibyte chars in Unicode mode?
    if(dot_special)
@@ -1706,7 +1706,7 @@ bool wxMatchWild( const wxString& pat, const wxString& text, bool dot_special )
    else
       return fnmatch(pat.fn_str(), text.fn_str(), 0) == 0;
 }
-#else
+#else // !HAVE_FNMATCH
 
 // #pragma error Broken implementation of wxMatchWild() -- needs fixing!
 
@@ -1847,7 +1847,7 @@ bool wxMatchWild( const wxString& pat, const wxString& text, bool dot_special )
     return ((*str == wxT('\0')) && (*pattern == wxT('\0')));
 };
 
-#endif
+#endif // HAVE_FNMATCH/!HAVE_FNMATCH
 
 #ifdef __VISUALC__
     #pragma warning(default:4706)   // assignment within conditional expression