]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
Win32 compile fix.
authorRalf Habacker <ralf.habacker@freenet.de>
Fri, 5 Aug 2011 21:01:10 +0000 (23:01 +0200)
committerRalf Habacker <ralf.habacker@freenet.de>
Fri, 5 Aug 2011 21:01:10 +0000 (23:01 +0200)
msvc compilers define 'inline' only for c++ code, so wrap it
with a platform independent DBUS_INLINE define in cmake
generated config.h.

bus/bus.c
cmake/config.h.cmake

index 6b0dc088ec04c870cef42f86e196dc8c6da9e71d..f805e3fa18a3017ca0897c7d2e948f30285e1a3e 100644 (file)
--- a/bus/bus.c
+++ b/bus/bus.c
@@ -1320,7 +1320,12 @@ out:
   va_end (args);
 }
 
-static inline const char *
+/* TODO: move to autotools generated config.h like done in cmake */
+#ifndef DBUS_INLINE
+#define DBUS_INLINE inline
+#endif
+
+static DBUS_INLINE const char *
 nonnull (const char *maybe_null,
          const char *if_null)
 {
index 6bc6aa564484faeaaa732ec6c7088fb3eb765f65..aa2343cab4ed09dadc8f0e061648435f5e723980 100644 (file)
 #define _dbus_verbose_C_S _dbus_verbose
 #endif 
 
+#ifdef _MSC_VER
+#define DBUS_INLINE __inline
+#else
+#define DBUS_INLINE inline
+#endif
+
 #endif  // _DBUS_CONFIG_H