00001
00002
00003
00004
00005
00006 #ifndef _COMPILER_HEADER_INCLUDED_
00007 #define _COMPILER_HEADER_INCLUDED_
00008
00009 #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)
00010 #define _private __attribute__((visibility("hidden")))
00011 #define _friend __attribute__((visibility("protected")))
00012 #endif
00013
00014 #if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96 )
00015 #ifndef likely
00016 #define likely(x) __builtin_expect(!!(x), 1)
00017 #endif
00018 #ifndef unlikely
00019 #define unlikely(x) __builtin_expect(!!(x), 0)
00020 #endif
00021 #endif
00022
00023 #ifdef __WIN32__
00024 #define _public __declspec(dllexport)
00025 #endif
00026
00027 #if __GNUC__ > 1
00028 #define _packed __attribute__((packed))
00029 #define _noreturn __attribute__((noreturn))
00030 #define _purefn __attribute__((pure))
00031 #define _printf(x,y) __attribute__((format(printf,x,y)))
00032 #endif
00033
00034 #if __GNUC__ > 2
00035 #define _nonull(x...) __attribute__((nonnull (x)))
00036 #define _constfn __attribute__((const))
00037 #define _malloc_nocheck __attribute__((malloc))
00038 #endif
00039
00040 #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
00041 #define _check_result __attribute__((warn_unused_result))
00042 #endif
00043
00044 #ifndef _packed
00045 #define _packed
00046 #endif
00047
00048 #ifndef _private
00049 #define _private
00050 #endif
00051
00052 #ifndef _friend
00053 #define _friend
00054 #endif
00055
00056 #ifndef _hidden
00057 #define _hidden
00058 #endif
00059
00060 #ifndef _public
00061 #define _public
00062 #endif
00063
00064 #ifndef _noreturn
00065 #define _noreturn
00066 #endif
00067
00068 #ifndef _purefn
00069 #define _purefn
00070 #endif
00071
00072 #ifndef _printf
00073 #define _printf(x,y)
00074 #endif
00075
00076 #if 1
00077 #undef _nonull
00078 #define _nonull(x...)
00079 #endif
00080
00081 #ifndef _malloc_nocheck
00082 #define _malloc_nocheck
00083 #endif
00084
00085 #ifndef _constfn
00086 #define _constfn
00087 #endif
00088
00089 #ifndef _check_result
00090 #define _check_result
00091 #endif
00092
00093 #ifndef _malloc
00094 #define _malloc _malloc_nocheck _check_result
00095 #endif
00096
00097 #ifndef likely
00098 #define likely(x) (x)
00099 #endif
00100
00101 #ifndef unlikely
00102 #define unlikely(x) (x)
00103 #endif
00104
00105 #define BITMASK_ANY (-1UL)
00106 typedef unsigned long bitmask_t;
00107
00108 #endif