]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
Define DBUS_COMPILATION externally for all tests that use internal stuff
authorSimon McVittie <simon.mcvittie@collabora.co.uk>
Fri, 30 Aug 2013 16:45:52 +0000 (17:45 +0100)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>
Tue, 3 Sep 2013 11:00:44 +0000 (12:00 +0100)
It might as well go in the AM_CPPFLAGS rather than in the source code.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68852
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
cmake/CMakeLists.txt
test/Makefile.am
test/internals/printf.c
test/internals/refs.c
test/internals/syslog.c
test/shell-test.c
test/spawn-test.c
test/test-utils.h

index bde43f030aae5372e1c104db0fb5cf42433c44a8..32edc5100d543a175200fedbe85a9bdc3918f684 100644 (file)
@@ -478,7 +478,7 @@ set(DBUS_INTERNAL_LIBRARIES dbus-internal)
 # important note: DBUS_INTERNAL_xxxxx_DEFINITIONS must *not* be set when building dbus-1 library
 set (DBUS_INTERNAL_ADD_LIBRARY_OPTIONS STATIC)
 set (DBUS_INTERNAL_LIBRARY_DEFINITIONS "-DDBUS_STATIC_BUILD")
-set (DBUS_INTERNAL_CLIENT_DEFINITIONS "-DDBUS_STATIC_BUILD")
+set (DBUS_INTERNAL_CLIENT_DEFINITIONS "-DDBUS_STATIC_BUILD -DDBUS_COMPILATION")
 
 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h )
 
index 8b2a5255558a7bb4721537701cd3a492a0a6a435..fe163c64b8ed8d5961daea2f4f66e39421ff302a 100644 (file)
@@ -19,6 +19,7 @@ AM_LDFLAGS = @R_DYNAMIC_LDFLAG@
 static_cppflags = \
        $(AM_CPPFLAGS) \
        -DDBUS_STATIC_BUILD \
+       -DDBUS_COMPILATION \
        $(NULL)
 
 libdbus_testutils_la_CPPFLAGS = \
index 2d2fff8d54554b2880d84277a8105bf27f9ddeb4..db1515184d6887fd99955c6c337d747d35767533 100644 (file)
@@ -26,7 +26,6 @@
 
 #include <config.h>
 
-#define DBUS_COMPILATION    /* this test uses libdbus-internal */
 #include <dbus/dbus.h>
 #include <dbus/dbus-internals.h>
 #include <dbus/dbus-string.h>
index db43a4dac11fef5ff8f5cb64a3cbbfd0ebe420b4..202dc04320ea5e9820858888399a583b9423e8c5 100644 (file)
@@ -29,7 +29,6 @@
 #include <glib.h>
 #include <glib-object.h>
 
-#define DBUS_COMPILATION    /* this test uses libdbus-internal */
 #include <dbus/dbus.h>
 #include <dbus/dbus-connection-internal.h>
 #include <dbus/dbus-mainloop.h>
index 658281cb553c0d18fd04c8529b381d422cf518ad..2811b75742840cad7e6c4f7f78e4bd7d1c3aeae3 100644 (file)
@@ -30,7 +30,6 @@
 
 #include <glib.h>
 
-#define DBUS_COMPILATION    /* this test uses libdbus-internal */
 #include <dbus/dbus.h>
 #include <dbus/dbus-sysdeps.h>
 
index b479a9c6bf38b9a572e316be88b7370f970df845..d1dc5b5b659a787ec5333e8ef25eaf942ba59c3e 100644 (file)
@@ -1,7 +1,7 @@
 #include <config.h>
 #include <stdio.h>
 #include <stdlib.h>
-#define DBUS_COMPILATION
+
 #include <dbus/dbus-internals.h>
 #include <dbus/dbus-list.h>
 #include <dbus/dbus-memory.h>
index f1a550510547600aa09c4385fc2893213aba378c..e6513fa664776a9f77bebcf1af7265bc10d7ab2a 100644 (file)
@@ -1,10 +1,8 @@
 #include <config.h>
 #include <dbus/dbus.h>
 
-#define DBUS_COMPILATION /* cheat and use dbus-sysdeps */
 #include <dbus/dbus-sysdeps.h>
 #include <dbus/dbus-spawn.h>
-#undef DBUS_COMPILATION
 #include <stdio.h>
 
 static void
index 3e1e55e6616d1acdba7cd104198a078ce010640e..8d5357e14769f8f0bc75105167060a3805240fcf 100644 (file)
@@ -1,14 +1,10 @@
 #ifndef TEST_UTILS_H
 #define TEST_UTILS_H
-#ifndef DBUS_COMPILATION
-#define DBUS_COMPILATION /* Cheat and use private stuff */
-#endif
 #include <dbus/dbus.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <dbus/dbus-mainloop.h>
 #include <dbus/dbus-internals.h>
-#undef DBUS_COMPILATION
 
 dbus_bool_t test_connection_setup                 (DBusLoop       *loop,
                                                    DBusConnection *connection);