#endif /* __WXFUNCTION__ already defined */
-#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || \
- (defined(__cplusplus) && __cplusplus >= 201103L)
- #define wxHAS_VARIADIC_MACROS
-#elif defined(__GNUC__) && __GNUC__ >= 3
- #define wxHAS_VARIADIC_MACROS
-#elif defined(_MSC_VER) && _MSC_VER >= 1400
- #define wxHAS_VARIADIC_MACROS
-#endif
+/* 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
+ #elif defined(__GNUC__) && __GNUC__ >= 3
+ #define HAVE_VARIADIC_MACROS
+ #elif wxCHECK_VISUALC_VERSION(8)
+ #define HAVE_VARIADIC_MACROS
+ #elif wxCHECK_WATCOM_VERSION(1,2)
+ #define HAVE_VARIADIC_MACROS
+ #endif
+#endif /* !HAVE_VARIADIC_MACROS */
+
+
-#ifdef wxHAS_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
#else
#define wxCALL_FOR_EACH Error_wx_CALL_FOR_EACH_requires_variadic_macros_support
-#endif /* wxHAS_VARIADIC_MACROS */
+#endif /* HAVE_VARIADIC_MACROS */
#endif /* _WX_CPP_H_ */
#endif /* va_copy/!va_copy */
#endif /* wxVaCopy */
-#ifndef HAVE_VARIADIC_MACROS
- #if wxCHECK_WATCOM_VERSION(1,2)
- #define HAVE_VARIADIC_MACROS
- #endif
-
- #if wxCHECK_VISUALC_VERSION(9)
- #define HAVE_VARIADIC_MACROS
- #endif
-#endif /* HAVE_VARIADIC_MACROS */
-
-
#ifndef HAVE_WOSTREAM
/*
Mingw <= 3.4 and all versions of Cygwin don't have std::wostream
wxExpectModal<> for your dialog type and implement its OnInvoked()
method.
*/
-#ifdef wxHAS_VARIADIC_MACROS
+#ifdef HAVE_VARIADIC_MACROS
#define wxTEST_DIALOG(codeToRun, ...) \
{ \
wxTEST_DIALOG_HOOK_CLASS wx_hook; \
codeToRun; \
wx_hook.CheckUnmetExpectations(); \
}
-#endif /* wxHAS_VARIADIC_MACROS */
+#endif /* HAVE_VARIADIC_MACROS */
#endif // !WXBUILDING
*/
#undef HAVE_VARIADIC_MACROS
+/*
+ * 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
*/