moab
|
00001 00010 #ifndef moab_COMPILER_HPP 00011 #define moab_COMPILER_HPP 00012 00013 #ifdef IS_BUILDING_MB 00014 00017 00038 #ifdef __cplusplus 00039 # if !defined __GNUC__ || __GNUC__ < 4 || __GNUC_MINOR__ < 5 00040 # define __restrict__ 00041 # endif 00042 #endif 00043 00046 #endif 00047 00050 00069 #ifdef __GNUC__ 00070 #define MB_PRINTF(START) __attribute__((format(printf,(START)+1,(START)+2))) 00071 #else 00072 #define MB_PRINTF(START) 00073 #endif 00074 00081 #if defined _MSC_VER || defined __CYGWIN__ || defined __MINGW32__ \ 00082 || defined __MINGW64__ || defined _WIN32 00083 #if !defined IS_BUILDING_MB || !defined MB_EXPORTS 00084 #define MB_DLL_EXPORT __dllspec(dllexport) 00085 #elif !defined MB_WIN_DLL 00086 #define MB_DLL_EXPORT __dllspec(dllimport) 00087 #else 00088 #define MB_DLL_EXPORT 00089 #endif 00090 #define MB_DLL_HIDDEN 00091 #elif defined __GNUC__ && __GNUC__ > 3 00092 #define MB_DLL_EXPORT __attribute__((visibility("default"))) 00093 #define MB_DLL_HIDDEN __attribute__((visibility("hidden"))) 00094 #else 00095 #define MB_DLL_EXPORT 00096 #define MB_DLL_HIDDEN 00097 #endif 00098 00102 #if defined(__GNUC__) && (1000 * __GNUC__ + __GNUC_MINOR__ ) > 3000 00103 # define MB_DEPRECATED __attribute__((__deprecated__)) 00104 #else 00105 # define MB_DEPRECATED 00106 #endif 00107 00110 #endif // moab_COMPILER_HPP