#define wxCRT_RmDir _wrmdir
#define wxCRT_Stat _wstat
#define wxStructStat struct _stat
-#elif defined(__WXMSW__) && !defined(__WXPALMOS__) && \
+#elif (defined(__WXMSW__) || defined(__OS2__)) && !defined(__WXPALMOS__) && \
( \
defined(__VISUALC__) || \
(defined(__MINGW32__) && !defined(__WINE__) && \
#ifdef wxHAS_HUGE_FILES
#define wxCRT_Stat wxPOSIX_IDENT(stati64)
#else
- #define wxCRT_Stat wxPOSIX_IDENT(stat)
+ // Unfortunately Watcom is not consistent, so:-
+ #if defined(__OS2__) && defined(__WATCOMC__)
+ #define wxCRT_Stat _stat
+ #else
+ #define wxCRT_Stat wxPOSIX_IDENT(stat)
+ #endif
#endif
#endif // wxUSE_UNICODE/!wxUSE_UNICODE
#define wxCRT_Lstat wxCRT_Stat
#endif
-inline int wxStat(const wxString& path, wxStructStat *buf)
- { return wxCRT_Stat(path.fn_str(), buf); }
-inline int wxLstat(const wxString& path, wxStructStat *buf)
- { return wxCRT_Lstat(path.fn_str(), buf); }
inline int wxAccess(const wxString& path, mode_t mode)
{ return wxCRT_Access(path.fn_str(), mode); }
inline int wxOpen(const wxString& path, int flags, mode_t mode)
{ return wxCRT_Open(path.fn_str(), flags, mode); }
+
+// FIXME-CE: provide our own implementations of the missing CRT functions
+#ifndef __WXWINCE__
+inline int wxStat(const wxString& path, wxStructStat *buf)
+ { return wxCRT_Stat(path.fn_str(), buf); }
+inline int wxLstat(const wxString& path, wxStructStat *buf)
+ { return wxCRT_Lstat(path.fn_str(), buf); }
inline int wxRmDir(const wxString& path)
{ return wxCRT_RmDir(path.fn_str()); }
-#ifdef __WINDOWS__
+#if defined(__WINDOWS__) || (defined(__OS2__) && defined(__WATCOMC__))
inline int wxMkDir(const wxString& path, mode_t WXUNUSED(mode) = 0)
{ return wxCRT_MkDir(path.fn_str()); }
#else
inline int wxMkDir(const wxString& path, mode_t mode)
{ return wxCRT_MkDir(path.fn_str(), mode); }
#endif
+#endif // !__WXWINCE__
#ifdef O_BINARY
#define wxO_BINARY O_BINARY