1 /* Shared library support */
3 #if defined(_WIN32)&&defined(_MSC_VER)
4 #define UL_IMPORT __declspec(dllimport)
5 #define UL_EXPORT __declspec(dllexport)
10 #ifdef GCC_HASCLASSVISIBILITY
11 #define UL_EXPORT __attribute__ ((visibility("default")))
12 #define UL_DLLLOCAL __attribute__ ((visibility("hidden")))
13 #define UL_DLLPUBLIC __attribute__ ((visibility("default")))
20 #endif /* UL_EXPORT */
22 /* Define UL_UTAPI for DLL builds */
24 #ifdef UL_UTDLL_EXPORTS
25 #define UL_UTAPI UL_EXPORT
27 #define UL_UTAPI UL_IMPORT
28 #endif /* UL_UTDLL_EXPORTS */
33 /* Throwable classes must always be visible on GCC in all binaries */
34 #if defined(_WIN32)&&defined(_MSC_VER)
35 #define UL_EXCEPTIONAPI(api) api
36 #elif defined(GCC_HASCLASSVISIBILITY)
37 #define UL_EXCEPTIONAPI(api) UL_EXPORT
39 #define UL_EXCEPTIONAPI(api)
42 /* Other possible solution is to use pragmas */
44 * #pragma GCC visibility push(hidden)
45 * extern void someprivatefunct(int);
46 * #pragma GCC visibility pop
49 /* GCC switches to handle visibility */
52 * -fvisibility-inlines-hidden