D-Bus  1.14.99
dbus-macros-internal.h
1 /*
2  * Copyright © 2010-2015 Ralf Habacker
3  * Copyright © 2015-2019 Collabora Ltd.
4  * SPDX-License-Identifier: AFL-2.1 or GPL-2.0-or-later
5  *
6  * Licensed under the Academic Free License version 2.1
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License along
19  * with this program. If not, see <https://www.gnu.org/licenses/>.
20  */
21 
22 #ifdef DBUS_INSIDE_DBUS_H
23 #error "You can't include dbus-macros-internal.h in the public header dbus.h"
24 #endif
25 
26 #ifndef DBUS_MACROS_INTERNAL_H
27 #define DBUS_MACROS_INTERNAL_H
28 
29 #include <dbus/dbus-macros.h>
30 
31 #ifdef DBUS_ENABLE_EMBEDDED_TESTS
32 # define DBUS_EMBEDDED_TESTS_EXPORT DBUS_PRIVATE_EXPORT
33 #else
34 # define DBUS_EMBEDDED_TESTS_EXPORT /* nothing */
35 #endif
36 
37 #if defined(DBUS_PRIVATE_EXPORT)
38  /* value forced by compiler command line, don't redefine */
39 #elif defined(_WIN32)
40 # if defined(DBUS_STATIC_BUILD)
41 # define DBUS_PRIVATE_EXPORT /* no decoration */
42 # elif defined(dbus_1_EXPORTS)
43 # define DBUS_PRIVATE_EXPORT __declspec(dllexport)
44 # else
45 # define DBUS_PRIVATE_EXPORT __declspec(dllimport)
46 # endif
47 #elif defined(__GNUC__) && __GNUC__ >= 4
48 # define DBUS_PRIVATE_EXPORT __attribute__ ((__visibility__ ("default")))
49 #else
50 # define DBUS_PRIVATE_EXPORT /* no decoration */
51 #endif
52 
53 #endif