From: Rcmaniac25 Date: Fri, 30 Jun 2017 23:22:06 +0000 (+0000) Subject: Fixed bug where, under c89 mode, callback macros wouldn't work X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=freeglut;a=commitdiff_plain;h=ef1201710c3037a311d872583f203e08f8d99240 Fixed bug where, under c89 mode, callback macros wouldn't work Under c89 (only applies to GCC-like compilers), the variadic macro version would be used and compilation would fail. git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1818 7f0cb862-5218-0410-a997-914c9d46530a --- diff --git a/src/fg_callback_macros.h b/src/fg_callback_macros.h index 76c7227..0c574d7 100644 --- a/src/fg_callback_macros.h +++ b/src/fg_callback_macros.h @@ -33,10 +33,10 @@ * FG_COMPILER_SUPPORTS_VA_ARGS: if the compiler supports variadic macros */ -/* What supports variadic macros based off Wikipedia article on it */ -#if (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) || \ - (defined(__GNUC__) && (__GNUC__ >= 3)) || \ - (defined(__clang__)) || \ +/* What supports variadic macros based off Wikipedia article on it (GCC-like must support C99 or higher to use variadic macros) */ +#if (((defined(__GNUC__) && (__GNUC__ >= 3)) || \ + (defined(__clang__))) && \ + (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L))) || \ (defined(_MSC_VER) && (_MSC_VER >= 1400)) || \ (defined(__BORLANDC__) && (__BORLANDC__ >= 0x570)) || \ (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x530))