]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
Use C99-style variadic macros when available.
authorDan Fandrich <dan@coneharvesters.com>
Thu, 22 Mar 2007 17:18:41 +0000 (17:18 +0000)
committerDan Fandrich <dan@coneharvesters.com>
Thu, 22 Mar 2007 17:18:41 +0000 (17:18 +0000)
lib/sendf.h

index 514cc91826fca4427de3c67e7f3ecac116224072..592da92a7ce4a6a8b83160942aeb73319f54f223 100644 (file)
@@ -29,12 +29,13 @@ void Curl_infof(struct SessionHandle *, const char *fmt, ...);
 void Curl_failf(struct SessionHandle *, const char *fmt, ...);
 
 #if defined(CURL_DISABLE_VERBOSE_STRINGS)
-#if defined(__GNUC__)
-/* This style of variable argument macros is a gcc extension */
-#define infof(x...) /*ignore*/
+#if defined(__STDC__) && defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
+/* C99 compilers support variadic macros */
+#define infof(...)
+#elif defined(__GNUC__)
+/* This style of variable argument macros is an old gcc extension */
+#define infof(x...)
 #else
-/* C99 compilers could use this if we could detect them */
-/*#define infof(...) */
 /* Cast the args to void to make them a noop, side effects notwithstanding */
 #define infof (void)
 #endif