[cmake-commits] hoffman committed CMakeLists.txt 1.17 1.18
xmlrpc_config.h.in 1.7 1.8 xmlrpc_data.c 1.5 1.6
cmake-commits at cmake.org
cmake-commits at cmake.org
Fri Nov 16 14:06:42 EST 2007
Update of /cvsroot/CMake/CMake/Utilities/cmxmlrpc
In directory public:/mounts/ram/cvs-serv17437
Modified Files:
CMakeLists.txt xmlrpc_config.h.in xmlrpc_data.c
Log Message:
ENH: add a try compile for va_copy
Index: xmlrpc_config.h.in
===================================================================
RCS file: /cvsroot/CMake/CMake/Utilities/cmxmlrpc/xmlrpc_config.h.in,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- xmlrpc_config.h.in 19 Apr 2005 13:52:24 -0000 1.7
+++ xmlrpc_config.h.in 16 Nov 2007 19:06:40 -0000 1.8
@@ -22,6 +22,8 @@
#define VA_LIST_IS_ARRAY @VA_LIST_IS_ARRAY_DEFINE@
+#cmakedefine HAS_VA_COPY @HAS_VA_COPY@
+
#define HAVE_LIBWWW_SSL @HAVE_LIBWWW_SSL_DEFINE@
#define ATTR_UNUSED @ATTR_UNUSED@
Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Utilities/cmxmlrpc/CMakeLists.txt,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- CMakeLists.txt 1 Aug 2006 15:38:42 -0000 1.17
+++ CMakeLists.txt 16 Nov 2007 19:06:40 -0000 1.18
@@ -44,6 +44,8 @@
SET(HEADER_INCLUDES "${CURRENT_INCLUDES}")
TRY_COMPILE_FROM_SOURCE("va_list list1, list2; list1 = list2"
VA_LIST_ISNOT_ARRAY_DEFINE)
+TRY_COMPILE_FROM_SOURCE("va_list list1, list2; va_copy(list1, list2);"
+ HAS_VA_COPY)
SET(VA_LIST_IS_ARRAY_DEFINE 0)
IF(NOT VA_LIST_ISNOT_ARRAY_DEFINE)
SET(VA_LIST_IS_ARRAY_DEFINE 1)
Index: xmlrpc_data.c
===================================================================
RCS file: /cvsroot/CMake/CMake/Utilities/cmxmlrpc/xmlrpc_data.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- xmlrpc_data.c 30 Mar 2006 18:49:56 -0000 1.5
+++ xmlrpc_data.c 16 Nov 2007 19:06:40 -0000 1.6
@@ -24,10 +24,14 @@
** tricky fashions. We don't why Python does this, but since we're
** abusing our va_list objects in a similar fashion, we'll copy them
** too. */
-#if VA_LIST_IS_ARRAY
-#define VA_LIST_COPY(dest,src) memcpy((dest), (src), sizeof(va_list))
+#ifdef HAS_VA_COPY
+# define VA_LIST_COPY(dest,src) va_copy((dest), (src))
#else
-#define VA_LIST_COPY(dest,src) ((dest) = (src))
+# if VA_LIST_IS_ARRAY
+# define VA_LIST_COPY(dest,src) memcpy((dest), (src), sizeof(va_list))
+# else
+# define VA_LIST_COPY(dest,src) ((dest) = (src))
+# endif
#endif
More information about the Cmake-commits
mailing list