aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDan Fandrich <dan@coneharvesters.com>2007-03-22 17:18:41 +0000
committerDan Fandrich <dan@coneharvesters.com>2007-03-22 17:18:41 +0000
commit5eba84eed3beab88a82e8d90d0bb876e18cad7de (patch)
tree8551fe537f3ad22e4fef76d2e77c5b770ec164a0 /lib
parent4fb483012c2988f97164ed4f069f0f0a59c7171e (diff)
Use C99-style variadic macros when available.
Diffstat (limited to 'lib')
-rw-r--r--lib/sendf.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/sendf.h b/lib/sendf.h
index 514cc9182..592da92a7 100644
--- a/lib/sendf.h
+++ b/lib/sendf.h
@@ -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