]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
cmake: Opt-in to modern APIs and thread-safety for Solaris
authorSimon McVittie <smcv@collabora.com>
Thu, 25 Oct 2018 10:14:45 +0000 (11:14 +0100)
committerSimon McVittie <smcv@collabora.com>
Mon, 19 Nov 2018 11:27:38 +0000 (11:27 +0000)
In the Autotools build system, the AC_USE_SYSTEM_EXTENSIONS macro
defines __EXTENSIONS__ and _POSIX_PTHREAD_SEMANTICS, and we set the
others explicitly when compiling for a Solaris host.

Signed-off-by: Simon McVittie <smcv@collabora.com>
cmake/config.h.cmake

index 15f3490977eb544f3244b7af27ca1b1ff9d15ad8..608de875f28376bffdc21dcf7bc1c3566bce82d0 100644 (file)
  * should be placed in this file
 */
 
+/* Opt-in to modern APIs and thread-safety for Solaris. In the Autotools
+ * build system we do the equivalent of this by appending to CFLAGS
+ * in configure.ac */
+#ifdef __sun
+# define __EXTENSIONS__
+# define _POSIX_PTHREAD_SEMANTICS
+# define _REENTRANT
+# define _XOPEN_SOURCE 500
+#endif
+
 #cmakedefine DBUS_CONSOLE_AUTH_DIR "@DBUS_CONSOLE_AUTH_DIR@"
 #cmakedefine DBUS_DATADIR  "@DBUS_DATADIR@"
 #cmakedefine DBUS_BINDIR   "@DBUS_BINDIR@"