123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162 |
- #ifndef OPENMPT_WNESUPPORT_CONFIG_H
- #define OPENMPT_WNESUPPORT_CONFIG_H
- #include <stdint.h>
- #if defined(__DOXYGEN__)
- #define OPENMPT_API_HELPER_EXPORT
- #define OPENMPT_API_HELPER_IMPORT
- #define OPENMPT_API_HELPER_PUBLIC
- #define OPENMPT_API_HELPER_LOCAL
- #elif defined(MPT_WINEGCC)
- #define OPENMPT_API_HELPER_EXPORT __attribute__((visibility("default")))
- #define OPENMPT_API_HELPER_IMPORT __attribute__((visibility("default")))
- #define OPENMPT_API_HELPER_PUBLIC __attribute__((visibility("default")))
- #define OPENMPT_API_HELPER_LOCAL __attribute__((visibility("hidden")))
- #elif defined(_MSC_VER)
- #define OPENMPT_API_HELPER_EXPORT __declspec(dllexport)
- #define OPENMPT_API_HELPER_IMPORT __declspec(dllimport)
- #define OPENMPT_API_HELPER_PUBLIC
- #define OPENMPT_API_HELPER_LOCAL
- #elif defined(__GNUC__) || defined(__clang__)
- #define OPENMPT_API_HELPER_EXPORT __attribute__((visibility("default")))
- #define OPENMPT_API_HELPER_IMPORT __attribute__((visibility("default")))
- #define OPENMPT_API_HELPER_PUBLIC __attribute__((visibility("default")))
- #define OPENMPT_API_HELPER_LOCAL __attribute__((visibility("hidden")))
- #else
- #define OPENMPT_API_HELPER_EXPORT
- #define OPENMPT_API_HELPER_IMPORT
- #define OPENMPT_API_HELPER_PUBLIC
- #define OPENMPT_API_HELPER_LOCAL
- #endif
- #if defined(__DOXYGEN__)
- #define OPENMPT_API_WINE_MS_CDECL
- #define OPENMPT_API_WINE_MS_STDCALL
- #define OPENMPT_API_WINE_MS_FASTCALL
- #define OPENMPT_API_WINE_MS_THISCALL
- #undef OPENMPT_API_WINE_SYSV
- #elif defined(MPT_WINEGCC)
- #ifdef _WIN64
- #define OPENMPT_API_WINE_MS_CDECL __attribute__((ms_abi))
- #define OPENMPT_API_WINE_MS_STDCALL __attribute__((ms_abi))
- #define OPENMPT_API_WINE_MS_FASTCALL __attribute__((ms_abi))
- #define OPENMPT_API_WINE_MS_THISCALL __attribute__((ms_abi))
- #else
- // winegcc on Ubuntu 16.04, wine-development 1.9.6 completely explodes in
- // incomprehensible ways while parsing __attribute__((cdecl)).
- #if defined(__cdecl)
- #define OPENMPT_API_WINE_MS_CDECL __attribute__((ms_abi)) __cdecl
- #else
- #define OPENMPT_API_WINE_MS_CDECL __attribute__((ms_abi)) __attribute__((cdecl))
- #endif
- #if defined(__stdcall)
- #define OPENMPT_API_WINE_MS_STDCALL __attribute__((ms_abi)) __stdcall
- #else
- #define OPENMPT_API_WINE_MS_STDCALL __attribute__((ms_abi)) __attribute__((stdcall))
- #endif
- #if defined(__fastcall)
- #define OPENMPT_API_WINE_MS_FASTCALL __attribute__((ms_abi)) __fastcall
- #else
- #define OPENMPT_API_WINE_MS_FASTCALL __attribute__((ms_abi)) __attribute__((fastcall))
- #endif
- #if defined(__thiscall)
- #define OPENMPT_API_WINE_MS_THISCALL __attribute__((ms_abi)) __thiscall
- #else
- #define OPENMPT_API_WINE_MS_THISCALL __attribute__((ms_abi)) __attribute__((thiscall))
- #endif
- #endif
- #define OPENMPT_API_WINE_SYSV __attribute__((sysv_abi))
- #elif defined(_MSC_VER)
- #define OPENMPT_API_WINE_MS_CDECL __cdecl
- #define OPENMPT_API_WINE_MS_STDCALL __stdcall
- #define OPENMPT_API_WINE_MS_FASTCALL __fastcall
- #define OPENMPT_API_WINE_MS_THISCALL __thiscall
- #undef OPENMPT_API_WINE_SYSV
- #elif defined(__GNUC__) || defined(__clang__)
- #ifdef _WIN64
- #define OPENMPT_API_WINE_MS_CDECL __attribute__((ms_abi))
- #define OPENMPT_API_WINE_MS_STDCALL __attribute__((ms_abi))
- #define OPENMPT_API_WINE_MS_FASTCALL __attribute__((ms_abi))
- #define OPENMPT_API_WINE_MS_THISCALL __attribute__((ms_abi))
- #else
- // winegcc on Ubuntu 16.04, wine-development 1.9.6 completely explodes in
- // incomprehensible ways while parsing __attribute__((cdecl)).
- #if defined(__cdecl)
- #define OPENMPT_API_WINE_MS_CDECL __attribute__((ms_abi)) __cdecl
- #else
- #define OPENMPT_API_WINE_MS_CDECL __attribute__((ms_abi)) __attribute__((cdecl))
- #endif
- #if defined(__stdcall)
- #define OPENMPT_API_WINE_MS_STDCALL __attribute__((ms_abi)) __stdcall
- #else
- #define OPENMPT_API_WINE_MS_STDCALL __attribute__((ms_abi)) __attribute__((stdcall))
- #endif
- #if defined(__fastcall)
- #define OPENMPT_API_WINE_MS_FASTCALL __attribute__((ms_abi)) __fastcall
- #else
- #define OPENMPT_API_WINE_MS_FASTCALL __attribute__((ms_abi)) __attribute__((fastcall))
- #endif
- #if defined(__thiscall)
- #define OPENMPT_API_WINE_MS_THISCALL __attribute__((ms_abi)) __thiscall
- #else
- #define OPENMPT_API_WINE_MS_THISCALL __attribute__((ms_abi)) __attribute__((thiscall))
- #endif
- #endif
- #define OPENMPT_API_WINE_SYSV __attribute__((sysv_abi))
- #endif
- #if defined(MODPLUG_TRACKER) && (!(defined(MPT_BUILD_WINESUPPORT) || defined(MPT_BUILD_WINESUPPORT_WRAPPER)))
- #define OPENMPT_WINESUPPORT_API
- #define OPENMPT_WINESUPPORT_CALL
- #define OPENMPT_WINESUPPORT_WRAPPER_API
- #define OPENMPT_WINESUPPORT_WRAPPER_CALL
- #else
- #if defined(__DOXYGEN__)
- #define OPENMPT_WINESUPPORT_CALL OPENMPT_API_WINE_SYSV
- #elif defined(MPT_WINEGCC)
- #define OPENMPT_WINESUPPORT_CALL OPENMPT_API_WINE_SYSV
- #elif defined(_MSC_VER)
- #define OPENMPT_WINESUPPORT_CALL OPENMPT_API_WINE_MS_CDECL
- #elif defined(__GNUC__) || defined(__clang__)
- #define OPENMPT_WINESUPPORT_CALL OPENMPT_API_WINE_SYSV
- #endif
- #define OPENMPT_WINESUPPORT_WRAPPER_CALL OPENMPT_API_WINE_MS_CDECL
- #if defined(MPT_BUILD_WINESUPPORT)
- #define OPENMPT_WINESUPPORT_API OPENMPT_API_HELPER_EXPORT
- #else
- #define OPENMPT_WINESUPPORT_API OPENMPT_API_HELPER_IMPORT
- #endif
- #if defined(MPT_BUILD_WINESUPPORT_WRAPPER)
- #define OPENMPT_WINESUPPORT_WRAPPER_API OPENMPT_API_HELPER_EXPORT
- #else
- #define OPENMPT_WINESUPPORT_WRAPPER_API OPENMPT_API_HELPER_IMPORT
- #endif
- #endif
- #endif // OPENMPT_WNESUPPORT_CONFIG_H
|