-// Microsoft compiler loves underscores, feed them to it
-#if defined( __VISUALC__ ) \
- || ( defined(__MINGW32__) && !defined(__WINE__) && wxCHECK_W32API_VERSION( 0, 5 ) ) \
- || ( defined(__MWERKS__) && defined(__WXMSW__) ) \
- || ( defined(__DMC__) && defined(__WXMSW__) ) \
- || ( defined(__WATCOMC__) && defined(__WXMSW__) )
+// Wrappers around Win32 api functions like CreateFile, ReadFile and such
+// Implemented in filefnwce.cpp
+#if defined( __WXWINCE__)
+ typedef __int64 wxFileOffset;
+ #define wxFileOffsetFmtSpec _("I64")
+ int wxOpen(const wxChar *filename, int oflag, int WXUNUSED(pmode));
+ int wxAccess(const wxChar *name, int WXUNUSED(how));
+ int wxClose(int fd);
+ int wxFsync(int WXUNUSED(fd));
+ int wxRead(int fd, void *buf, unsigned int count);
+ int wxWrite(int fd, const void *buf, unsigned int count);
+ int wxEof(int fd);
+ wxFileOffset wxSeek(int fd, wxFileOffset offset, int origin);
+ #define wxLSeek wxSeek
+ wxFileOffset wxTell(int fd);
+
+ // always Unicode under WinCE
+ #define wxMkDir _wmkdir
+ #define wxRmDir _wrmdir
+ #define wxStat _wstat
+ #define wxStructStat struct _stat
+#elif defined(__WXMSW__) && !defined(__WXPALMOS__) && \
+ ( \
+ defined(__VISUALC__) || \
+ (defined(__MINGW32__) && !defined(__WINE__) && \
+ wxCHECK_W32API_VERSION(0, 5)) || \
+ defined(__MWERKS__) || \
+ defined(__DMC__) || \
+ defined(__WATCOMC__) || \
+ defined(__BORLANDC__) \
+ )
+
+ #undef wxHAS_HUGE_FILES
+
+ // detect compilers which have support for huge files
+ #if defined(__VISUALC__)
+ #define wxHAS_HUGE_FILES 1
+ #elif defined(__MINGW32__)
+ #define wxHAS_HUGE_FILES 1
+ #elif defined(_LARGE_FILES)
+ #define wxHAS_HUGE_FILES 1
+ #endif
+
+ // other Windows compilers (DMC, Watcom, Metrowerks and Borland) don't have
+ // huge file support (or at least not all functions needed for it by wx)
+ // currently
+
+ #ifdef wxHAS_HUGE_FILES
+ typedef wxLongLong_t wxFileOffset;
+ #define wxFileOffsetFmtSpec wxLongLongFmtSpec
+ #else
+ typedef off_t wxFileOffset;
+ #endif
+
+