Subject: solaris and c99

solaris and c99

From: George Neill <georgen_at_neillnet.com>
Date: Wed, 29 Jul 2009 14:10:26 -0500

All,

I am compiling libssh2 1.1 on solaris 10 with sun's branded gcc
compiler. I ran across this error when trying to build with c99
enabled.

libssh2_priv.h:1028:32: warning: __VA_ARGS__ can only appear in the
expansion of a C99 variadic macro

It appears the variadic macro is not being used correctly ... here's a
patch which should fix the issue.

from libssh2_priv.h

@@ -1025,7 +1025,7 @@
 #else
 #if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
 /* C99 style */
-#define _libssh2_debug(x,y,z, __VA_ARGS__) do {} while (0)
+#define _libssh2_debug(x,y,z, ...) do {} while (0)
 #elif defined(__GNUC__)
 /* GNU style */
 #define _libssh2_debug(x,y,z,...) do {} while (0)

Thanks much,
George.
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2009-07-29