X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/18a1516c4b2406f61202d5390fa8595e8ea5a196..c27bcbd5a7cec9f03b15c69824da99c5bb75924a:/src/common/filefn.cpp diff --git a/src/common/filefn.cpp b/src/common/filefn.cpp index fbb1a719bb..3434d5aaa0 100644 --- a/src/common/filefn.cpp +++ b/src/common/filefn.cpp @@ -214,7 +214,9 @@ void wxPathList::AddEnvList (const wxString& envVariable) delete [] s; } -#endif +#else // __WXWINCE__ + wxUnusedVar(envVariable); +#endif // !__WXWINCE__/__WXWINCE__ } // Given a full filename (with path), ensure that that file can @@ -681,6 +683,8 @@ wxContractPath (const wxString& filename, const wxString& envname, const wxStrin wxStrcat (tcp, wxT("}")); wxStrcat (tcp, wxFileFunctionsBuffer); } +#else + wxUnusedVar(envname); #endif // Handle User's home (ignore root homes!) @@ -1222,6 +1226,8 @@ bool wxPathExists(const wxChar *pszPathName) DWORD ret = ::GetFileAttributes(strPath); return (ret != (DWORD)-1) && (ret & FILE_ATTRIBUTE_DIRECTORY); +#elif defined(__OS2__) + return (::DosSetCurrentDir(WXSTRINGCAST strPath)); #else // !__WIN32__ wxStructStat st; @@ -1330,6 +1336,9 @@ wxChar *wxGetWorkingDirectory(wxChar *buf, int sz) // TODO ? return NULL; #elif defined(__WXWINCE__) + // TODO + wxUnusedVar(buf); + wxUnusedVar(sz); return NULL; #else if ( !buf ) @@ -1471,6 +1480,7 @@ bool wxSetWorkingDirectory(const wxString& d) #ifdef __WIN32__ #ifdef __WXWINCE__ // No equivalent in WinCE + wxUnusedVar(d); return false; #else return (bool)(SetCurrentDirectory(d) != 0); @@ -1892,7 +1902,7 @@ bool wxMatchWild( const wxString& pat, const wxString& text, bool dot_special ) // This is important for the archive streams, which benefit greatly from // being able to seek on a stream, but which will produce corrupt archives // if they unknowingly seek on a non-seekable stream. -// +// // wxFILE_KIND_DISK is a good catch all return value, since other values // disable features of the archive streams. Some other value must be returned // for a file type that appears seekable but isn't. @@ -1936,11 +1946,23 @@ wxFileKind wxGetFileKind(int fd) return wxFILE_KIND_DISK; #else + #define wxFILEKIND_STUB (void)fd; return wxFILE_KIND_DISK; #endif } +wxFileKind wxGetFileKind(FILE *fp) +{ + // note: the watcom rtl dll doesn't have fileno (the static lib does) +#if !defined wxFILEKIND_STUB && !(defined __WATCOMC__ && defined __SW_BR) + return wxGetFileKind(fileno(fp)); +#else + (void)fp; + return wxFILE_KIND_DISK; +#endif +} + #ifdef __VISUALC__ #pragma warning(default:4706) // assignment within conditional expression #endif // VC++