25 #if !defined (DBUS_INSIDE_DBUS_H) && !defined (DBUS_COMPILATION)
26 #error "Only <dbus/dbus.h> can be included directly, this file may disappear or change contents."
33 # define DBUS_BEGIN_DECLS extern "C" {
34 # define DBUS_END_DECLS }
36 # define DBUS_BEGIN_DECLS
37 # define DBUS_END_DECLS
51 # define NULL ((void*) 0)
55 #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)
56 # define DBUS_DEPRECATED __attribute__ ((__deprecated__))
57 #elif defined(_MSC_VER) && (_MSC_VER >= 1300)
58 # define DBUS_DEPRECATED __declspec(deprecated)
60 # define DBUS_DEPRECATED
63 #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8)
64 # define _DBUS_GNUC_EXTENSION __extension__
66 # define _DBUS_GNUC_EXTENSION
69 #if (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)) || \
71 #define _DBUS_GNUC_PRINTF( format_idx, arg_idx ) \
72 __attribute__((__format__ (__printf__, format_idx, arg_idx)))
73 #define _DBUS_GNUC_NORETURN \
74 __attribute__((__noreturn__))
75 #define _DBUS_GNUC_UNUSED \
76 __attribute__((__unused__))
78 #define _DBUS_GNUC_PRINTF( format_idx, arg_idx )
79 #define _DBUS_GNUC_NORETURN
80 #define _DBUS_GNUC_UNUSED
83 #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
84 #define DBUS_MALLOC __attribute__((__malloc__))
89 #if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
90 #define DBUS_ALLOC_SIZE(x) __attribute__((__alloc_size__(x)))
91 #define DBUS_ALLOC_SIZE2(x,y) __attribute__((__alloc_size__(x,y)))
93 #define DBUS_ALLOC_SIZE(x)
94 #define DBUS_ALLOC_SIZE2(x,y)
109 #if defined(_MSC_VER) && (_MSC_VER >= 1700)
110 #define _DBUS_WARN_UNUSED_RESULT _Must_inspect_result_
111 #elif (__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
112 #define _DBUS_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
114 #define _DBUS_WARN_UNUSED_RESULT
199 #if defined(DBUS_EXPORT)
201 #elif defined(_WIN32)
202 # if defined(DBUS_STATIC_BUILD)
204 # elif defined(dbus_1_EXPORTS)
205 # define DBUS_EXPORT __declspec(dllexport)
207 # define DBUS_EXPORT __declspec(dllimport)
209 #elif defined(__GNUC__) && __GNUC__ >= 4
210 # define DBUS_EXPORT __attribute__ ((__visibility__ ("default")))
223 #define _dbus_clear_pointer_impl(T, pointer_to_pointer, destroy) \
225 T **_pp = (pointer_to_pointer); \
230 if (_value != NULL) \