diff --git a/build/cmake/setup.h.in b/build/cmake/setup.h.in index 36e09fc4e2..dd44a0b70d 100644 --- a/build/cmake/setup.h.in +++ b/build/cmake/setup.h.in @@ -747,12 +747,6 @@ */ #cmakedefine VA_LIST_IS_ARRAY 1 -/* - * Define if you don't want variadic macros to be used even if they are - * supported by the compiler. - */ -#cmakedefine wxNO_VARIADIC_MACROS - /* * Define if your compiler has std::wstring */ diff --git a/configure b/configure index c70d8208f4..2767e097c3 100755 --- a/configure +++ b/configure @@ -24278,11 +24278,6 @@ $as_echo "$wx_cv_type_va_list_lvalue" >&6; } fi fi -if test "$wxUSE_VARARG_MACROS" != "yes"; then - $as_echo "#define wxNO_VARIADIC_MACROS 1" >>confdefs.h - -fi - LARGEFILE_CPPFLAGS= # Check whether --enable-largefile was given. if test "${enable_largefile+set}" = set; then : diff --git a/configure.in b/configure.in index 4b8dc950e4..008cad8d3a 100644 --- a/configure.in +++ b/configure.in @@ -1717,15 +1717,6 @@ else fi fi -dnl TODO-C++11: remove this, as it won't make sense when C++11 is required -dnl don't use vararg macros if they're explicitly disabled: this is -dnl useful if the user code using the library wants to limit itself to standard -dnl C++ only (e.g. is compiled with g++ -std=c++98) -if test "$wxUSE_VARARG_MACROS" != "yes"; then - AC_DEFINE(wxNO_VARIADIC_MACROS) -fi dnl wxUSE_VARARG_MACROS == yes - - dnl check for large file support LARGEFILE_CPPFLAGS= AC_SYS_LARGEFILE diff --git a/include/wx/cpp.h b/include/wx/cpp.h index 2f2b277647..d6873e5b30 100644 --- a/include/wx/cpp.h +++ b/include/wx/cpp.h @@ -123,23 +123,6 @@ #endif /* __WXFUNCTION__ already defined */ -/* Auto-detect variadic macros support unless explicitly disabled. */ -#if !defined(HAVE_VARIADIC_MACROS) && !defined(wxNO_VARIADIC_MACROS) - /* Any C99 or C++11 compiler should have them. */ - #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || \ - (defined(__cplusplus) && __cplusplus >= 201103L) - #define HAVE_VARIADIC_MACROS 1 - #elif defined(__GNUC__) - #define HAVE_VARIADIC_MACROS 1 - #elif wxCHECK_VISUALC_VERSION(8) - #define HAVE_VARIADIC_MACROS 1 - #endif -#endif /* !HAVE_VARIADIC_MACROS */ - - - -#ifdef HAVE_VARIADIC_MACROS - /* wxCALL_FOR_EACH(what, ...) calls the macro from its first argument, what(pos, x), for every remaining argument 'x', with 'pos' being its 1-based index in @@ -185,9 +168,5 @@ #define wxCALL_FOR_EACH(what, ...) \ wxCALL_FOR_EACH_(wxCALL_FOR_EACH_NARG(__VA_ARGS__), (what, __VA_ARGS__)) -#else - #define wxCALL_FOR_EACH Error_wx_CALL_FOR_EACH_requires_variadic_macros_support -#endif /* HAVE_VARIADIC_MACROS */ - #endif /* _WX_CPP_H_ */ diff --git a/include/wx/log.h b/include/wx/log.h index 9ab02d6c5e..60e7a73cdc 100644 --- a/include/wx/log.h +++ b/include/wx/log.h @@ -1336,12 +1336,7 @@ inline void wxLogNop() { } #define wxVLogDebug(format, argptr) wxDO_LOGV(Debug, format, argptr) #else // !wxUSE_LOG_DEBUG #define wxVLogDebug(fmt, valist) wxLogNop() - - #ifdef HAVE_VARIADIC_MACROS - #define wxLogDebug(fmt, ...) wxLogNop() - #else // !HAVE_VARIADIC_MACROS - WX_DEFINE_VARARG_FUNC_NOP(wxLogDebug, 1, (const wxFormatString&)) - #endif + #define wxLogDebug(fmt, ...) wxLogNop() #endif // wxUSE_LOG_DEBUG/!wxUSE_LOG_DEBUG #if wxUSE_LOG_TRACE @@ -1349,12 +1344,7 @@ inline void wxLogNop() { } #define wxVLogTrace wxDO_LOG_IF_ENABLED_WITH_FUNC(Trace, LogVTrace) #else // !wxUSE_LOG_TRACE #define wxVLogTrace(mask, fmt, valist) wxLogNop() - - #ifdef HAVE_VARIADIC_MACROS - #define wxLogTrace(mask, fmt, ...) wxLogNop() - #else // !HAVE_VARIADIC_MACROS - WX_DEFINE_VARARG_FUNC_NOP(wxLogTrace, 2, (const wxString&, const wxFormatString&)) - #endif // HAVE_VARIADIC_MACROS/!HAVE_VARIADIC_MACROS + #define wxLogTrace(mask, fmt, ...) wxLogNop() #endif // wxUSE_LOG_TRACE/!wxUSE_LOG_TRACE // wxLogFatalError helper: show the (fatal) error to the user in a safe way, diff --git a/include/wx/testing.h b/include/wx/testing.h index 44417af949..7cbcb8bbda 100644 --- a/include/wx/testing.h +++ b/include/wx/testing.h @@ -515,8 +515,6 @@ private: wxExpectModal<> for your dialog type and implement its OnInvoked() method. */ -#ifdef HAVE_VARIADIC_MACROS - #define wxTEST_DIALOG(codeToRun, ...) \ { \ wxTEST_DIALOG_HOOK_CLASS wx_hook(__FILE__, __LINE__, __WXFUNCTION__); \ @@ -524,7 +522,6 @@ private: codeToRun; \ wx_hook.CheckUnmetExpectations(); \ } -#endif /* HAVE_VARIADIC_MACROS */ #endif // !WXBUILDING diff --git a/setup.h.in b/setup.h.in index 7cbe89b7ee..365c3c7d3b 100644 --- a/setup.h.in +++ b/setup.h.in @@ -747,12 +747,6 @@ */ #undef VA_LIST_IS_ARRAY -/* - * Define if you don't want variadic macros to be used even if they are - * supported by the compiler. - */ -#undef wxNO_VARIADIC_MACROS - /* * Define if your compiler has std::wstring */ diff --git a/src/common/markupparser.cpp b/src/common/markupparser.cpp index 257d106421..4c5f6042d8 100644 --- a/src/common/markupparser.cpp +++ b/src/common/markupparser.cpp @@ -279,7 +279,7 @@ bool wxMarkupParser::Parse(const wxString& text) // and doesn't need to be defined if they're not compiled // at all (it actually would result in unused variable // messages in this case). -#if wxUSE_LOG_DEBUG || !defined(HAVE_VARIADIC_MACROS) +#if wxUSE_LOG_DEBUG // Remember the tag starting position for the error // messages. const size_t pos = it - text.begin(); diff --git a/tests/controls/dialogtest.cpp b/tests/controls/dialogtest.cpp index 75e85c02cc..cdd04b6489 100644 --- a/tests/controls/dialogtest.cpp +++ b/tests/controls/dialogtest.cpp @@ -11,8 +11,6 @@ #include "wx/testing.h" -#ifdef HAVE_VARIADIC_MACROS - #include "wx/msgdlg.h" #include "wx/filedlg.h" @@ -172,5 +170,3 @@ void ModalDialogsTestCase::InitDialog() dlg.ShowModal(); CPPUNIT_ASSERT( dlg.WasModal() ); } - -#endif // HAVE_VARIADIC_MACROS diff --git a/tests/misc/misctests.cpp b/tests/misc/misctests.cpp index ddd7063a69..3571514aa0 100644 --- a/tests/misc/misctests.cpp +++ b/tests/misc/misctests.cpp @@ -39,9 +39,7 @@ public: private: CPPUNIT_TEST_SUITE( MiscTestCase ); CPPUNIT_TEST( Assert ); -#ifdef HAVE_VARIADIC_MACROS CPPUNIT_TEST( CallForEach ); -#endif // HAVE_VARIADIC_MACROS CPPUNIT_TEST( Delete ); CPPUNIT_TEST( StaticCast ); CPPUNIT_TEST_SUITE_END(); @@ -83,7 +81,6 @@ void MiscTestCase::Assert() wxSetAssertHandler(oldHandler); } -#ifdef HAVE_VARIADIC_MACROS void MiscTestCase::CallForEach() { #define MY_MACRO(pos, str) s += str; @@ -95,7 +92,6 @@ void MiscTestCase::CallForEach() #undef MY_MACRO } -#endif // HAVE_VARIADIC_MACROS void MiscTestCase::Delete() {