mirror of
https://github.com/libssh2/libssh2.git
synced 2025-11-06 20:49:29 +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:
@@ -1048,11 +1048,8 @@ struct _LIBSSH2_MAC_METHOD
|
|||||||
void _libssh2_debug(LIBSSH2_SESSION * session, int context, const char *format,
|
void _libssh2_debug(LIBSSH2_SESSION * session, int context, const char *format,
|
||||||
...);
|
...);
|
||||||
#else
|
#else
|
||||||
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
|
#if (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) || defined(__GNUC__)
|
||||||
/* C99 style */
|
/* C99 supported and also by older GCC */
|
||||||
#define _libssh2_debug(x,y,z, __VA_ARGS__) do {} while (0)
|
|
||||||
#elif defined(__GNUC__)
|
|
||||||
/* GNU style */
|
|
||||||
#define _libssh2_debug(x,y,z,...) do {} while (0)
|
#define _libssh2_debug(x,y,z,...) do {} while (0)
|
||||||
#else
|
#else
|
||||||
/* no gcc and not C99, do static and hopefully inline */
|
/* no gcc and not C99, do static and hopefully inline */
|
||||||
|
|||||||
Reference in New Issue
Block a user