1
0
mirror of https://github.com/libssh2/libssh2.git synced 2025-11-02 10:53:16 +03:00

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.
This commit is contained in:
Daniel Stenberg
2009-07-29 22:03:40 +02:00
parent 143720e922
commit 8a0ba6f5f6

View File

@@ -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 */