File indexing completed on 2025-01-18 09:55:13
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023 #if !defined (DBUS_INSIDE_DBUS_H) && !defined (DBUS_COMPILATION)
0024 #error "Only <dbus/dbus.h> can be included directly, this file may disappear or change contents."
0025 #endif
0026
0027 #ifndef DBUS_MACROS_H
0028 #define DBUS_MACROS_H
0029
0030 #ifdef __cplusplus
0031 # define DBUS_BEGIN_DECLS extern "C" {
0032 # define DBUS_END_DECLS }
0033 #else
0034 # define DBUS_BEGIN_DECLS
0035 # define DBUS_END_DECLS
0036 #endif
0037
0038 #ifndef TRUE
0039 # define TRUE 1
0040 #endif
0041 #ifndef FALSE
0042 # define FALSE 0
0043 #endif
0044
0045 #ifndef NULL
0046 # ifdef __cplusplus
0047 # define NULL (0L)
0048 # else
0049 # define NULL ((void*) 0)
0050 # endif
0051 #endif
0052
0053 #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)
0054 # define DBUS_DEPRECATED __attribute__ ((__deprecated__))
0055 #elif defined(_MSC_VER) && (_MSC_VER >= 1300)
0056 # define DBUS_DEPRECATED __declspec(deprecated)
0057 #else
0058 # define DBUS_DEPRECATED
0059 #endif
0060
0061 #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8)
0062 # define _DBUS_GNUC_EXTENSION __extension__
0063 #else
0064 # define _DBUS_GNUC_EXTENSION
0065 #endif
0066
0067 #if (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)) || \
0068 defined(__clang__)
0069 #define _DBUS_GNUC_PRINTF( format_idx, arg_idx ) \
0070 __attribute__((__format__ (__printf__, format_idx, arg_idx)))
0071 #define _DBUS_GNUC_NORETURN \
0072 __attribute__((__noreturn__))
0073 #define _DBUS_GNUC_UNUSED \
0074 __attribute__((__unused__))
0075 #else
0076 #define _DBUS_GNUC_PRINTF( format_idx, arg_idx )
0077 #define _DBUS_GNUC_NORETURN
0078 #define _DBUS_GNUC_UNUSED
0079 #endif
0080
0081 #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
0082 #define DBUS_MALLOC __attribute__((__malloc__))
0083 #else
0084 #define DBUS_MALLOC
0085 #endif
0086
0087 #if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
0088 #define DBUS_ALLOC_SIZE(x) __attribute__((__alloc_size__(x)))
0089 #define DBUS_ALLOC_SIZE2(x,y) __attribute__((__alloc_size__(x,y)))
0090 #else
0091 #define DBUS_ALLOC_SIZE(x)
0092 #define DBUS_ALLOC_SIZE2(x,y)
0093 #endif
0094
0095
0096
0097
0098
0099
0100
0101
0102
0103
0104
0105
0106
0107 #if defined(_MSC_VER) && (_MSC_VER >= 1700)
0108 #define _DBUS_WARN_UNUSED_RESULT _Must_inspect_result_
0109 #elif (__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
0110 #define _DBUS_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
0111 #else
0112 #define _DBUS_WARN_UNUSED_RESULT
0113 #endif
0114
0115
0116
0117
0118
0119
0120
0121
0122
0123
0124
0125
0126
0127
0128
0129
0130
0131
0132
0133
0134
0135
0136
0137
0138
0139
0140
0141
0142
0143
0144
0145
0146
0147
0148
0149
0150
0151
0152
0153
0154
0155
0156
0157
0158
0159
0160
0161
0162
0163
0164
0165
0166
0167
0168
0169
0170
0171
0172
0173
0174
0175
0176
0177
0178
0179
0180
0181
0182
0183
0184
0185
0186
0187
0188
0189
0190
0191
0192
0193
0194
0195
0196
0197 #if defined(DBUS_EXPORT)
0198
0199 #elif defined(_WIN32)
0200 # if defined(DBUS_STATIC_BUILD)
0201 # define DBUS_EXPORT
0202 # elif defined(dbus_1_EXPORTS)
0203 # define DBUS_EXPORT __declspec(dllexport)
0204 # else
0205 # define DBUS_EXPORT __declspec(dllimport)
0206 # endif
0207 #elif defined(__GNUC__) && __GNUC__ >= 4
0208 # define DBUS_EXPORT __attribute__ ((__visibility__ ("default")))
0209 #else
0210 #define DBUS_EXPORT
0211 #endif
0212
0213 #if defined(DBUS_PRIVATE_EXPORT)
0214
0215 #elif defined(_WIN32)
0216 # if defined(DBUS_STATIC_BUILD)
0217 # define DBUS_PRIVATE_EXPORT
0218 # elif defined(dbus_1_EXPORTS)
0219 # define DBUS_PRIVATE_EXPORT __declspec(dllexport)
0220 # else
0221 # define DBUS_PRIVATE_EXPORT __declspec(dllimport)
0222 # endif
0223 #elif defined(__GNUC__) && __GNUC__ >= 4
0224 # define DBUS_PRIVATE_EXPORT __attribute__ ((__visibility__ ("default")))
0225 #else
0226 # define DBUS_PRIVATE_EXPORT
0227 #endif
0228
0229
0230
0231
0232
0233
0234
0235
0236
0237 #define _dbus_clear_pointer_impl(T, pointer_to_pointer, destroy) \
0238 do { \
0239 T **_pp = (pointer_to_pointer); \
0240 T *_value = *_pp; \
0241 \
0242 *_pp = NULL; \
0243 \
0244 if (_value != NULL) \
0245 destroy (_value); \
0246 } while (0)
0247
0248
0249
0250
0251 #endif