+ // at least Borland 5.5 doesn't like "struct ::stat" so don't use the scope
+ // resolution operator present in wxPOSIX_IDENT for it
+ #ifdef __BORLANDC__
+ #define wxPOSIX_STRUCT(s) struct s
+ #else
+ #define wxPOSIX_STRUCT(s) struct wxPOSIX_IDENT(s)
+ #endif
+
+ // 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 dropped since OW 1.4 "for consistency across platforms".
+ //
+ // Borland is also special in that it uses _stat with Unicode functions
+ // (for MSVC compatibility?) but stat with ANSI ones
+ #ifdef __BORLANDC__
+ #if wxHAS_HUGE_FILES
+ #define wxStructStat struct stati64
+ #else
+ #if wxUSE_UNICODE
+ #define wxStructStat struct _stat
+ #else
+ #define wxStructStat struct stat
+ #endif
+ #endif
+ #else // !__BORLANDC__
+ #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
+ #endif // __BORLANDC__/!__BORLANDC__
+
+
+ // functions
+
+ // MSVC and compatible compilers prepend underscores to the POSIX function
+ // names, other compilers don't and even if their later versions usually do
+ // define the versions with underscores for MSVC compatibility, it's better
+ // to avoid using them as they're not present in earlier versions and
+ // always using the native functions spelling is easier than testing for
+ // the versions
+ #if defined(__BORLANDC__) || defined(__DMC__) || defined(__WATCOMC__) || defined(__MINGW64__)
+ #define wxPOSIX_IDENT(func) ::func
+ #else // by default assume MSVC-compatible names
+ #define wxPOSIX_IDENT(func) _ ## func
+ #define wxHAS_UNDERSCORES_IN_POSIX_IDENTS
+ #endif
+
+ // first functions not working with strings, i.e. without ANSI/Unicode
+ // complications
+ #define wxClose wxPOSIX_IDENT(close)