X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4bf3e3a702a5bec15888db7bf535a297e57b47fb..69d31e313035d5e22d9400ec946f6007f710910c:/src/msw/mslu.cpp diff --git a/src/msw/mslu.cpp b/src/msw/mslu.cpp index 5d30eac705..ec882a9d98 100644 --- a/src/msw/mslu.cpp +++ b/src/msw/mslu.cpp @@ -21,6 +21,8 @@ #include "wx/utils.h" #endif +#define wxHAS_HUGE_FILES + //------------------------------------------------------------------------ // Check for use of MSLU //------------------------------------------------------------------------ @@ -182,68 +184,46 @@ WXDLLIMPEXP_BASE FILE* wxMSLU__wfreopen(const wchar_t *name, return _wfreopen(name, mode, stream); } -#if defined( __VISUALC__ ) \ - || ( defined(__MINGW32__) && wxCHECK_W32API_VERSION( 0, 5 ) ) \ - || ( defined(__MWERKS__) && defined(__WXMSW__) ) \ - || ( defined(__BORLANDC__) && (__BORLANDC__ > 0x460) ) - WXDLLIMPEXP_BASE int wxMSLU__wopen(const wchar_t *name, int flags, int mode) { if ( wxUsingUnicowsDll() ) -#ifdef __BORLANDC__ - return open(wxConvFile.cWX2MB(name), flags, mode); -#else - return _open(wxConvFile.cWX2MB(name), flags, mode); -#endif + return wxCRT_OpenA(wxConvFile.cWX2MB(name), flags, mode); else - return _wopen(name, flags, mode); + return wxCRT_OpenW(name, flags, mode); } WXDLLIMPEXP_BASE int wxMSLU__waccess(const wchar_t *name, int mode) { if ( wxUsingUnicowsDll() ) - return _access(wxConvFile.cWX2MB(name), mode); + return wxCRT_AccessA(wxConvFile.cWX2MB(name), mode); else - return _waccess(name, mode); + return wxCRT_AccessW(name, mode); } WXDLLIMPEXP_BASE int wxMSLU__wmkdir(const wchar_t *name) { if ( wxUsingUnicowsDll() ) - return _mkdir(wxConvFile.cWX2MB(name)); + return wxCRT_MkDirA(wxConvFile.cWX2MB(name)); else - return _wmkdir(name); + return wxCRT_MkDirW(name); } WXDLLIMPEXP_BASE int wxMSLU__wrmdir(const wchar_t *name) { if ( wxUsingUnicowsDll() ) - return _rmdir(wxConvFile.cWX2MB(name)); + return wxCRT_RmDirA(wxConvFile.cWX2MB(name)); else - return _wrmdir(name); + return wxCRT_RmDirW(name); } -#ifdef wxHAS_HUGE_FILES -WXDLLIMPEXP_BASE int wxMSLU__wstati64(const wchar_t *name, wxStructStat *buffer) -{ - if ( wxUsingUnicowsDll() ) - return _stati64((const char*)wxConvFile.cWX2MB(name), buffer); - else - return _wstati64(name, buffer); -} -#else // !wxHAS_HUGE_FILES WXDLLIMPEXP_BASE int wxMSLU__wstat(const wchar_t *name, wxStructStat *buffer) { if ( wxUsingUnicowsDll() ) - return _stat((const char*)wxConvFile.cWX2MB(name), buffer); + return wxCRT_StatA((const char*)wxConvFile.cWX2MB(name), buffer); else - return _wstat(name, buffer); + return wxCRT_StatW(name, buffer); } -#endif // wxHAS_HUGE_FILES/!wxHAS_HUGE_FILES - -#endif // compilers having wopen() &c - #endif // wxUSE_BASE #endif // wxUSE_UNICODE_MSLU