Go to the documentation of this file.00001
00002 #ifndef GAUDIKERNEL_KERNEL_H
00003 #define GAUDIKERNEL_KERNEL_H
00004
00005
00006 #ifdef _WIN32
00007
00008 #pragma warning ( disable : 4786 )
00009
00010 #pragma warning ( disable : 4291 )
00011
00012 #pragma warning ( disable : 4250 )
00013 #endif
00014
00015
00016
00017 #ifdef _WIN32
00018 #ifndef NO_LONGLONG_TYPEDEF
00019 typedef __int64 longlong;
00020 typedef unsigned __int64 ulonglong;
00021 #endif
00022
00023 #ifndef LONGLONG_MAX
00024 #define LONGLONG_MAX 0x7FFFFFFFFFFFFFFFLL
00025 #endif
00026 #ifndef LONGLONG_MIN
00027 #define LONGLONG_MIN 0x8000000000000000LL
00028 #endif
00029
00030 #ifndef ULONGLONG_MAX
00031 #define ULONGLONG_MAX 0xFFFFFFFFFFFFFFFFLL
00032 #endif
00033 #ifndef ULONGLONG_MIN
00034 #define ULONGLONG_MIN 0x0000000000000000LL
00035 #endif
00036 #elif defined(__linux) || defined(__APPLE__)
00037 #ifndef NO_LONGLONG_TYPEDEF
00038 typedef long long int longlong;
00039 typedef unsigned long long int ulonglong;
00040 #endif
00041
00042 #ifndef LONGLONG_MAX
00043 #define LONGLONG_MAX 0x7FFFFFFFFFFFFFFFLL
00044 #endif
00045 #ifndef LONGLONG_MIN
00046 #define LONGLONG_MIN 0x8000000000000000LL
00047 #endif
00048
00049 #ifndef ULONGLONG_MAX
00050 #define ULONGLONG_MAX 0xfFFFFFFFFFFFFFFFLL
00051 #endif
00052 #ifndef ULONGLONG_MIN
00053 #define ULONGLONG_MIN 0x0000000000000000LL
00054 #endif
00055 #else
00056
00057 struct __longlong { public: long __data[2]; };
00058 typedef __longlong longlong;
00059 typedef __longlong ulonglong;
00060 static const __longlong LONGLONG_MAX = {0x7FFFFFFF, 0xFFFFFFFF};
00061 static const __longlong LONGLONG_MIN = {0x80000000, 0x00000000};
00062 static const __ulonglong ULONGLONG_MAX = {0xFFFFFFFF, 0xFFFFFFFF};
00063 static const __ulonglong ULONGLONG_MIN = {0x00000000, 0x00000000};
00064 #endif // linux
00065
00066 #ifdef _WIN32
00067 #define TEMPLATE_SPECIALIZATION template <>
00068 #elif defined(__linux) || defined(__APPLE__)
00069 #define TEMPLATE_SPECIALIZATION
00070 #endif
00071
00072
00073
00074 #if !defined(GAUDI_V20_COMPAT) || defined(G21_HIDE_SYMBOLS)
00075
00076
00077 #if __GNUC__ >= 4 && ! defined(__CINT__)
00078 # define GAUDI_HASCLASSVISIBILITY
00079 #endif
00080
00081 #ifdef _WIN32
00082
00083
00084
00085
00086
00087
00088
00089 # define GAUDI_IMPORT
00090 # define GAUDI_EXPORT
00091 # define GAUDI_LOCAL
00092 #else
00093 # if defined(GAUDI_HASCLASSVISIBILITY)
00094 # define GAUDI_IMPORT __attribute__((visibility("default")))
00095 # define GAUDI_EXPORT __attribute__((visibility("default")))
00096 # define GAUDI_LOCAL __attribute__((visibility("hidden")))
00097 # else
00098 # define GAUDI_IMPORT
00099 # define GAUDI_EXPORT
00100 # define GAUDI_LOCAL
00101 # endif
00102 #endif
00103
00104
00105 #ifdef GAUDI_LINKER_LIBRARY
00106 #define GAUDI_API GAUDI_EXPORT
00107 #else
00108 #define GAUDI_API GAUDI_IMPORT
00109 #endif
00110 #else
00111
00112 #define GAUDI_API
00113 #define GAUDI_IMPORT
00114 #define GAUDI_EXPORT
00115 #define GAUDI_LOCAL
00116 #endif // GAUDI_V20_COMPAT
00117
00118
00119
00120
00121
00122 #ifdef __GNUC__
00123 # define LIKELY(x) __builtin_expect((x),1)
00124 # define UNLIKELY(x) __builtin_expect((x),0)
00125 #else
00126 # define LIKELY(x) x
00127 # define UNLIKELY(x) x
00128 #endif
00129
00130
00131 #endif // GAUDIKERNEL_KERNEL_H