From: Simon McVittie Date: Thu, 21 Apr 2022 13:38:55 +0000 (+0100) Subject: dbus: Move DBUS_PRIVATE_EXPORT to private header X-Git-Tag: dbus-1.15.0~63^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=76fe49b7ab7d4835f23e1e3afb6233d768a4cd3f;p=thirdparty%2Fdbus.git dbus: Move DBUS_PRIVATE_EXPORT to private header Unlike the rest of the macros in dbus-macros.h, this one would never have made sense to use in a public header. Signed-off-by: Simon McVittie --- diff --git a/dbus/dbus-macros-internal.h b/dbus/dbus-macros-internal.h index d98891a8e..5da73c26e 100644 --- a/dbus/dbus-macros-internal.h +++ b/dbus/dbus-macros-internal.h @@ -1,5 +1,6 @@ /* - * Copyright © 2019 Collabora Ltd. + * Copyright © 2010-2015 Ralf Habacker + * Copyright © 2015-2019 Collabora Ltd. * SPDX-License-Identifier: AFL-2.1 or GPL-2.0-or-later * * Licensed under the Academic Free License version 2.1 @@ -33,4 +34,20 @@ # define DBUS_EMBEDDED_TESTS_EXPORT /* nothing */ #endif +#if defined(DBUS_PRIVATE_EXPORT) + /* value forced by compiler command line, don't redefine */ +#elif defined(_WIN32) +# if defined(DBUS_STATIC_BUILD) +# define DBUS_PRIVATE_EXPORT /* no decoration */ +# elif defined(dbus_1_EXPORTS) +# define DBUS_PRIVATE_EXPORT __declspec(dllexport) +# else +# define DBUS_PRIVATE_EXPORT __declspec(dllimport) +# endif +#elif defined(__GNUC__) && __GNUC__ >= 4 +# define DBUS_PRIVATE_EXPORT __attribute__ ((__visibility__ ("default"))) +#else +# define DBUS_PRIVATE_EXPORT /* no decoration */ +#endif + #endif diff --git a/dbus/dbus-macros.h b/dbus/dbus-macros.h index 80faed294..2dd9fcd38 100644 --- a/dbus/dbus-macros.h +++ b/dbus/dbus-macros.h @@ -210,22 +210,6 @@ #define DBUS_EXPORT #endif -#if defined(DBUS_PRIVATE_EXPORT) - /* value forced by compiler command line, don't redefine */ -#elif defined(_WIN32) -# if defined(DBUS_STATIC_BUILD) -# define DBUS_PRIVATE_EXPORT /* no decoration */ -# elif defined(dbus_1_EXPORTS) -# define DBUS_PRIVATE_EXPORT __declspec(dllexport) -# else -# define DBUS_PRIVATE_EXPORT __declspec(dllimport) -# endif -#elif defined(__GNUC__) && __GNUC__ >= 4 -# define DBUS_PRIVATE_EXPORT __attribute__ ((__visibility__ ("default"))) -#else -# define DBUS_PRIVATE_EXPORT /* no decoration */ -#endif - /* Implementation for dbus_clear_message() etc. This is not API, * do not use it directly. * diff --git a/dbus/dbus-uuidgen.h b/dbus/dbus-uuidgen.h index bf07b1394..bd098b038 100644 --- a/dbus/dbus-uuidgen.h +++ b/dbus/dbus-uuidgen.h @@ -27,6 +27,7 @@ #ifndef DBUS_UUIDGEN_H #define DBUS_UUIDGEN_H +#include #include #include