+ #ifdef wxHAS_HUGE_FILES
+ #define wxSeek wxPOSIX_IDENT(lseeki64)
+ #define wxLseek wxPOSIX_IDENT(lseeki64)
+ #define wxTell wxPOSIX_IDENT(telli64)
+ #else // !wxHAS_HUGE_FILES
+ #define wxSeek wxPOSIX_IDENT(lseek)
+ #define wxLseek wxPOSIX_IDENT(lseek)
+ #define wxTell wxPOSIX_IDENT(tell)
+ #endif // wxHAS_HUGE_FILES/!wxHAS_HUGE_FILES
+
+ #ifndef __WATCOMC__
+ #if !defined(__BORLANDC__) || (__BORLANDC__ > 0x540)
+ // NB: this one is not POSIX and always has the underscore
+ #define wxFsync _commit
+
+ #define HAVE_FSYNC
+ #endif // BORLANDC
+ #endif
+
+ #define wxEof wxPOSIX_IDENT(eof)
+
+ // then the functions taking strings
+ #if wxUSE_UNICODE
+ #if wxUSE_UNICODE_MSLU
+ // implement the missing file functions in Win9x ourselves
+ #if defined( __VISUALC__ ) \
+ || ( defined(__MINGW32__) && wxCHECK_W32API_VERSION( 0, 5 ) ) \
+ || ( defined(__MWERKS__) && defined(__WXMSW__) ) \
+ || ( defined(__BORLANDC__) && (__BORLANDC__ > 0x460) ) \
+ || defined(__DMC__)
+
+ WXDLLIMPEXP_BASE int wxMSLU__wopen(const wxChar *name,
+ int flags, int mode);
+ WXDLLIMPEXP_BASE int wxMSLU__waccess(const wxChar *name,
+ int mode);
+ WXDLLIMPEXP_BASE int wxMSLU__wmkdir(const wxChar *name);
+ WXDLLIMPEXP_BASE int wxMSLU__wrmdir(const wxChar *name);
+
+ WXDLLIMPEXP_BASE int
+ wxMSLU__wstat(const wxChar *name, wxPOSIX_STRUCT(stat) *buffer);
+ WXDLLIMPEXP_BASE int
+ wxMSLU__wstati64(const wxChar *name,
+ wxPOSIX_STRUCT(stati64) *buffer);
+ #endif // Windows compilers with MSLU support
+
+ #define wxCRT_Open wxMSLU__wopen
+
+ #define wxCRT_Access wxMSLU__waccess
+ #define wxCRT_MkDir wxMSLU__wmkdir
+ #define wxCRT_RmDir wxMSLU__wrmdir
+ #ifdef wxHAS_HUGE_FILES
+ #define wxCRT_Stat wxMSLU__wstati64
+ #else
+ #define wxCRT_Stat wxMSLU__wstat
+ #endif
+ #else // !wxUSE_UNICODE_MSLU
+ #ifdef __BORLANDC__
+ #if __BORLANDC__ >= 0x550 && __BORLANDC__ <= 0x551
+ WXDLLIMPEXP_BASE int wxCRT_Open(const wxChar *pathname,
+ int flags, mode_t mode);
+ #else
+ #define wxCRT_Open _wopen
+ #endif
+ #define wxCRT_Access _waccess
+ #define wxCRT_MkDir _wmkdir
+ #define wxCRT_RmDir _wrmdir
+ #ifdef wxHAS_HUGE_FILES
+ #define wxCRT_Stat _wstati64
+ #else
+ #define wxCRT_Stat _wstat
+ #endif
+ #else
+ #define wxCRT_Open _wopen
+ #define wxCRT_Access _waccess
+ #define wxCRT_MkDir _wmkdir
+ #define wxCRT_RmDir _wrmdir
+ #ifdef wxHAS_HUGE_FILES
+ #define wxCRT_Stat _wstati64
+ #else
+ #define wxCRT_Stat _wstat
+ #endif
+ #endif
+ #endif // wxUSE_UNICODE_MSLU/!wxUSE_UNICODE_MSLU
+ #else // !wxUSE_UNICODE
+ #define wxCRT_Open wxPOSIX_IDENT(open)
+ #define wxCRT_Access wxPOSIX_IDENT(access)
+ #define wxCRT_MkDir wxPOSIX_IDENT(mkdir)
+ #define wxCRT_RmDir wxPOSIX_IDENT(rmdir)
+ #ifdef wxHAS_HUGE_FILES
+ #define wxCRT_Stat wxPOSIX_IDENT(stati64)
+ #else
+ #define wxCRT_Stat wxPOSIX_IDENT(stat)
+ #endif
+ #endif // wxUSE_UNICODE/!wxUSE_UNICODE
+
+ // Types: Notice that Watcom is the only compiler to have a wide char
+ // version of struct stat as well as a wide char stat function variant.
+ // This was droped since OW 1.4 "for consistency across platforms".
+ #ifdef wxHAS_HUGE_FILES
+ #if wxUSE_UNICODE && wxONLY_WATCOM_EARLIER_THAN(1,4)
+ #define wxStructStat struct _wstati64
+ #else
+ #define wxStructStat struct _stati64
+ #endif
+ #else
+ #if wxUSE_UNICODE && wxONLY_WATCOM_EARLIER_THAN(1,4)
+ #define wxStructStat struct _wstat
+ #else
+ #define wxStructStat struct _stat
+ #endif
+ #endif