00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef __SYS_Visibility_h__
00014 #define __SYS_Visibility_h__
00015
00016 #if defined(__GNUC__)
00017 #define SYS_CHECK_GCC(MAJOR, MINOR) \
00018 (__GNUC__ > MAJOR || (__GNUC__ == MAJOR && __GNUC_MINOR__ >= MINOR))
00019 #else
00020 #define SYS_CHECK_GCC(MAJOR, MINOR) 0
00021 #endif
00022
00023 #if defined(WIN32) && !defined(MAKING_STATIC)
00024 #define SYS_VISIBILITY_EXPORT __declspec(dllexport)
00025 #define SYS_VISIBILITY_IMPORT __declspec(dllimport)
00026 #elif defined(__GNUC__) && SYS_CHECK_GCC(4, 2) && !defined(MAKING_STATIC)
00027 #define SYS_VISIBILITY_EXPORT __attribute__((visibility("default")))
00028 #define SYS_VISIBILITY_IMPORT __attribute__((visibility("default")))
00029 #else
00030 #define SYS_VISIBILITY_EXPORT
00031 #define SYS_VISIBILITY_IMPORT
00032 #endif
00033
00034 #endif