From 8a0ba6f5f6eacc80b07d1756aac3ff33cc9dd3bf Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 29 Jul 2009 22:03:40 +0200 Subject: [PATCH] fix the C99 variadic macro use for _libssh2_debug() George Neill pointed out that the C99 vararg marcro use was wrong, and I edited his suggested patch slightly and unified both prec99-GCC and C99 into the same macro. --- src/libssh2_priv.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/libssh2_priv.h b/src/libssh2_priv.h index 73692ef..f8c1304 100644 --- a/src/libssh2_priv.h +++ b/src/libssh2_priv.h @@ -1048,11 +1048,8 @@ struct _LIBSSH2_MAC_METHOD void _libssh2_debug(LIBSSH2_SESSION * session, int context, const char *format, ...); #else -#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) -/* C99 style */ -#define _libssh2_debug(x,y,z, __VA_ARGS__) do {} while (0) -#elif defined(__GNUC__) -/* GNU style */ +#if (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) || defined(__GNUC__) +/* C99 supported and also by older GCC */ #define _libssh2_debug(x,y,z,...) do {} while (0) #else /* no gcc and not C99, do static and hopefully inline */