X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1c193821a999730fbf6a9bea83763f37daae68f1..007bea23c3245bac82c24c0f783a7baa5ac672cc:/src/common/filefn.cpp diff --git a/src/common/filefn.cpp b/src/common/filefn.cpp index 3ccac13183..8c6e4a7204 100644 --- a/src/common/filefn.cpp +++ b/src/common/filefn.cpp @@ -17,7 +17,7 @@ // headers // ---------------------------------------------------------------------------- -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "filefn.h" #endif @@ -128,7 +128,7 @@ #endif #ifdef __WINDOWS__ - #include + #include "wx/msw/wrapwin.h" #include "wx/msw/mslu.h" // for _getcwd @@ -196,25 +196,6 @@ const off_t wxInvalidOffset = (off_t)-1; // implementation // ============================================================================ -#if defined(__WXMAC__) && !defined(__DARWIN__) - -WXDLLEXPORT int wxStat( const wxChar *file_name, wxStructStat *buf ) -{ - return stat( wxMacStringToCString( file_name ), buf ); -} - -WXDLLEXPORT int wxAccess( const wxChar *pathname, int mode ) -{ - return access( wxMacStringToCString( pathname ), mode ); -} - -WXDLLEXPORT int wxOpen( const wxChar *pathname, int flags, mode_t mode ) -{ - return open( wxMacStringToCString( pathname ), flags, mode ); -} - -#endif - #ifdef wxNEED_WX_UNISTD_H WXDLLEXPORT int wxStat( const wxChar *file_name, wxStructStat *buf ) @@ -255,7 +236,7 @@ static inline wxChar* MYcopystring(const wxChar* s) void wxPathList::Add (const wxString& path) { - wxStringList::Append (WXSTRINGCAST path); + wxStringList::Add (WXSTRINGCAST path); } // Add paths e.g. from the PATH environment variable @@ -977,7 +958,7 @@ wxString wxMacFSSpec2MacFilename( const FSSpec *spec ) } // create path string for return value - wxString result( thePath ) ; + wxString result( thePath , wxConvLocal) ; #else Handle myPath ; short length ; @@ -991,7 +972,7 @@ wxString wxMacFSSpec2MacFilename( const FSSpec *spec ) (*myPath)[length-1] = 0 ; // create path string for return value - wxString result = wxMacMakeStringFromCString( *myPath ) ; + wxString result( *myPath , wxConvLocal) ; // free allocated handle ::HUnlock( myPath ) ; @@ -1037,7 +1018,7 @@ void wxMacFilename2FSSpec( const char *path , FSSpec *spec ) #if wxUSE_UNICODE WXDLLEXPORT void wxMacFilename2FSSpec( const wxChar *path , FSSpec *spec ) { - return wxMacFilename2FSSpec( wxMacStringToCString( wxString( path ) ) , spec ) ; + return wxMacFilename2FSSpec( wxConvFile.cWC2MB(path) , spec ) ; } #endif