libzypp: zypp-core/Globals.h Source File

libzypp 17.36.6

Globals.h
Go to the documentation of this file.
1/*---------------------------------------------------------------------\
2| ____ _ __ __ ___ |
3| |__ / \ / / . \ . \ |
4| / / \ V /| _/ _/ |
5| / /__ | | | | | | |
6| /_____||_| |_| |_| |
7| |
8\---------------------------------------------------------------------*/
12#ifndef ZYPP_GLOBALS_H
13#define ZYPP_GLOBALS_H
14
15#include <zypp-core/APIConfig.h> // LIBZYPP_ version defines for the LEGACY macro
16#include <zypp-core/base/Easy.h> // some macros used almost everywhere
17
27#ifndef LIBZYPP_VERSION_MAJOR
28#error Missing APIConfig.h include (LIBZYPP_VERSION_MAJOR)
29#endif
30#ifndef LIBZYPP_SOVERSION
31#error Missing APIConfig.h include (LIBZYPP_SOVERSION)
32#endif
33#ifndef LIBZYPP_VERSION
34#error Missing APIConfig.h include (LIBZYPP_VERSION)
35#endif
36#define LEGACY(CL) ( CL < 100 && LIBZYPP_VERSION_MAJOR <= CL ) || ( CL < 10000 && LIBZYPP_SOVERSION <= CL ) || LIBZYPP_VERSION <= CL
37
54#if __GNUC__ >= 4
55 #define ZYPP_DECL_EXPORT __attribute__ ((visibility ("default")))
56 #define ZYPP_DECL_IMPORT __attribute__ ((visibility ("default")))
57 #define ZYPP_DECL_HIDDEN __attribute__ ((visibility ("hidden")))
58#else
59 #define ZYPP_DECL_EXPORT
60 #define ZYPP_DECL_IMPORT
61 #define ZYPP_DECL_HIDDEN
62#endif
63
64#ifdef ZYPP_DLL //defined if zypp is compiled as DLL
65 #define ZYPP_API ZYPP_DECL_EXPORT
66 #define ZYPP_TESTS ZYPP_DECL_EXPORT
67 #define ZYPP_LOCAL ZYPP_DECL_HIDDEN
68#else
69 #define ZYPP_API ZYPP_DECL_IMPORT
70 #define ZYPP_TESTS ZYPP_DECL_IMPORT
71 #define ZYPP_LOCAL
72#endif
73
74// A small set of internal symbols offered to the deptestomatic
75// tool (package libzypp-testsuite-tools) to load and evaluate
76// solver testcases.
77#define ZYPP_API_DEPTESTOMATIC ZYPP_API
78
110#ifndef NDEBUG
111 #ifndef ZYPP_DEPRECATED
112 #define ZYPP_DEPRECATED __attribute__ ((deprecated))
113 #endif
114#else
115 #ifndef ZYPP_DEPRECATED
116 #define ZYPP_DEPRECATED
117 #endif
118#endif
119
120#endif
Easy.h