Test for __MINGW64_TOOLCHAIN__ and not __MINGW64__ in wx/filefn.h.

MinGW-w64 headers are the same in 32 and 64 bit cases, so test for these
headers presence with __MINGW64_TOOLCHAIN__ and not for 64 bit build with
__MINGW64__, which should probably not be used anywhere at all.

This fixes problems with wx{Rm,Mk}dir() definitions with MinGW-w64 in
non-Unicode build.

Closes #16362.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77536 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2014-09-04 19:44:46 +00:00
parent 2d37ca3cb0
commit 23e431f0b6

View File

@ -171,7 +171,7 @@ enum wxPosixPermissions
#elif defined(__WINDOWS__) && \
( \
defined(__VISUALC__) || \
defined(__MINGW64__) || \
defined(__MINGW64_TOOLCHAIN__) || \
(defined(__MINGW32__) && !defined(__WINE__) && \
wxCHECK_W32API_VERSION(0, 5)) || \
defined(__BORLANDC__) \
@ -184,8 +184,8 @@ enum wxPosixPermissions
// detect compilers which have support for huge files
#if defined(__VISUALC__)
#define wxHAS_HUGE_FILES 1
#elif defined(__MINGW32__) || defined(__MINGW64__)
#define wxHAS_HUGE_FILES 1f
#elif defined(__MINGW32__)
#define wxHAS_HUGE_FILES 1
#elif defined(_LARGE_FILES)
#define wxHAS_HUGE_FILES 1
#endif
@ -250,7 +250,7 @@ enum wxPosixPermissions
// 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(__MINGW64__)
#if defined(__BORLANDC__) || defined(__MINGW64_TOOLCHAIN__)
#define wxPOSIX_IDENT(func) ::func
#else // by default assume MSVC-compatible names
#define wxPOSIX_IDENT(func) _ ## func
@ -265,7 +265,7 @@ enum wxPosixPermissions
#define wxWrite wxPOSIX_IDENT(write)
#ifdef wxHAS_HUGE_FILES
#ifndef __MINGW64__
#ifndef __MINGW64_TOOLCHAIN__
#define wxSeek wxPOSIX_IDENT(lseeki64)
#define wxLseek wxPOSIX_IDENT(lseeki64)
#define wxTell wxPOSIX_IDENT(telli64)
@ -304,7 +304,7 @@ enum wxPosixPermissions
#ifdef wxHAS_HUGE_FILES
// MinGW-64 provides underscore-less versions of all file functions
// except for this one.
#ifdef __MINGW64__
#ifdef __MINGW64_TOOLCHAIN__
#define wxCRT_StatA _stati64
#else
#define wxCRT_StatA wxPOSIX_IDENT(stati64)