Go to the documentation of this file.
27 #ifndef __SYS_Visibility_h__
28 #define __SYS_Visibility_h__
32 #if !defined(MAKING_STATIC)
33 # define SYS_VISIBILITY_ENABLE 1
34 #elif !defined(WIN32) // && defined(MAKING_STATIC)
35 # define SYS_VISIBILITY_ENABLE 1
37 # define SYS_VISIBILITY_ENABLE 0
40 #if SYS_VISIBILITY_ENABLE
42 # define SYS_VISIBILITY_EXPORT __declspec(dllexport)
43 # define SYS_VISIBILITY_IMPORT __declspec(dllimport)
44 # define SYS_VISIBILITY_EXPORT_TINST SYS_VISIBILITY_EXPORT
45 # define SYS_VISIBILITY_IMPORT_TINST SYS_VISIBILITY_IMPORT
54 # define SYS_VISIBILITY_EXPORT_EXTERN_TEMPLATE(...) \
56 # define SYS_VISIBILITY_IMPORT_EXTERN_TEMPLATE(...) \
57 extern template class SYS_VISIBILITY_IMPORT __VA_ARGS__
58 # elif (SYS_IS_CLANG_GE(3, 3) || SYS_IS_GCC_GE(4, 7))
62 # define SYS_VISIBILITY_EXPORT __attribute__((visibility("default")))
63 # define SYS_VISIBILITY_IMPORT __attribute__((visibility("default")))
64 # define SYS_VISIBILITY_EXPORT_TMPL SYS_VISIBILITY_EXPORT
65 # define SYS_VISIBILITY_IMPORT_TMPL SYS_VISIBILITY_IMPORT
66 # define SYS_VISIBILITY_EXPORT_TINST SYS_VISIBILITY_EXPORT
67 # define SYS_VISIBILITY_IMPORT_TINST SYS_VISIBILITY_IMPORT
68 # define SYS_VISIBILITY_EXPORT_EXTERN_TEMPLATE(...) \
69 extern template class SYS_VISIBILITY_EXPORT __VA_ARGS__
70 # define SYS_VISIBILITY_IMPORT_EXTERN_TEMPLATE(...) \
71 extern template class SYS_VISIBILITY_IMPORT __VA_ARGS__
72 # elif SYS_IS_GCC_GE(4, 2)
73 # define SYS_VISIBILITY_EXPORT __attribute__((visibility("default")))
74 # define SYS_VISIBILITY_IMPORT __attribute__((visibility("default")))
78 #undef SYS_VISIBILITY_ENABLE
80 #ifndef SYS_VISIBILITY_EXPORT
81 # define SYS_VISIBILITY_EXPORT
84 #ifndef SYS_VISIBILITY_IMPORT
85 # define SYS_VISIBILITY_IMPORT
88 #ifndef SYS_VISIBILITY_EXPORT_TMPL
89 # define SYS_VISIBILITY_EXPORT_TMPL
92 #ifndef SYS_VISIBILITY_IMPORT_TMPL
93 # define SYS_VISIBILITY_IMPORT_TMPL
96 #ifndef SYS_VISIBILITY_EXPORT_TINST
97 # define SYS_VISIBILITY_EXPORT_TINST
100 #ifndef SYS_VISIBILITY_IMPORT_TINST
101 # define SYS_VISIBILITY_IMPORT_TINST
104 #ifndef SYS_VISIBILITY_EXPORT_EXTERN_TEMPLATE
105 # define SYS_VISIBILITY_EXPORT_EXTERN_TEMPLATE(...)
107 #ifndef SYS_VISIBILITY_IMPORT_EXTERN_TEMPLATE
108 # define SYS_VISIBILITY_IMPORT_EXTERN_TEMPLATE(...)