From c754a2a98c425b4a6f1bdee6f0491034dec0292d Mon Sep 17 00:00:00 2001 From: Sami Vaarala Date: Thu, 9 Oct 2014 00:47:48 +0300 Subject: [PATCH] Variadic macros for VS2005+ --- src/duk_features.h.in | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/duk_features.h.in b/src/duk_features.h.in index c69334c5..2223a429 100644 --- a/src/duk_features.h.in +++ b/src/duk_features.h.in @@ -2414,10 +2414,15 @@ typedef FILE duk_file; #undef DUK_USE_ZERO_BUFFER_DATA #endif +#undef DUK_USE_VARIADIC_MACROS #if defined(DUK_F_C99) || (defined(DUK_F_CPP11) && defined(__GNUC__)) #define DUK_USE_VARIADIC_MACROS -#else -#undef DUK_USE_VARIADIC_MACROS +#endif +#if defined(_MSC_VER) && !defined(DUK_USE_VARIADIC_MACROS) +#if (_MSC_VER >= 1400) +/* VS2005+ should have variadic macros even when they're not C99. */ +#define DUK_USE_VARIADIC_MACROS +#endif #endif /*