Win32 compile fix.

msvc compilers define 'inline' only for c++ code, so wrap it
with a platform independent DBUS_INLINE define in cmake
generated config.h.
This commit is contained in:
Ralf Habacker 2011-08-05 23:01:10 +02:00
parent 2a6c14cd2e
commit b0b5f9b134
2 changed files with 12 additions and 1 deletions

View file

@ -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)
{

View file

@ -253,4 +253,10 @@
#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