|| ( defined(__DMC__) && defined(__WXMSW__) ) \
|| ( defined(__WATCOMC__) && defined(__WXMSW__) )
- // Not all of the Win32 compilers do have huge file support, for example
- // the Digitalmars compiler does not have huge file size support
+ // detect compilers which have support for huge files (currently only
+ // Digital Mars doesn't)
#include "wx/msw/private.h"
#undef __HUGEFILES_SUPPORTED
- #if _INTEGRAL_MAX_BITS >= 64 && !defined(__DMC__)
+ #if defined(__MINGW32__)
+ #define __HUGEFILES_SUPPORTED 1
+ #elif defined(__DMC__)
+ #define __HUGEFILES_SUPPORTED 0
+ #elif ((_INTEGRAL_MAX_BITS >= 64) || defined(_LARGE_FILES))
#define __HUGEFILES_SUPPORTED 1
#else
#define __HUGEFILES_SUPPORTED 0
#endif
#endif
- // types
+ // 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
#if __HUGEFILES_SUPPORTED
- #if wxUSE_UNICODE
+ #if wxUSE_UNICODE && defined(__WATCOMC__)
#define wxStructStat struct _wstati64
#else
#define wxStructStat struct _stati64
#endif
#else
- #if wxUSE_UNICODE
+ #if wxUSE_UNICODE && defined(__WATCOMC__)
#define wxStructStat struct _wstat
#else
#define wxStructStat struct _stat