libopenmpt: libopenmpt/libopenmpt_config.h Source File

libopenmpt 0.5.41-pre.0+r25037 cross-platform C++ and C library to decode tracked music files

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
34 #define LIBOPENMPT_STREAM_CALLBACKS_BUFFER
35
47 #define LIBOPENMPT_STREAM_CALLBACKS_FD
48
60 #define LIBOPENMPT_STREAM_CALLBACKS_FILE
61
70 #if defined(__DOXYGEN__)
71
72 #define LIBOPENMPT_API_HELPER_EXPORT
73 #define LIBOPENMPT_API_HELPER_IMPORT
74 #define LIBOPENMPT_API_HELPER_PUBLIC
75 #define LIBOPENMPT_API_HELPER_LOCAL
76
77 #elif defined(_MSC_VER)
78
79 #define LIBOPENMPT_API_HELPER_EXPORT __declspec(dllexport)
80 #define LIBOPENMPT_API_HELPER_IMPORT __declspec(dllimport)
81 #define LIBOPENMPT_API_HELPER_PUBLIC
82 #define LIBOPENMPT_API_HELPER_LOCAL
83
84 #elif defined(__EMSCRIPTEN__)
85
86 #define LIBOPENMPT_API_HELPER_EXPORT __attribute__((visibility("default"))) __attribute__((used))
87 #define LIBOPENMPT_API_HELPER_IMPORT __attribute__((visibility("default"))) __attribute__((used))
88 #define LIBOPENMPT_API_HELPER_PUBLIC __attribute__((visibility("default"))) __attribute__((used))
89 #define LIBOPENMPT_API_HELPER_LOCAL __attribute__((visibility("hidden")))
90
91 #elif (defined(__GNUC__) || defined(__clang__)) && defined(_WIN32)
92
93 #define LIBOPENMPT_API_HELPER_EXPORT __declspec(dllexport)
94 #define LIBOPENMPT_API_HELPER_IMPORT __declspec(dllimport)
95 #define LIBOPENMPT_API_HELPER_PUBLIC __attribute__((visibility("default")))
96 #define LIBOPENMPT_API_HELPER_LOCAL __attribute__((visibility("hidden")))
97
98 #elif defined(__GNUC__) || defined(__clang__)
99
100 #define LIBOPENMPT_API_HELPER_EXPORT __attribute__((visibility("default")))
101 #define LIBOPENMPT_API_HELPER_IMPORT __attribute__((visibility("default")))
102 #define LIBOPENMPT_API_HELPER_PUBLIC __attribute__((visibility("default")))
103 #define LIBOPENMPT_API_HELPER_LOCAL __attribute__((visibility("hidden")))
104
105 #elif defined(_WIN32)
106
107 #define LIBOPENMPT_API_HELPER_EXPORT __declspec(dllexport)
108 #define LIBOPENMPT_API_HELPER_IMPORT __declspec(dllimport)
109 #define LIBOPENMPT_API_HELPER_PUBLIC
110 #define LIBOPENMPT_API_HELPER_LOCAL
111
112 #else
113
114 #define LIBOPENMPT_API_HELPER_EXPORT
115 #define LIBOPENMPT_API_HELPER_IMPORT
116 #define LIBOPENMPT_API_HELPER_PUBLIC
117 #define LIBOPENMPT_API_HELPER_LOCAL
118
119 #endif
120
121 #if defined(LIBOPENMPT_BUILD_DLL)
122 #define LIBOPENMPT_API LIBOPENMPT_API_HELPER_EXPORT
123 #elif defined(LIBOPENMPT_USE_DLL)
124 #define LIBOPENMPT_API LIBOPENMPT_API_HELPER_IMPORT
125 #else
126 #define LIBOPENMPT_API LIBOPENMPT_API_HELPER_PUBLIC
127 #endif
128
129 #ifdef __cplusplus
130
131 #define LIBOPENMPT_CXX_API LIBOPENMPT_API
132
133 #if defined(LIBOPENMPT_USE_DLL)
134 #if defined(_MSC_VER) && !defined(_DLL)
135 #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."
136 #undef LIBOPENMPT_CXX_API
137 #define LIBOPENMPT_CXX_API LIBOPENMPT_API_HELPER_LOCAL
138 #endif
139 #endif
140
141 #if defined(__EMSCRIPTEN__)
142
143 /* Only the C API is supported for emscripten. Disable the C++ API. */
144 #undef LIBOPENMPT_CXX_API
145 #define LIBOPENMPT_CXX_API LIBOPENMPT_API_HELPER_LOCAL
146 #endif
147
148 #endif
149
155 /* C */
156
157 #if !defined(LIBOPENMPT_NO_DEPRECATE)
158 #if defined(__clang__)
159 #define LIBOPENMPT_DEPRECATED __attribute__((deprecated))
160 #elif defined(__GNUC__)
161 #define LIBOPENMPT_DEPRECATED __attribute__((deprecated))
162 #elif defined(_MSC_VER)
163 #define LIBOPENMPT_DEPRECATED __declspec(deprecated)
164 #else
165 #define LIBOPENMPT_DEPRECATED
166 #endif
167 #else
168 #define LIBOPENMPT_DEPRECATED
169 #endif
170
171 #ifndef __cplusplus
172 #if !defined(LIBOPENMPT_NO_DEPRECATE)
173 LIBOPENMPT_DEPRECATED static const int LIBOPENMPT_DEPRECATED_STRING_CONSTANT = 0;
174 #define LIBOPENMPT_DEPRECATED_STRING( str ) ( LIBOPENMPT_DEPRECATED_STRING_CONSTANT ? ( str ) : ( str ) )
175 #else
176 #define LIBOPENMPT_DEPRECATED_STRING( str ) str
177 #endif
178 #else
179 #define LIBOPENMPT_DEPRECATED_STRING( str ) str
180 #endif
181
182
183 /* C++ */
184
185 #ifdef __cplusplus
186
187 #if defined(LIBOPENMPT_ASSUME_CPLUSPLUS)
188 #endif
189
190 #if !defined(LIBOPENMPT_NO_DEPRECATE)
191 #define LIBOPENMPT_ATTR_DEPRECATED [[deprecated]]
192 #else
193 #define LIBOPENMPT_ATTR_DEPRECATED
194 #endif
195
196 #endif
197
198
199 #include "libopenmpt_version.h"
200
201 #endif /* LIBOPENMPT_CONFIG_H */
LIBOPENMPT_DEPRECATED
#define LIBOPENMPT_DEPRECATED
Definition: libopenmpt_config.h:165
LIBOPENMPT_DEPRECATED_STRING_CONSTANT
static const int LIBOPENMPT_DEPRECATED_STRING_CONSTANT
Definition: libopenmpt_config.h:173
libopenmpt_version.h