X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fe99e2858a1c58e8e0e9484d6415cdf2d40cf043..7b8bd8182ca5ec9ed42d531b80fda479c2a2d7a1:/src/common/file.cpp?ds=sidebyside diff --git a/src/common/file.cpp b/src/common/file.cpp index f563a5cd3d..8f1f1deb76 100644 --- a/src/common/file.cpp +++ b/src/common/file.cpp @@ -20,14 +20,15 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" -#include "wx/defs.h" #ifdef __BORLANDC__ - #pragma hdrstop + #pragma hdrstop #endif +#if wxUSE_FILE + // standard -#if defined(__WXMSW__) && !defined(__GNUWIN32__) +#if defined(__WXMSW__) && !defined(__GNUWIN32__) && !defined(__WXWINE__) #include #ifndef __SALFORDC__ @@ -160,7 +161,7 @@ bool wxFile::Exists(const wxChar *name) { struct stat st; #if wxUSE_UNICODE && wxMBFILES - wxCharBuffer fname = wxConv_file.cWC2MB(name); + wxCharBuffer fname = wxConvFile.cWC2MB(name); return !access(fname, 0) && !stat(MBSTRINGCAST fname, &st) && @@ -502,7 +503,7 @@ bool wxTempFile::Open(const wxString& strName) int access = wxS_DEFAULT; #ifdef __UNIX__ // create the file with the same mode as the original one under Unix - mode_t umaskOld; + mode_t umaskOld = 0; // just to suppress compiler warning bool changedUmask; struct stat st; @@ -523,11 +524,11 @@ bool wxTempFile::Open(const wxString& strName) { // file probably didn't exist, just create with default mode _using_ // user's umask (new files creation should respet umask) - changedUmask = TRUE; + changedUmask = FALSE; } #endif // Unix - bool ok = m_file.Open(m_strTemp, wxFile::write, access); + bool ok = m_file.Open(m_strTemp, wxFile::write, access); #ifdef __UNIX__ if ( changedUmask ) @@ -573,3 +574,5 @@ void wxTempFile::Discard() if ( remove(m_strTemp.fn_str()) != 0 ) wxLogSysError(_("can't remove temporary file '%s'"), m_strTemp.c_str()); } + +#endif \ No newline at end of file