67 lines
1.7 KiB
Plaintext
67 lines
1.7 KiB
Plaintext
From bd638f1155b9dd75d6378d894b162f1507c0c37a Mon Sep 17 00:00:00 2001
|
|
From: Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
|
|
Date: Mon, 18 Sep 2006 19:51:07 +0200
|
|
Subject: [PATCH] added VA_LIST_IS_ARRAY check
|
|
|
|
---
|
|
CMakeLists.txt | 13 +++++++++++++
|
|
cmake/va-list-is-array.c | 9 +++++++++
|
|
xmlrpc_config.h.cmake | 3 +++
|
|
3 files changed, 25 insertions(+), 0 deletions(-)
|
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index a6b76b0..93839a0 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -156,6 +156,19 @@ try_compile(HAVE_ATTR_UNUSED
|
|
${xmlrpc-c_SOURCE_DIR}/cmake/try-attr.cc
|
|
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=-DCMAKE_TEST_ATTR=__unused__)
|
|
|
|
+try_compile(VA_LIST_IS_NOT_ARRAY
|
|
+ ${CMAKE_BINARY_DIR}/
|
|
+ ${xmlrpc-c_SOURCE_DIR}/cmake/va-list-is-array.c)
|
|
+
|
|
+if(VA_LIST_IS_NOT_ARRAY)
|
|
+ set(VA_LIST_IS_ARRAY 0)
|
|
+ message(STATUS "va_list is not an array")
|
|
+else(VA_LIST_IS_NOT_ARRAY)
|
|
+ set(VA_LIST_IS_ARRAY 1)
|
|
+ message(STATUS "va_list is an array")
|
|
+endif(VA_LIST_IS_NOT_ARRAY)
|
|
+
|
|
+
|
|
if(HAVE_ATTR_UNUSED)
|
|
set(ATTR_UNUSED "__attribute__((__unused__))")
|
|
endif(HAVE_ATTR_UNUSED)
|
|
diff --git a/cmake/va-list-is-array.c b/cmake/va-list-is-array.c
|
|
new file mode 100644
|
|
index 0000000..1b9e397
|
|
--- /dev/null
|
|
+++ b/cmake/va-list-is-array.c
|
|
@@ -0,0 +1,9 @@
|
|
+#include <stdarg.h>
|
|
+
|
|
+void foo()
|
|
+{
|
|
+ va_list list1, list2;
|
|
+ //list1 = list2;
|
|
+}
|
|
+
|
|
+int main() {}
|
|
diff --git a/xmlrpc_config.h.cmake b/xmlrpc_config.h.cmake
|
|
index 478c252..8f364dd 100644
|
|
--- a/xmlrpc_config.h.cmake
|
|
+++ b/xmlrpc_config.h.cmake
|
|
@@ -1,5 +1,8 @@
|
|
+/* -*- c -*- */
|
|
+
|
|
#ifndef H_XMLRPC_C_CONFIG_H
|
|
|
|
+#cmakedefine VA_LIST_IS_ARRAY
|
|
#cmakedefine HAVE_WCHAR_H
|
|
#cmakedefine HAVE_SETENV
|
|
#define HAVE_SYS_IOCTL_H 0@HAVE_SYS_IOCTL_H@
|
|
--
|
|
1.4.2
|
|
|