From dd404fdd77a57cfdbb7072a549adf2aaaa34bbae Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 9 Oct 2022 23:45:57 +0200 Subject: [PATCH] Remove HAVE_STRTOULL and HAVE_WCSTOULL We can assume these functions are always available now as they are part of C++11. --- build/cmake/setup.h.in | 6 ------ include/wx/osx/config_xcode.h | 1 - include/wx/wxcrtbase.h | 25 ++++++------------------- setup.h.in | 6 ------ setup.h_vms | 6 ------ 5 files changed, 6 insertions(+), 38 deletions(-) diff --git a/build/cmake/setup.h.in b/build/cmake/setup.h.in index 72e69714d0..2cad3ee947 100644 --- a/build/cmake/setup.h.in +++ b/build/cmake/setup.h.in @@ -985,9 +985,6 @@ /* define if you have statvfs function */ #cmakedefine HAVE_STATVFS 1 -/* Define if you have strtoull() and strtoll() */ -#cmakedefine HAVE_STRTOULL 1 - /* Define if you have all functions to set thread priority */ #cmakedefine HAVE_THREAD_PRIORITY_FUNCTIONS 1 @@ -1029,9 +1026,6 @@ /* Define if you have wcsnlen() function */ #cmakedefine HAVE_WCSNLEN 1 -/* Define if you have wcstoull() and wcstoll() */ -#cmakedefine HAVE_WCSTOULL 1 - /* The number of bytes in a wchar_t. */ @SIZEOF_WCHAR_T_CODE@ diff --git a/include/wx/osx/config_xcode.h b/include/wx/osx/config_xcode.h index 19cbd53845..75f31a2c8f 100644 --- a/include/wx/osx/config_xcode.h +++ b/include/wx/osx/config_xcode.h @@ -58,7 +58,6 @@ #define HAVE_STRNLEN 1 #define HAVE_STRPTIME 1 #define HAVE_STRPTIME_DECL 1 -#define HAVE_STRTOULL 1 #define HAVE_THREAD_PRIORITY_FUNCTIONS 1 #define HAVE_VSNPRINTF 1 #define HAVE_VSSCANF 1 diff --git a/include/wx/wxcrtbase.h b/include/wx/wxcrtbase.h index 23c89f1e69..11c3569bcc 100644 --- a/include/wx/wxcrtbase.h +++ b/include/wx/wxcrtbase.h @@ -179,26 +179,13 @@ extern unsigned long android_wcstoul(const wchar_t *nptr, wchar_t **endptr, int #define wxCRT_StrtollW _wcstoi64 #define wxCRT_StrtoullW _wcstoui64 #else - /* Both of these functions are implemented in C++11 compilers */ - #ifndef HAVE_STRTOULL - #define HAVE_STRTOULL - #endif - #ifndef HAVE_WCSTOULL - #define HAVE_WCSTOULL - #endif + wxDECL_FOR_STRICT_MINGW32(long long, strtoll, (const char*, char**, int)) + wxDECL_FOR_STRICT_MINGW32(unsigned long long, strtoull, (const char*, char**, int)) - #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_StrtoullA strtoull - #endif /* HAVE_STRTOULL */ - #ifdef HAVE_WCSTOULL - /* assume that we have wcstoull(), which is also C99, too */ - #define wxCRT_StrtollW wcstoll - #define wxCRT_StrtoullW wcstoull - #endif /* HAVE_WCSTOULL */ + #define wxCRT_StrtollA strtoll + #define wxCRT_StrtoullA strtoull + #define wxCRT_StrtollW wcstoll + #define wxCRT_StrtoullW wcstoull #endif /* diff --git a/setup.h.in b/setup.h.in index 2e4c01e150..643f6260c3 100644 --- a/setup.h.in +++ b/setup.h.in @@ -985,9 +985,6 @@ /* define if you have statvfs function */ #undef HAVE_STATVFS -/* Define if you have strtoull() and strtoll() */ -#undef HAVE_STRTOULL - /* Define if you have all functions to set thread priority */ #undef HAVE_THREAD_PRIORITY_FUNCTIONS @@ -1029,9 +1026,6 @@ /* Define if you have wcsnlen() function */ #undef HAVE_WCSNLEN -/* Define if you have wcstoull() and wcstoll() */ -#undef HAVE_WCSTOULL - /* The number of bytes in a wchar_t. */ #undef SIZEOF_WCHAR_T diff --git a/setup.h_vms b/setup.h_vms index d582957de9..1f761fa82d 100644 --- a/setup.h_vms +++ b/setup.h_vms @@ -1098,9 +1098,6 @@ typedef pid_t GPid; /* define if you have statvfs function */ #undef HAVE_STATVFS -/* Define if you have strtoull() and strtoll() */ -#define HAVE_STRTOULL 1 - /* Define if you have all functions to set thread priority */ #define HAVE_THREAD_PRIORITY_FUNCTIONS 1 @@ -1147,9 +1144,6 @@ typedef pid_t GPid; /* Define if you have wcsnlen() function */ #undef HAVE_WCSNLEN -/* Define if you have wcstoull() and wcstoll() */ -#undef HAVE_WCSTOULL - /* The number of bytes in a wchar_t. */ #define SIZEOF_WCHAR_T 4