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.
Этот коммит содержится в:
родитель
143720e922
Коммит
8a0ba6f5f6
@ -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 */
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user