123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577 |
- #ifndef _SYS_CDEFS_H_
- #define _SYS_CDEFS_H_
- #if defined(__cplusplus)
- #define __BEGIN_DECLS extern "C" {
- #define __END_DECLS }
- #else
- #define __BEGIN_DECLS
- #define __END_DECLS
- #endif
- #if defined(__GNUC__) || defined(__INTEL_COMPILER)
- #if __GNUC__ >= 3 || defined(__INTEL_COMPILER)
- #define __GNUCLIKE_ASM 3
- #define __GNUCLIKE_MATH_BUILTIN_CONSTANTS
- #else
- #define __GNUCLIKE_ASM 2
- #endif
- #define __GNUCLIKE___TYPEOF 1
- #define __GNUCLIKE___OFFSETOF 1
- #define __GNUCLIKE___SECTION 1
- #ifndef __INTEL_COMPILER
- # define __GNUCLIKE_CTOR_SECTION_HANDLING 1
- #endif
- #define __GNUCLIKE_BUILTIN_CONSTANT_P 1
- # if defined(__INTEL_COMPILER) && defined(__cplusplus) \
- && __INTEL_COMPILER < 800
- # undef __GNUCLIKE_BUILTIN_CONSTANT_P
- # endif
- #if (__GNUC_MINOR__ > 95 || __GNUC__ >= 3) && !defined(__INTEL_COMPILER)
- # define __GNUCLIKE_BUILTIN_VARARGS 1
- # define __GNUCLIKE_BUILTIN_STDARG 1
- # define __GNUCLIKE_BUILTIN_VAALIST 1
- #endif
- #if defined(__GNUC__)
- # define __GNUC_VA_LIST_COMPATIBILITY 1
- #endif
- #ifndef __INTEL_COMPILER
- # define __GNUCLIKE_BUILTIN_NEXT_ARG 1
- # define __GNUCLIKE_MATH_BUILTIN_RELOPS
- #endif
- #define __GNUCLIKE_BUILTIN_MEMCPY 1
- #define __CC_SUPPORTS_INLINE 1
- #define __CC_SUPPORTS___INLINE 1
- #define __CC_SUPPORTS___INLINE__ 1
- #define __CC_SUPPORTS___FUNC__ 1
- #define __CC_SUPPORTS_WARNING 1
- #define __CC_SUPPORTS_VARADIC_XXX 1
- #define __CC_SUPPORTS_DYNAMIC_ARRAY_INIT 1
- #endif
- #if defined(__GNUC__) && !defined(__INTEL_COMPILER)
- #define __GNUC_PREREQ__(ma, mi) \
- (__GNUC__ > (ma) || __GNUC__ == (ma) && __GNUC_MINOR__ >= (mi))
- #else
- #define __GNUC_PREREQ__(ma, mi) 0
- #endif
- #if defined(__STDC__) || defined(__cplusplus)
- #define __P(protos) protos
- #define __CONCAT1(x,y) x ## y
- #define __CONCAT(x,y) __CONCAT1(x,y)
- #define __STRING(x) #x
- #define __XSTRING(x) __STRING(x)
- #define __const const
- #define __signed signed
- #define __volatile volatile
- #if defined(__cplusplus)
- #define __inline inline
- #else
- #if !(defined(__CC_SUPPORTS___INLINE))
- #define __inline
- #endif
- #endif
- #else
- #define __P(protos) ()
- #define __CONCAT(x,y) xy
- #define __STRING(x) "x"
- #if !defined(__CC_SUPPORTS___INLINE)
- #define __const
- #define __inline
- #define __signed
- #define __volatile
- #ifndef NO_ANSI_KEYWORDS
- #define const
- #define inline
- #define signed
- #define volatile
- #endif
- #endif
- #endif
- #ifdef lint
- #define __dead2
- #define __pure2
- #define __unused
- #define __packed
- #define __aligned(x)
- #define __section(x)
- #else
- #if !__GNUC_PREREQ__(2, 5) && !defined(__INTEL_COMPILER)
- #define __dead2
- #define __pure2
- #define __unused
- #endif
- #if __GNUC__ == 2 && __GNUC_MINOR__ >= 5 && __GNUC_MINOR__ < 7 && !defined(__INTEL_COMPILER)
- #define __dead2 __attribute__((__noreturn__))
- #define __pure2 __attribute__((__const__))
- #define __unused
- #endif
- #if __GNUC_PREREQ__(2, 7)
- #define __dead2 __attribute__((__noreturn__))
- #define __pure2 __attribute__((__const__))
- #define __unused __attribute__((__unused__))
- #define __used __attribute__((__used__))
- #define __packed __attribute__((__packed__))
- #define __aligned(x) __attribute__((__aligned__(x)))
- #define __section(x) __attribute__((__section__(x)))
- #endif
- #if defined(__INTEL_COMPILER)
- #define __dead2 __attribute__((__noreturn__))
- #define __pure2 __attribute__((__const__))
- #define __unused __attribute__((__unused__))
- #define __used __attribute__((__used__))
- #define __packed __attribute__((__packed__))
- #define __aligned(x) __attribute__((__aligned__(x)))
- #define __section(x) __attribute__((__section__(x)))
- #endif
- #endif
- #if __GNUC_PREREQ__(2, 96)
- #define __malloc_like __attribute__((__malloc__))
- #define __pure __attribute__((__pure__))
- #else
- #define __malloc_like
- #define __pure
- #endif
- #if __GNUC_PREREQ__(3, 1) || (defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 800)
- #define __always_inline __attribute__((__always_inline__))
- #else
- #define __always_inline
- #endif
- #if __GNUC_PREREQ__(3, 1)
- #define __noinline __attribute__ ((__noinline__))
- #else
- #define __noinline
- #endif
- #if __GNUC_PREREQ__(3, 3)
- #define __nonnull(x) __attribute__((__nonnull__(x)))
- #else
- #define __nonnull(x)
- #endif
- #if !__GNUC_PREREQ__(2, 7) && !defined(__INTEL_COMPILER)
- #define __func__ NULL
- #endif
- #if (defined(__INTEL_COMPILER) || (defined(__GNUC__) && __GNUC__ >= 2)) && !defined(__STRICT_ANSI__) || __STDC_VERSION__ >= 199901
- #define __LONG_LONG_SUPPORTED
- #endif
- #if !(__GNUC__ == 2 && __GNUC_MINOR__ == 95)
- #if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901 || defined(lint)
- #define __restrict
- #else
- #define __restrict restrict
- #endif
- #endif
- #if __GNUC_PREREQ__(2, 96)
- #define __predict_true(exp) __builtin_expect((exp), 1)
- #define __predict_false(exp) __builtin_expect((exp), 0)
- #else
- #define __predict_true(exp) (exp)
- #define __predict_false(exp) (exp)
- #endif
- #if __GNUC_PREREQ__(4, 2)
- #define __hidden __attribute__((__visibility__("hidden")))
- #define __exported __attribute__((__visibility__("default")))
- #else
- #define __hidden
- #define __exported
- #endif
- #if __GNUC_PREREQ__(4, 1)
- #define __offsetof(type, field) __builtin_offsetof(type, field)
- #else
- #ifndef __cplusplus
- #define __offsetof(type, field) ((size_t)(&((type *)0)->field))
- #else
- #define __offsetof(type, field) \
- (__offsetof__ (reinterpret_cast <size_t> \
- (&reinterpret_cast <const volatile char &> \
- (static_cast<type *> (0)->field))))
- #endif
- #endif
- #define __rangeof(type, start, end) \
- (__offsetof(type, end) - __offsetof(type, start))
- #if !__GNUC_PREREQ__(2, 7) && !defined(__INTEL_COMPILER)
- #define __printflike(fmtarg, firstvararg)
- #define __scanflike(fmtarg, firstvararg)
- #define __format_arg(fmtarg)
- #else
- #define __printflike(fmtarg, firstvararg) \
- __attribute__((__format__ (__printf__, fmtarg, firstvararg)))
- #define __scanflike(fmtarg, firstvararg) \
- __attribute__((__format__ (__scanf__, fmtarg, firstvararg)))
- #define __format_arg(fmtarg) __attribute__((__format_arg__ (fmtarg)))
- #endif
- #if __FreeBSD_cc_version >= 300001 && defined(__GNUC__) && !defined(__INTEL_COMPILER)
- #define __printf0like(fmtarg, firstvararg) \
- __attribute__((__format__ (__printf0__, fmtarg, firstvararg)))
- #else
- #define __printf0like(fmtarg, firstvararg)
- #endif
- #if defined(__GNUC__) || defined(__INTEL_COMPILER)
- #ifndef __INTEL_COMPILER
- #define __strong_reference(sym,aliassym) \
- extern __typeof (sym) aliassym __attribute__ ((__alias__ (#sym)))
- #endif
- #ifdef __STDC__
- #define __weak_reference(sym,alias) \
- __asm__(".weak " #alias); \
- __asm__(".equ " #alias ", " #sym)
- #define __warn_references(sym,msg) \
- __asm__(".section .gnu.warning." #sym); \
- __asm__(".asciz \"" msg "\"")
- __asm__(".previous")
- #define __sym_compat(sym,impl,verid) \
- __asm__(".symver " #impl ", " #sym "@" #verid)
- #define __sym_default(sym,impl,verid) \
- __asm__(".symver " #impl ", " #sym "@@" #verid)
- #else
- #define __weak_reference(sym,alias) \
- __asm__(".weak alias")
- __asm__(".equ alias, sym")
- #define __warn_references(sym,msg) \
- __asm__(".section .gnu.warning.sym")
- __asm__(".asciz \"msg\"")
- __asm__(".previous")
- #define __sym_compat(sym,impl,verid) \
- __asm__(".symver impl, sym@verid")
- #define __sym_default(impl,sym,verid) \
- __asm__(".symver impl, sym@@verid")
- #endif
- #endif
- #define __GLOBL1(sym) __asm__(".globl " #sym)
- #define __GLOBL(sym) __GLOBL1(sym)
- #if defined(__GNUC__) || defined(__INTEL_COMPILER)
- #define __IDSTRING(name,string) __asm__(".ident\t\"" string "\"")
- #else
- #define __IDSTRING(name,string) static const char name[] __unused = string
- #endif
- #ifndef __FBSDID
- #if !defined(lint) && !defined(STRIP_FBSDID)
- #define __FBSDID(s) __IDSTRING(__CONCAT(__rcsid_,__LINE__),s)
- #else
- #define __FBSDID(s) struct __hack
- #endif
- #endif
- #ifndef __RCSID
- #ifndef NO__RCSID
- #define __RCSID(s) __IDSTRING(__CONCAT(__rcsid_,__LINE__),s)
- #else
- #define __RCSID(s) struct __hack
- #endif
- #endif
- #ifndef __RCSID_SOURCE
- #ifndef NO__RCSID_SOURCE
- #define __RCSID_SOURCE(s) __IDSTRING(__CONCAT(__rcsid_source_,__LINE__),s)
- #else
- #define __RCSID_SOURCE(s) struct __hack
- #endif
- #endif
- #ifndef __SCCSID
- #ifndef NO__SCCSID
- #define __SCCSID(s) __IDSTRING(__CONCAT(__sccsid_,__LINE__),s)
- #else
- #define __SCCSID(s) struct __hack
- #endif
- #endif
- #ifndef __COPYRIGHT
- #ifndef NO__COPYRIGHT
- #define __COPYRIGHT(s) __IDSTRING(__CONCAT(__copyright_,__LINE__),s)
- #else
- #define __COPYRIGHT(s) struct __hack
- #endif
- #endif
- #ifndef __DECONST
- #define __DECONST(type, var) ((type)(uintptr_t)(const void *)(var))
- #endif
- #ifndef __DEVOLATILE
- #define __DEVOLATILE(type, var) ((type)(uintptr_t)(volatile void *)(var))
- #endif
- #ifndef __DEQUALIFY
- #define __DEQUALIFY(type, var) ((type)(uintptr_t)(const volatile void *)(var))
- #endif
- #if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE == 1
- #undef _POSIX_C_SOURCE
- #define _POSIX_C_SOURCE 199009
- #endif
- #if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE == 2
- #undef _POSIX_C_SOURCE
- #define _POSIX_C_SOURCE 199209
- #endif
- #ifdef _XOPEN_SOURCE
- #if _XOPEN_SOURCE - 0 >= 700
- #define __XSI_VISIBLE 700
- #undef _POSIX_C_SOURCE
- #define _POSIX_C_SOURCE 200809
- #elif _XOPEN_SOURCE - 0 >= 600
- #define __XSI_VISIBLE 600
- #undef _POSIX_C_SOURCE
- #define _POSIX_C_SOURCE 200112
- #elif _XOPEN_SOURCE - 0 >= 500
- #define __XSI_VISIBLE 500
- #undef _POSIX_C_SOURCE
- #define _POSIX_C_SOURCE 199506
- #endif
- #endif
- #if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE)
- #define _POSIX_C_SOURCE 198808
- #endif
- #ifdef _POSIX_C_SOURCE
- #if _POSIX_C_SOURCE >= 200809
- #define __POSIX_VISIBLE 200809
- #define __ISO_C_VISIBLE 1999
- #elif _POSIX_C_SOURCE >= 200112
- #define __POSIX_VISIBLE 200112
- #define __ISO_C_VISIBLE 1999
- #elif _POSIX_C_SOURCE >= 199506
- #define __POSIX_VISIBLE 199506
- #define __ISO_C_VISIBLE 1990
- #elif _POSIX_C_SOURCE >= 199309
- #define __POSIX_VISIBLE 199309
- #define __ISO_C_VISIBLE 1990
- #elif _POSIX_C_SOURCE >= 199209
- #define __POSIX_VISIBLE 199209
- #define __ISO_C_VISIBLE 1990
- #elif _POSIX_C_SOURCE >= 199009
- #define __POSIX_VISIBLE 199009
- #define __ISO_C_VISIBLE 1990
- #else
- #define __POSIX_VISIBLE 198808
- #define __ISO_C_VISIBLE 0
- #endif
- #else
- #if defined(_ANSI_SOURCE)
- #define __POSIX_VISIBLE 0
- #define __XSI_VISIBLE 0
- #define __BSD_VISIBLE 0
- #define __ISO_C_VISIBLE 1990
- #elif defined(_C99_SOURCE)
- #define __POSIX_VISIBLE 0
- #define __XSI_VISIBLE 0
- #define __BSD_VISIBLE 0
- #define __ISO_C_VISIBLE 1999
- #else
- #define __POSIX_VISIBLE 200809
- #define __XSI_VISIBLE 700
- #define __BSD_VISIBLE 1
- #define __ISO_C_VISIBLE 1999
- #endif
- #endif
- #endif
|