libopenmpt  0.2.6611
cross-platform C++ and C library to decode tracked music files
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
libopenmpt_config.h
Go to the documentation of this file.
1 /*
2  * libopenmpt_config.h
3  * -------------------
4  * Purpose: libopenmpt public interface configuration
5  * Notes : (currently none)
6  * Authors: OpenMPT Devs
7  * The OpenMPT source code is released under the BSD license. Read LICENSE for more details.
8  */
9 
10 #ifndef LIBOPENMPT_CONFIG_H
11 #define LIBOPENMPT_CONFIG_H
12 
19 /* provoke warnings if already defined */
20 #define LIBOPENMPT_API
21 #undef LIBOPENMPT_API
22 #define LIBOPENMPT_CXX_API
23 #undef LIBOPENMPT_CXX_API
24 
25 #if defined(__DOXYGEN__)
26 
27 #define LIBOPENMPT_API_HELPER_EXPORT
28 #define LIBOPENMPT_API_HELPER_IMPORT
29 #define LIBOPENMPT_API_HELPER_PUBLIC
30 #define LIBOPENMPT_API_HELPER_LOCAL
31 
32 #elif defined(_MSC_VER)
33 
34 #define LIBOPENMPT_API_HELPER_EXPORT __declspec(dllexport)
35 #define LIBOPENMPT_API_HELPER_IMPORT __declspec(dllimport)
36 #define LIBOPENMPT_API_HELPER_PUBLIC
37 #define LIBOPENMPT_API_HELPER_LOCAL
38 
39 #elif defined(__EMSCRIPTEN__)
40 
41 #define LIBOPENMPT_API_HELPER_EXPORT __attribute__((visibility("default"))) __attribute__((used))
42 #define LIBOPENMPT_API_HELPER_IMPORT __attribute__((visibility("default"))) __attribute__((used))
43 #define LIBOPENMPT_API_HELPER_PUBLIC __attribute__((visibility("default"))) __attribute__((used))
44 #define LIBOPENMPT_API_HELPER_LOCAL __attribute__((visibility("hidden")))
45 
46 #elif (defined(__GNUC__) || defined(__clang__)) && defined(_WIN32)
47 
48 #define LIBOPENMPT_API_HELPER_EXPORT __declspec(dllexport)
49 #define LIBOPENMPT_API_HELPER_IMPORT __declspec(dllimport)
50 #define LIBOPENMPT_API_HELPER_PUBLIC __attribute__((visibility("default")))
51 #define LIBOPENMPT_API_HELPER_LOCAL __attribute__((visibility("hidden")))
52 
53 #elif defined(__GNUC__) || defined(__clang__)
54 
55 #define LIBOPENMPT_API_HELPER_EXPORT __attribute__((visibility("default")))
56 #define LIBOPENMPT_API_HELPER_IMPORT __attribute__((visibility("default")))
57 #define LIBOPENMPT_API_HELPER_PUBLIC __attribute__((visibility("default")))
58 #define LIBOPENMPT_API_HELPER_LOCAL __attribute__((visibility("hidden")))
59 
60 #elif defined(_WIN32)
61 
62 #define LIBOPENMPT_API_HELPER_EXPORT __declspec(dllexport)
63 #define LIBOPENMPT_API_HELPER_IMPORT __declspec(dllimport)
64 #define LIBOPENMPT_API_HELPER_PUBLIC
65 #define LIBOPENMPT_API_HELPER_LOCAL
66 
67 #else
68 
69 #define LIBOPENMPT_API_HELPER_EXPORT
70 #define LIBOPENMPT_API_HELPER_IMPORT
71 #define LIBOPENMPT_API_HELPER_PUBLIC
72 #define LIBOPENMPT_API_HELPER_LOCAL
73 
74 #endif
75 
76 #if defined(LIBOPENMPT_BUILD_DLL)
77 #define LIBOPENMPT_API LIBOPENMPT_API_HELPER_EXPORT
78 #elif defined(LIBOPENMPT_USE_DLL)
79 #define LIBOPENMPT_API LIBOPENMPT_API_HELPER_IMPORT
80 #else
81 #define LIBOPENMPT_API LIBOPENMPT_API_HELPER_PUBLIC
82 #endif
83 
84 #ifdef __cplusplus
85 
86 #define LIBOPENMPT_CXX_API LIBOPENMPT_API
87 
88 #if defined(LIBOPENMPT_USE_DLL)
89 #if defined(_MSC_VER) && !defined(_DLL)
90 #error "C++ interface is disabled if libopenmpt is built as a DLL and the runtime is statically linked. This is not supported by microsoft and cannot possibly work. Ever."
91 #undef LIBOPENMPT_CXX_API
92 #define LIBOPENMPT_CXX_API LIBOPENMPT_API_HELPER_LOCAL
93 #endif
94 #endif
95 
96 #if defined(__EMSCRIPTEN__)
97 
98 /* Only the C API is supported for emscripten. Disable the C++ API. */
99 #undef LIBOPENMPT_CXX_API
100 #define LIBOPENMPT_CXX_API LIBOPENMPT_API_HELPER_LOCAL
101 #endif
102 
103 #endif
104 
109 #if defined(_MSC_VER)
110 #if (_MSC_VER >= 1500) && (_MSC_VER < 1600)
111 #ifndef LIBOPENMPT_ANCIENT_COMPILER
112 #define LIBOPENMPT_ANCIENT_COMPILER
113 #endif
114 #ifndef LIBOPENMPT_ANCIENT_COMPILER_SHARED_PTR
115 #define LIBOPENMPT_ANCIENT_COMPILER_SHARED_PTR
116 #define LIBOPENMPT_SHARED_PTR std::tr1::shared_ptr
117 #endif
118 #ifndef LIBOPENMPT_ANCIENT_COMPILER_STDINT
119 #define LIBOPENMPT_ANCIENT_COMPILER_STDINT
120 #endif
121 #endif
122 #endif
123 
124 #if defined(__GNUC__) && !defined(__clang__)
125 #if (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__*1 < 40300)
126 #ifndef LIBOPENMPT_ANCIENT_COMPILER
127 #define LIBOPENMPT_ANCIENT_COMPILER
128 #endif
129 #ifndef LIBOPENMPT_ANCIENT_COMPILER_SHARED_PTR
130 #define LIBOPENMPT_ANCIENT_COMPILER_SHARED_PTR
131 #define LIBOPENMPT_SHARED_PTR std::tr1::shared_ptr
132 #endif
133 #ifndef LIBOPENMPT_ANCIENT_COMPILER_STDINT
134 #define LIBOPENMPT_ANCIENT_COMPILER_STDINT
135 #endif
136 #elif (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__*1 < 40400)
137 #ifndef LIBOPENMPT_ANCIENT_COMPILER_SHARED_PTR
138 #define LIBOPENMPT_ANCIENT_COMPILER_SHARED_PTR
139 #define LIBOPENMPT_SHARED_PTR std::shared_ptr
140 #endif
141 #endif
142 #endif
143 
144 #ifdef __cplusplus
145 #ifdef LIBOPENMPT_ANCIENT_COMPILER_STDINT
146 #include <stdint.h>
147 namespace std {
148 typedef int8_t int8_t;
149 typedef int16_t int16_t;
150 typedef int32_t int32_t;
151 typedef int64_t int64_t;
152 typedef uint8_t uint8_t;
153 typedef uint16_t uint16_t;
154 typedef uint32_t uint32_t;
155 typedef uint64_t uint64_t;
156 }
157 #endif
158 #endif
159 
160 #if !defined(LIBOPENMPT_NO_DEPRECATE)
161 #if defined(__clang__)
162 #define LIBOPENMPT_DEPRECATED __attribute__((deprecated))
163 #elif defined(__GNUC__)
164 #define LIBOPENMPT_DEPRECATED __attribute__((deprecated))
165 #elif defined(_MSC_VER)
166 #define LIBOPENMPT_DEPRECATED __declspec(deprecated)
167 #else
168 #define LIBOPENMPT_DEPRECATED
169 #endif
170 #ifndef __cplusplus
172 #define LIBOPENMPT_DEPRECATED_STRING( str ) ( LIBOPENMPT_DEPRECATED_STRING_CONSTANT ? ( str ) : ( str ) )
173 #endif
174 #else
175 #define LIBOPENMPT_DEPRECATED
176 #ifndef __cplusplus
177 #define LIBOPENMPT_DEPRECATED_STRING( str ) str
178 #endif
179 #endif
180 
181 #include "libopenmpt_version.h"
182 
183 #endif /* LIBOPENMPT_CONFIG_H */
#define LIBOPENMPT_DEPRECATED
Definition: libopenmpt_config.h:168
static const int LIBOPENMPT_DEPRECATED_STRING_CONSTANT
Definition: libopenmpt_config.h:171
STL namespace.