mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2025-12-27 13:50:10 +01:00
with msvc, replace va_copy by assigning the va_lists (cherry picked from commit 42d613fc9284afaa9543549be26f32e503a58348)
This commit is contained in:
parent
0617102b4b
commit
4806504180
2 changed files with 6 additions and 1 deletions
|
|
@ -86,6 +86,9 @@ endif(SIZEOF_INT EQUAL 2)
|
|||
find_program(DOXYGEN doxygen)
|
||||
find_program(XMLTO xmlto)
|
||||
|
||||
if(MSVC)
|
||||
SET(DBUS_VA_COPY_FUNC "_DBUS_VA_COPY_ASSIGN";)
|
||||
else(MSVC)
|
||||
write_file("${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/cmake_try_compile.c" "#include <stdarg.h>
|
||||
void f (int i, ...) {
|
||||
va_list args1, args2;
|
||||
|
|
@ -130,7 +133,7 @@ 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)
|
||||
|
||||
endif(MSVC) # _not_ MSVC
|
||||
#### Abstract sockets
|
||||
|
||||
if (DBUS_ENABLE_ABSTRACT_SOCKETS)
|
||||
|
|
|
|||
|
|
@ -78,6 +78,8 @@
|
|||
|
||||
#cmakedefine DBUS_BUILD_X11 1
|
||||
|
||||
#define _DBUS_VA_COPY_ASSIGN(a1,a2) { a1 = a2; }
|
||||
|
||||
#cmakedefine DBUS_VA_COPY_FUNC
|
||||
#if (defined DBUS_VA_COPY_FUNC)
|
||||
# define DBUS_VA_COPY @DBUS_VA_COPY_FUNC@
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue