libopenmpt 0.5.13+release.autotools
cross-platform C++ and C library to decode tracked music files
Loading...
Searching...
No Matches
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
26#define LIBOPENMPT_STREAM_CALLBACKS_BUFFER
27
39#define LIBOPENMPT_STREAM_CALLBACKS_FD
40
52#define LIBOPENMPT_STREAM_CALLBACKS_FILE
53
54#if defined(__DOXYGEN__)
55
56#define LIBOPENMPT_API_HELPER_EXPORT
57#define LIBOPENMPT_API_HELPER_IMPORT
58#define LIBOPENMPT_API_HELPER_PUBLIC
59#define LIBOPENMPT_API_HELPER_LOCAL
60
61#elif defined(_MSC_VER)
62
63#define LIBOPENMPT_API_HELPER_EXPORT __declspec(dllexport)
64#define LIBOPENMPT_API_HELPER_IMPORT __declspec(dllimport)
65#define LIBOPENMPT_API_HELPER_PUBLIC
66#define LIBOPENMPT_API_HELPER_LOCAL
67
68#elif defined(__EMSCRIPTEN__)
69
70#define LIBOPENMPT_API_HELPER_EXPORT __attribute__((visibility("default"))) __attribute__((used))
71#define LIBOPENMPT_API_HELPER_IMPORT __attribute__((visibility("default"))) __attribute__((used))
72#define LIBOPENMPT_API_HELPER_PUBLIC __attribute__((visibility("default"))) __attribute__((used))
73#define LIBOPENMPT_API_HELPER_LOCAL __attribute__((visibility("hidden")))
74
75#elif (defined(__GNUC__) || defined(__clang__)) && defined(_WIN32)
76
77#define LIBOPENMPT_API_HELPER_EXPORT __declspec(dllexport)
78#define LIBOPENMPT_API_HELPER_IMPORT __declspec(dllimport)
79#define LIBOPENMPT_API_HELPER_PUBLIC __attribute__((visibility("default")))
80#define LIBOPENMPT_API_HELPER_LOCAL __attribute__((visibility("hidden")))
81
82#elif defined(__GNUC__) || defined(__clang__)
83
84#define LIBOPENMPT_API_HELPER_EXPORT __attribute__((visibility("default")))
85#define LIBOPENMPT_API_HELPER_IMPORT __attribute__((visibility("default")))
86#define LIBOPENMPT_API_HELPER_PUBLIC __attribute__((visibility("default")))
87#define LIBOPENMPT_API_HELPER_LOCAL __attribute__((visibility("hidden")))
88
89#elif defined(_WIN32)
90
91#define LIBOPENMPT_API_HELPER_EXPORT __declspec(dllexport)
92#define LIBOPENMPT_API_HELPER_IMPORT __declspec(dllimport)
93#define LIBOPENMPT_API_HELPER_PUBLIC
94#define LIBOPENMPT_API_HELPER_LOCAL
95
96#else
97
98#define LIBOPENMPT_API_HELPER_EXPORT
99#define LIBOPENMPT_API_HELPER_IMPORT
100#define LIBOPENMPT_API_HELPER_PUBLIC
101#define LIBOPENMPT_API_HELPER_LOCAL
102
103#endif
104
105#if defined(LIBOPENMPT_BUILD_DLL)
106#define LIBOPENMPT_API LIBOPENMPT_API_HELPER_EXPORT
107#elif defined(LIBOPENMPT_USE_DLL)
108#define LIBOPENMPT_API LIBOPENMPT_API_HELPER_IMPORT
109#else
110#define LIBOPENMPT_API LIBOPENMPT_API_HELPER_PUBLIC
111#endif
112
113#ifdef __cplusplus
114
115#define LIBOPENMPT_CXX_API LIBOPENMPT_API
116
117#if defined(LIBOPENMPT_USE_DLL)
118#if defined(_MSC_VER) && !defined(_DLL)
119#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."
120#undef LIBOPENMPT_CXX_API
121#define LIBOPENMPT_CXX_API LIBOPENMPT_API_HELPER_LOCAL
122#endif
123#endif
124
125#if defined(__EMSCRIPTEN__)
126
127/* Only the C API is supported for emscripten. Disable the C++ API. */
128#undef LIBOPENMPT_CXX_API
129#define LIBOPENMPT_CXX_API LIBOPENMPT_API_HELPER_LOCAL
130#endif
131
132#endif
133
139/* C */
140
141#if !defined(LIBOPENMPT_NO_DEPRECATE)
142#if defined(__clang__)
143#define LIBOPENMPT_DEPRECATED __attribute__((deprecated))
144#elif defined(__GNUC__)
145#define LIBOPENMPT_DEPRECATED __attribute__((deprecated))
146#elif defined(_MSC_VER)
147#define LIBOPENMPT_DEPRECATED __declspec(deprecated)
148#else
149#define LIBOPENMPT_DEPRECATED
150#endif
151#else
152#define LIBOPENMPT_DEPRECATED
153#endif
154
155#ifndef __cplusplus
156#if !defined(LIBOPENMPT_NO_DEPRECATE)
158#define LIBOPENMPT_DEPRECATED_STRING( str ) ( LIBOPENMPT_DEPRECATED_STRING_CONSTANT ? ( str ) : ( str ) )
159#else
160#define LIBOPENMPT_DEPRECATED_STRING( str ) str
161#endif
162#endif
163
164
165/* C++ */
166
167#ifdef __cplusplus
168
169#if defined(LIBOPENMPT_ASSUME_CPLUSPLUS)
170#endif
171
172#if !defined(LIBOPENMPT_NO_DEPRECATE)
173#define LIBOPENMPT_ATTR_DEPRECATED [[deprecated]]
174#else
175#define LIBOPENMPT_ATTR_DEPRECATED
176#endif
177
178#endif
179
180
181#include "libopenmpt_version.h"
182
183#endif /* LIBOPENMPT_CONFIG_H */
#define LIBOPENMPT_DEPRECATED
Definition libopenmpt_config.h:149
static const int LIBOPENMPT_DEPRECATED_STRING_CONSTANT
Definition libopenmpt_config.h:157