libzypp 17.34.1
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/base/Easy.h> // some macros used almost everywhere
16
26#define LEGACY(CL) ( CL < 100 && LIBZYPP_VERSION_MAJOR <= CL ) || ( CL < 10000 && LIBZYPP_SOVERSION <= CL ) || LIBZYPP_VERSION <= CL
27
44#if __GNUC__ >= 4
45 #define ZYPP_DECL_EXPORT __attribute__ ((visibility ("default")))
46 #define ZYPP_DECL_IMPORT __attribute__ ((visibility ("default")))
47 #define ZYPP_DECL_HIDDEN __attribute__ ((visibility ("hidden")))
48#else
49 #define ZYPP_DECL_EXPORT
50 #define ZYPP_DECL_IMPORT
51 #define ZYPP_DECL_HIDDEN
52#endif
53
54#ifdef ZYPP_DLL //defined if zypp is compiled as DLL
55 #define ZYPP_API ZYPP_DECL_EXPORT
56 #define ZYPP_TESTS ZYPP_DECL_EXPORT
57 #define ZYPP_LOCAL ZYPP_DECL_HIDDEN
58#else
59 #define ZYPP_API ZYPP_DECL_IMPORT
60 #define ZYPP_TESTS ZYPP_DECL_IMPORT
61 #define ZYPP_LOCAL
62#endif
63
64// A small set of internal symbols offered to the deptestomatic
65// tool (package libzypp-testsuite-tools) to load and evaluate
66// solver testcases.
67#define ZYPP_API_DEPTESTOMATIC ZYPP_API
68
100#if __GNUC__ - 0 > 3 || (__GNUC__ - 0 == 3 && __GNUC_MINOR__ - 0 >= 2)
101 #ifndef ZYPP_DEPRECATED
102 #define ZYPP_DEPRECATED __attribute__ ((deprecated))
103 #endif
104#else
105 #ifndef ZYPP_DEPRECATED
106 #define ZYPP_DEPRECATED
107 #endif
108#endif
109
110#endif