* fix configure check: set DBUS_VA_COPY_FUNC correctly, and DBUS_VA_COPY_AS_ARRAY if no usable one was found
* add DBUS_VA_COPY_AS_ARRAY
* define DBUS_VA_COPY indirectly, cmakedefine plus variable does not work for me on windows, and is the wrong thing to do according to Allen. The undef seems unnecessary now, the address parsing test passes on windows, using mingw
(cherry picked from commit
e6680d78d943be4ee2d85e9d82cd8aa1350db882)
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/cmake_try_compile.c)
if(DBUS_HAVE_VA_COPY)
- SET(DBUS_VA_COPY va_copy CACHE STRING "va_copy function")
+ SET(DBUS_VA_COPY_FUNC va_copy CACHE STRING "va_copy function")
else(DBUS_HAVE_VA_COPY)
write_file("${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/cmake_try_compile.c" "#include <stdarg.h>
void f (int i, ...) {
return 0;
}
")
- try_compile(DBUS_HAVE_VA_COPY
+ try_compile(DBUS_HAVE___VA_COPY
${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/cmake_try_compile.c)
if(DBUS_HAVE___VA_COPY)
- SET(DBUS_VA_COPY __va_copy CACHE STRING "va_copy function")
+ SET(DBUS_VA_COPY_FUNC __va_copy CACHE STRING "va_copy function")
+ else(DBUS_HAVE___VA_COPY)
+ SET(DBUS_VA_COPY_AS_ARRAY "1" CACHE STRING "'va_lists' cannot be copies as values")
endif(DBUS_HAVE___VA_COPY)
endif(DBUS_HAVE_VA_COPY)
#cmakedefine DBUS_BUILD_X11 1
-#cmakedefine DBUS_VA_COPY @DBUS_VA_COPY_FUNC@
+#cmakedefine DBUS_VA_COPY_FUNC
+#if (defined DBUS_VA_COPY_FUNC)
+# define DBUS_VA_COPY @DBUS_VA_COPY_FUNC@
+#endif
+
+#cmakedefine DBUS_VA_COPY_AS_ARRAY 1
// headers
/* Define to 1 if you have dirent.h */
# define strtoull _strtoui64
typedef int mode_t;
# endif
-# ifdef DBUS_VA_COPY
-# undef DBUS_VA_COPY // DBUS_VA_COPY kills mingw's bus-test
-# endif
#endif // defined(_WIN32) || defined(_WIN64)
#ifdef interface