]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
Platforms that lack autotools support should define HAVE_VARIADIC_MACROS_C99
authorYang Tse <yangsita@gmail.com>
Tue, 27 Mar 2007 04:17:26 +0000 (04:17 +0000)
committerYang Tse <yangsita@gmail.com>
Tue, 27 Mar 2007 04:17:26 +0000 (04:17 +0000)
and/or HAVE_VARIADIC_MACROS_GCC for specific compiler versions that support
variadic macros with C99 style and/or old gcc style in their specific config.h
file.

If previous definitions are not done, even when aplicable, and --disable-verbose
is used, the fallback (void) method will be used to define infof, avoiding the
inclusion of unwanted strings in the resulting library/executable.

lib/sendf.h

index 2c6db90b46ac8d8b4a0bfe2d4cecc58c7ea167f5..f8808f6627fe4b250644ae02300b58d7e7c032a9 100644 (file)
@@ -32,9 +32,6 @@ void Curl_failf(struct SessionHandle *, const char *fmt, ...);
 
 #if defined(CURL_DISABLE_VERBOSE_STRINGS)
 
-#if defined(HAVE_CONFIG_H) || \
-    defined(HAVE_VARIADIC_MACROS_C99) || defined(HAVE_VARIADIC_MACROS_GCC)
-
 #if defined(HAVE_VARIADIC_MACROS_C99)
 #define infof(...)  do { } while (0)
 #elif defined(HAVE_VARIADIC_MACROS_GCC)
@@ -43,18 +40,6 @@ void Curl_failf(struct SessionHandle *, const char *fmt, ...);
 #define infof (void)
 #endif
 
-#else
-
-#if defined(__STDC__) && defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
-#define infof(...)  do { } while (0)
-#elif defined(__GNUC__)
-#define infof(x...)  do { } while (0)
-#else
-#define infof (void)
-#endif
-
-#endif
-
 #else /* CURL_DISABLE_VERBOSE_STRINGS */
 
 #define infof Curl_infof