aboutsummaryrefslogtreecommitdiff
path: root/lib/sendf.h
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2007-03-23 12:01:19 +0000
committerYang Tse <yangsita@gmail.com>2007-03-23 12:01:19 +0000
commitf9eb61e90a9665dcf33bc57b77715798f339e0bb (patch)
tree65ee2d63484b599c99a5d83b82591b8b3c081373 /lib/sendf.h
parent34afb0b2576c6220b16c1b4479fd5b9015a97113 (diff)
fix compiler warning: empty body in an if/else-statement
Diffstat (limited to 'lib/sendf.h')
-rw-r--r--lib/sendf.h33
1 files changed, 24 insertions, 9 deletions
diff --git a/lib/sendf.h b/lib/sendf.h
index 592da92a7..1a5d033fd 100644
--- a/lib/sendf.h
+++ b/lib/sendf.h
@@ -23,25 +23,40 @@
* $Id$
***************************************************************************/
+#include "setup.h"
+
CURLcode Curl_sendf(curl_socket_t sockfd, struct connectdata *,
const char *fmt, ...);
void Curl_infof(struct SessionHandle *, const char *fmt, ...);
void Curl_failf(struct SessionHandle *, const char *fmt, ...);
#if defined(CURL_DISABLE_VERBOSE_STRINGS)
-#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...)
+
+#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)
+#define infof(x...) do { } while (0)
#else
-/* Cast the args to void to make them a noop, side effects notwithstanding */
#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 Curl_infof
+#define infof (void)
+#endif
+
#endif
+
+#endif /* CURL_DISABLE_VERBOSE_STRINGS */
+
#define failf Curl_failf
#define CLIENTWRITE_BODY 1
@@ -70,4 +85,4 @@ int Curl_debug(struct SessionHandle *handle, curl_infotype type,
struct connectdata *conn);
-#endif
+#endif /* __SENDF_H */