You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by pi...@apache.org on 2006/11/19 09:20:16 UTC

svn commit: r476767 - in /webservices/axis2/trunk/c: configure.ac util/include/axis2_log.h

Author: pini
Date: Sun Nov 19 00:20:15 2006
New Revision: 476767

URL: http://svn.apache.org/viewvc?view=rev&rev=476767
Log:
Fixing jira issue 157

Modified:
    webservices/axis2/trunk/c/configure.ac
    webservices/axis2/trunk/c/util/include/axis2_log.h

Modified: webservices/axis2/trunk/c/configure.ac
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/configure.ac?view=diff&rev=476767&r1=476766&r2=476767
==============================================================================
--- webservices/axis2/trunk/c/configure.ac (original)
+++ webservices/axis2/trunk/c/configure.ac Sun Nov 19 00:20:15 2006
@@ -18,6 +18,31 @@
 AC_PROG_MAKE_SET
 
 
+dnl check for flavours of varargs macros (test from GLib)
+AC_MSG_CHECKING(for ISO C99 varargs macros in C)
+AC_TRY_COMPILE([],[
+int a(int p1, int p2, int p3);
+#define call_a(...) a(1,__VA_ARGS__)
+call_a(2,3);
+],axis2c_have_iso_c_varargs=yes,axis2c_have_iso_c_varargs=no)
+AC_MSG_RESULT($axis2c_have_iso_c_varargs)
+
+AC_MSG_CHECKING(for GNUC varargs macros)
+AC_TRY_COMPILE([],[
+int a(int p1, int p2, int p3);
+#define call_a(params...) a(1,params)
+call_a(2,3);
+],axis2c_have_gnuc_varargs=yes,axis2c_have_gnuc_varargs=no)
+AC_MSG_RESULT($axis2c_have_gnuc_varargs)
+
+dnl Output varargs tests
+if test x$axis2c_have_iso_c_varargs = xyes; then
+    AC_DEFINE(HAVE_ISO_VARARGS,1,[Have ISO C99 varargs macros])
+fi
+if test x$axis2c_have_gnuc_varargs = xyes; then
+    AC_DEFINE(HAVE_GNUC_VARARGS,1,[Have GNU-style varargs macros])
+fi
+
 dnl Checks for libraries.
 AC_CHECK_LIB(dl, dlopen)
 AC_CHECK_LIB(z, inflate)
@@ -211,7 +236,6 @@
   TESTDIR=""
 )
 
-dnl AC_CHECK_LIB(cutest, CuTestInit, [], [TESTDIR=""])
 
 AC_MSG_CHECKING(whether to enable trace)
 AC_ARG_ENABLE(trace, [  --enable-trace    enable trace. default=no],

Modified: webservices/axis2/trunk/c/util/include/axis2_log.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/include/axis2_log.h?view=diff&rev=476767&r1=476766&r2=476767
==============================================================================
--- webservices/axis2/trunk/c/util/include/axis2_log.h (original)
+++ webservices/axis2/trunk/c/util/include/axis2_log.h Sun Nov 19 00:20:15 2006
@@ -171,11 +171,15 @@
 #ifdef AXIS2_TRACE
 #define AXIS2_LOG_TRACE axis2_log_impl_log_trace
 #else
-  #ifdef WIN32
-  #define AXIS2_LOG_TRACE axis2_log_impl_log_trace
-  #else
-  #define AXIS2_LOG_TRACE(params, args ...)
-  #endif
+# ifdef WIN32
+#  define AXIS2_LOG_TRACE axis2_log_impl_log_trace
+# elif defined HAVE_GNUC_VARARGS
+#  define AXIS2_LOG_TRACE(params, args ...)
+# elif defined HAVE_ISO_VARARGS
+#  define AXIS2_LOG_TRACE(params, ...)
+# else
+#  define AXIS2_LOG_TRACE axis2_log_impl_log_trace
+# endif
 #endif
 
 /** @} */



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org