X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dface61ccba162c922b25d18aca2ebc4e6f03312..cfad3750c3ecc821ffae8b9b3de852551270846d:/src/common/filefn.cpp diff --git a/src/common/filefn.cpp b/src/common/filefn.cpp index 3e299df4f8..e828319ae0 100644 --- a/src/common/filefn.cpp +++ b/src/common/filefn.cpp @@ -57,14 +57,17 @@ #endif #ifdef __WINDOWS__ -#if !defined( __GNUWIN32__ ) && !defined( __MWERKS__ ) +#if !defined( __GNUWIN32__ ) && !defined( __MWERKS__ ) && !defined(__SALFORDC__) #include #include #endif #endif #ifdef __GNUWIN32__ +#ifndef __TWIN32__ #include +#endif + #define stricmp strcasecmp #endif @@ -74,6 +77,11 @@ #include #endif +#ifdef __SALFORDC__ +#include +#include +#endif + #include "wx/setup.h" #include "wx/log.h" @@ -240,7 +248,12 @@ wxFileExists (const wxString& filename) return TRUE; return FALSE ; #else + +#ifdef __SALFORDC__ + struct _stat stbuf; +#else struct stat stbuf; +#endif if ((filename != "") && stat ((char *)(const char *)filename, &stbuf) == 0) return TRUE; @@ -992,8 +1005,14 @@ bool wxRmdir(const wxString& dir, int WXUNUSED(flags)) wxUnix2MacFilename( gwxMacFileName ) ; return (rmdir(WXSTRINGCAST gwxMacFileName) == 0); #else + +#ifdef __SALFORDC__ + return FALSE; // What to do? +#else return (rmdir(WXSTRINGCAST dir) == 0); #endif + +#endif } #if 0 @@ -1051,8 +1070,13 @@ bool wxPathExists(const char *pszPathName) if ( wxEndsWithPathSeparator(pszPathName) && pszPathName[1] != '\0' ) strPath.Last() = '\0'; +#ifdef __SALFORDC__ + struct _stat st; +#else struct stat st; - return stat(strPath, &st) == 0 && (st.st_mode & S_IFDIR); +#endif + + return stat((char*) (const char*) strPath, &st) == 0 && (st.st_mode & S_IFDIR); } // Get a temporary filename, opening and closing the file.