diff --git a/build/cmake/setup.h.in b/build/cmake/setup.h.in index 649c41e1fe..adcc0aad96 100644 --- a/build/cmake/setup.h.in +++ b/build/cmake/setup.h.in @@ -743,11 +743,6 @@ */ #cmakedefine VA_LIST_IS_ARRAY 1 -/* - * Define if the compiler supports variadic macros - */ -#cmakedefine HAVE_VARIADIC_MACROS 1 - /* * Define if you don't want variadic macros to be used even if they are * supported by the compiler. diff --git a/configure b/configure index dce221851c..2bc0107cfb 100755 --- a/configure +++ b/configure @@ -19954,63 +19954,7 @@ $as_echo "$wx_cv_type_va_list_lvalue" >&6; } fi fi -if test "$wxUSE_VARARG_MACROS" = "yes"; then - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports variadic macros" >&5 -$as_echo_n "checking whether the compiler supports variadic macros... " >&6; } -if ${wx_cv_have_variadic_macros+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - - #include - #define test(fmt, ...) printf(fmt, __VA_ARGS__) - -int -main () -{ - - test("%s %d %p", "test", 1, 0); - - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - wx_cv_have_variadic_macros=yes -else - wx_cv_have_variadic_macros=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $wx_cv_have_variadic_macros" >&5 -$as_echo "$wx_cv_have_variadic_macros" >&6; } - -if test $wx_cv_have_variadic_macros = "yes"; then - $as_echo "#define HAVE_VARIADIC_MACROS 1" >>confdefs.h - -fi - -else +if test "$wxUSE_VARARG_MACROS" != "yes"; then $as_echo "#define wxNO_VARIADIC_MACROS 1" >>confdefs.h fi diff --git a/configure.in b/configure.in index e859f6f8ef..f54c521523 100644 --- a/configure.in +++ b/configure.in @@ -1722,41 +1722,11 @@ else fi fi -dnl don't check for vararg macros if they're explicitly disabled: this is +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 - -dnl Check if variadic macros (C99 feature) are supported: -AC_CACHE_CHECK( - [whether the compiler supports variadic macros], - [wx_cv_have_variadic_macros], - [ - dnl C compiler might support variadic macros when C++ one doesn't - dnl (happens with gcc/g++ 2.95.4), so must use C++ one explicitly - AC_LANG_PUSH(C++) - AC_COMPILE_IFELSE([ - AC_LANG_PROGRAM( - [ - #include - #define test(fmt, ...) printf(fmt, __VA_ARGS__) - ], - [ - test("%s %d %p", "test", 1, 0); - ] - )], - [wx_cv_have_variadic_macros=yes], - [wx_cv_have_variadic_macros=no] - ) - AC_LANG_POP() - ] -) - -if test $wx_cv_have_variadic_macros = "yes"; then - AC_DEFINE(HAVE_VARIADIC_MACROS) -fi - -else +if test "$wxUSE_VARARG_MACROS" != "yes"; then AC_DEFINE(wxNO_VARIADIC_MACROS) fi dnl wxUSE_VARARG_MACROS == yes diff --git a/include/wx/osx/config_xcode.h b/include/wx/osx/config_xcode.h index 2501ce773e..c12b2d343b 100644 --- a/include/wx/osx/config_xcode.h +++ b/include/wx/osx/config_xcode.h @@ -22,7 +22,6 @@ #define wx_USE_NANOX 0 #define HAVE_VA_COPY 1 -#define HAVE_VARIADIC_MACROS 1 #define HAVE_STD_WSTRING 1 #if __GNUC__ > 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ >= 2 ) #if !defined(__has_include) diff --git a/setup.h.in b/setup.h.in index 89aac7ba68..6475c6b969 100644 --- a/setup.h.in +++ b/setup.h.in @@ -743,11 +743,6 @@ */ #undef VA_LIST_IS_ARRAY -/* - * Define if the compiler supports variadic macros - */ -#undef HAVE_VARIADIC_MACROS - /* * Define if you don't want variadic macros to be used even if they are * supported by the compiler. diff --git a/setup.h_vms b/setup.h_vms index 6ecbeb5a02..8fa7e8c142 100644 --- a/setup.h_vms +++ b/setup.h_vms @@ -801,11 +801,6 @@ typedef pid_t GPid; */ #undef VA_LIST_IS_ARRAY -/* - * Define if the compiler supports variadic macros - */ -#undef HAVE_VARIADIC_MACROS - #if defined(__NAMESPACE_STD) && !defined(__NAMESPACE_STD_ONLY) /* * Define if your compiler has std::wstring