X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1c193821a999730fbf6a9bea83763f37daae68f1..fef5c55604e20e2a90843a2278b1f5c8c817dcee:/src/common/file.cpp diff --git a/src/common/file.cpp b/src/common/file.cpp index aca1dc4d26..3eacce8a6a 100644 --- a/src/common/file.cpp +++ b/src/common/file.cpp @@ -10,11 +10,16 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// +/* + TODO: remove all the WinCE ugliness from here, implement the wxOpen(), + wxSeek(), ... functions in a separate file for WinCE instead!!! + */ + // ---------------------------------------------------------------------------- // headers // ---------------------------------------------------------------------------- -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "file.h" #endif @@ -56,11 +61,14 @@ #elif defined(__WXMSW__) && defined(__WXWINCE__) // TODO: what to include? +#elif (defined(__OS2__)) + #include #elif (defined(__UNIX__) || defined(__GNUWIN32__)) #include + #include #include #ifdef __GNUWIN32__ - #include + #include "wx/msw/wrapwin.h" #endif #elif defined(__DOS__) #if defined(__WATCOMC__) @@ -72,8 +80,6 @@ #else #error "Please specify the header with file functions declarations." #endif -#elif (defined(__WXPM__)) - #include #elif (defined(__WXSTUBS__)) // Have to ifdef this for different environments #include @@ -691,7 +697,9 @@ bool wxTempFile::Open(const wxString& strName) if ( chmod( (const char*) m_strTemp.fn_str(), mode) == -1 ) { +#ifndef __OS2__ wxLogSysError(_("Failed to set temporary file permissions")); +#endif } #endif // Unix @@ -717,7 +725,7 @@ bool wxTempFile::Commit() return FALSE; } - if ( wxRenameFile(m_strTemp, m_strName) != 0 ) { + if ( !wxRenameFile(m_strTemp, m_strName) ) { wxLogSysError(_("can't commit changes to file '%s'"), m_strName.c_str()); return FALSE; }