Add declarations to fix the build with MinGW 5.3.0 in C++11 mode
Fix the build with -std=c++11 (instead of -std=gnu++11) by providing even more declarations for the functions wrongly excluded from MinGW headers in "strict ANSI" mode ourselves.
This commit is contained in:
@@ -293,8 +293,12 @@ enum wxPosixPermissions
|
|||||||
#define wxCRT_OpenW _wopen
|
#define wxCRT_OpenW _wopen
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
wxDECL_FOR_STRICT_MINGW32(int, _wopen, (const wchar_t*, int, ...))
|
||||||
|
wxDECL_FOR_STRICT_MINGW32(int, _waccess, (const wchar_t*, int))
|
||||||
|
wxDECL_FOR_STRICT_MINGW32(int, _wchmod, (const wchar_t*, int))
|
||||||
wxDECL_FOR_STRICT_MINGW32(int, _wmkdir, (const wchar_t*))
|
wxDECL_FOR_STRICT_MINGW32(int, _wmkdir, (const wchar_t*))
|
||||||
wxDECL_FOR_STRICT_MINGW32(int, _wrmdir, (const wchar_t*))
|
wxDECL_FOR_STRICT_MINGW32(int, _wrmdir, (const wchar_t*))
|
||||||
|
wxDECL_FOR_STRICT_MINGW32(int, _wstati64, (const wchar_t*, struct _stati64*))
|
||||||
|
|
||||||
#define wxCRT_AccessW _waccess
|
#define wxCRT_AccessW _waccess
|
||||||
#define wxCRT_ChmodW _wchmod
|
#define wxCRT_ChmodW _wchmod
|
||||||
|
@@ -194,6 +194,9 @@ extern unsigned long android_wcstoul(const wchar_t *nptr, wchar_t **endptr, int
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_STRTOULL
|
#ifdef HAVE_STRTOULL
|
||||||
|
wxDECL_FOR_STRICT_MINGW32(long long, strtoll, (const char*, char**, int))
|
||||||
|
wxDECL_FOR_STRICT_MINGW32(unsigned long long, strtoull, (const char*, char**, int))
|
||||||
|
|
||||||
#define wxCRT_StrtollA strtoll
|
#define wxCRT_StrtollA strtoll
|
||||||
#define wxCRT_StrtoullA strtoull
|
#define wxCRT_StrtoullA strtoull
|
||||||
#endif /* HAVE_STRTOULL */
|
#endif /* HAVE_STRTOULL */
|
||||||
|
@@ -240,6 +240,8 @@
|
|||||||
return vsscanf(const_cast<char *>(str), format, ap);
|
return vsscanf(const_cast<char *>(str), format, ap);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
wxDECL_FOR_STRICT_MINGW32(int, vsscanf, (const char*, const char*, va_list));
|
||||||
|
|
||||||
#define wxCRT_VsscanfA vsscanf
|
#define wxCRT_VsscanfA vsscanf
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -255,6 +257,8 @@
|
|||||||
#ifdef wxNEED_VSWSCANF
|
#ifdef wxNEED_VSWSCANF
|
||||||
int wxCRT_VsscanfW(const wchar_t *str, const wchar_t *format, va_list ap);
|
int wxCRT_VsscanfW(const wchar_t *str, const wchar_t *format, va_list ap);
|
||||||
#else
|
#else
|
||||||
|
wxDECL_FOR_STRICT_MINGW32(int, vswscanf, (const wchar_t*, const wchar_t*, va_list));
|
||||||
|
|
||||||
#define wxCRT_VsscanfW wxVMS_USE_STD vswscanf
|
#define wxCRT_VsscanfW wxVMS_USE_STD vswscanf
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -83,6 +83,8 @@
|
|||||||
|
|
||||||
// TODO: Borland probably has _wgetcwd as well?
|
// TODO: Borland probably has _wgetcwd as well?
|
||||||
#if defined(_MSC_VER) || defined(__MINGW32__)
|
#if defined(_MSC_VER) || defined(__MINGW32__)
|
||||||
|
wxDECL_FOR_STRICT_MINGW32(wchar_t*, _wgetcwd, (wchar_t*, int))
|
||||||
|
|
||||||
#define HAVE_WGETCWD
|
#define HAVE_WGETCWD
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -182,6 +182,10 @@ int wxGetTimeZone()
|
|||||||
#if defined(WX_TIMEZONE) // If WX_TIMEZONE was defined by configure, use it.
|
#if defined(WX_TIMEZONE) // If WX_TIMEZONE was defined by configure, use it.
|
||||||
return WX_TIMEZONE;
|
return WX_TIMEZONE;
|
||||||
#elif defined(__BORLANDC__) || defined(__MINGW32__)
|
#elif defined(__BORLANDC__) || defined(__MINGW32__)
|
||||||
|
#if defined(__MINGW32_TOOLCHAIN__) && defined(__STRICT_ANSI__)
|
||||||
|
extern long _timezone;
|
||||||
|
#endif
|
||||||
|
|
||||||
return _timezone;
|
return _timezone;
|
||||||
#else // unknown platform -- assume it has timezone
|
#else // unknown platform -- assume it has timezone
|
||||||
return timezone;
|
return timezone;
|
||||||
|
Reference in New Issue
Block a user