123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378 |
- #ifndef _SYS_CDEFS_H
- #define _SYS_CDEFS_H 1
- #ifndef _FEATURES_H
- # include <features.h>
- #endif
- #if defined __GNUC__ && !defined __STDC__
- # error "You need a ISO C conforming compiler to use the glibc headers"
- #endif
- #undef __P
- #undef __PMT
- #ifdef __GNUC__
- # if __GNUC_PREREQ (4, 6) && !defined _LIBC
- # define __LEAF , __leaf__
- # define __LEAF_ATTR __attribute__ ((__leaf__))
- # else
- # define __LEAF
- # define __LEAF_ATTR
- # endif
- # if !defined __cplusplus && __GNUC_PREREQ (3, 3)
- # define __THROW __attribute__ ((__nothrow__ __LEAF))
- # define __THROWNL __attribute__ ((__nothrow__))
- # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
- # else
- # if defined __cplusplus && __GNUC_PREREQ (2,8)
- # define __THROW throw ()
- # define __THROWNL throw ()
- # define __NTH(fct) __LEAF_ATTR fct throw ()
- # else
- # define __THROW
- # define __THROWNL
- # define __NTH(fct) fct
- # endif
- # endif
- #else
- # define __inline
- # define __THROW
- # define __THROWNL
- # define __NTH(fct) fct
- #endif
- #define __P(args) args
- #define __PMT(args) args
- #define __CONCAT(x,y) x ## y
- #define __STRING(x) #x
- #define __ptr_t void *
- #define __long_double_t long double
- #ifdef __cplusplus
- # define __BEGIN_DECLS extern "C" {
- # define __END_DECLS }
- #else
- # define __BEGIN_DECLS
- # define __END_DECLS
- #endif
- #if defined __cplusplus && defined _GLIBCPP_USE_NAMESPACES
- # define __BEGIN_NAMESPACE_STD namespace std {
- # define __END_NAMESPACE_STD }
- # define __USING_NAMESPACE_STD(name) using std::name;
- # define __BEGIN_NAMESPACE_C99 namespace __c99 {
- # define __END_NAMESPACE_C99 }
- # define __USING_NAMESPACE_C99(name) using __c99::name;
- #else
- # define __BEGIN_NAMESPACE_STD
- # define __END_NAMESPACE_STD
- # define __USING_NAMESPACE_STD(name)
- # define __BEGIN_NAMESPACE_C99
- # define __END_NAMESPACE_C99
- # define __USING_NAMESPACE_C99(name)
- #endif
- #ifndef __BOUNDED_POINTERS__
- # define __bounded
- # define __unbounded
- # define __ptrvalue
- #endif
- #define __bos(ptr) __builtin_object_size (ptr, __USE_FORTIFY_LEVEL > 1)
- #define __bos0(ptr) __builtin_object_size (ptr, 0)
- #define __fortify_function __extern_always_inline __attribute_artificial__
- #if __GNUC_PREREQ (4,3)
- # define __warndecl(name, msg) \
- extern void name (void) __attribute__((__warning__ (msg)))
- # define __warnattr(msg) __attribute__((__warning__ (msg)))
- # define __errordecl(name, msg) \
- extern void name (void) __attribute__((__error__ (msg)))
- #else
- # define __warndecl(name, msg) extern void name (void)
- # define __warnattr(msg)
- # define __errordecl(name, msg) extern void name (void)
- #endif
- #if __GNUC_PREREQ (2,97)
- # define __flexarr []
- #else
- # ifdef __GNUC__
- # define __flexarr [0]
- # else
- # if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
- # define __flexarr []
- # else
- # define __flexarr [1]
- # endif
- # endif
- #endif
- #if defined __GNUC__ && __GNUC__ >= 2
- # define __REDIRECT(name, proto, alias) name proto __asm__ (__ASMNAME (#alias))
- # ifdef __cplusplus
- # define __REDIRECT_NTH(name, proto, alias) \
- name proto __THROW __asm__ (__ASMNAME (#alias))
- # define __REDIRECT_NTHNL(name, proto, alias) \
- name proto __THROWNL __asm__ (__ASMNAME (#alias))
- # else
- # define __REDIRECT_NTH(name, proto, alias) \
- name proto __asm__ (__ASMNAME (#alias)) __THROW
- # define __REDIRECT_NTHNL(name, proto, alias) \
- name proto __asm__ (__ASMNAME (#alias)) __THROWNL
- # endif
- # define __ASMNAME(cname) __ASMNAME2 (__USER_LABEL_PREFIX__, cname)
- # define __ASMNAME2(prefix, cname) __STRING (prefix) cname
- #endif
- #if !defined __GNUC__ || __GNUC__ < 2
- # define __attribute__(xyz)
- #endif
- #if __GNUC_PREREQ (2,96)
- # define __attribute_malloc__ __attribute__ ((__malloc__))
- #else
- # define __attribute_malloc__
- #endif
- #if __GNUC_PREREQ (2,96)
- # define __attribute_pure__ __attribute__ ((__pure__))
- #else
- # define __attribute_pure__
- #endif
- #if __GNUC_PREREQ (2,5)
- # define __attribute_const__ __attribute__ ((__const__))
- #else
- # define __attribute_const__
- #endif
- #if __GNUC_PREREQ (3,1)
- # define __attribute_used__ __attribute__ ((__used__))
- # define __attribute_noinline__ __attribute__ ((__noinline__))
- #else
- # define __attribute_used__ __attribute__ ((__unused__))
- # define __attribute_noinline__
- #endif
- #if __GNUC_PREREQ (3,2)
- # define __attribute_deprecated__ __attribute__ ((__deprecated__))
- #else
- # define __attribute_deprecated__
- #endif
- #if __GNUC_PREREQ (2,8)
- # define __attribute_format_arg__(x) __attribute__ ((__format_arg__ (x)))
- #else
- # define __attribute_format_arg__(x)
- #endif
- #if __GNUC_PREREQ (2,97)
- # define __attribute_format_strfmon__(a,b) \
- __attribute__ ((__format__ (__strfmon__, a, b)))
- #else
- # define __attribute_format_strfmon__(a,b)
- #endif
- #if __GNUC_PREREQ (3,3)
- # define __nonnull(params) __attribute__ ((__nonnull__ params))
- #else
- # define __nonnull(params)
- #endif
- #if __GNUC_PREREQ (3,4)
- # define __attribute_warn_unused_result__ \
- __attribute__ ((__warn_unused_result__))
- # if __USE_FORTIFY_LEVEL > 0
- # define __wur __attribute_warn_unused_result__
- # endif
- #else
- # define __attribute_warn_unused_result__
- #endif
- #ifndef __wur
- # define __wur
- #endif
- #if __GNUC_PREREQ (3,2)
- # define __always_inline __inline __attribute__ ((__always_inline__))
- #else
- # define __always_inline __inline
- #endif
- #if __GNUC_PREREQ (4,3)
- # define __attribute_artificial__ __attribute__ ((__artificial__))
- #else
- # define __attribute_artificial__
- #endif
- #if !defined __cplusplus || __GNUC_PREREQ (4,3)
- # if defined __GNUC_STDC_INLINE__ || defined __cplusplus
- # define __extern_inline extern __inline __attribute__ ((__gnu_inline__))
- # define __extern_always_inline \
- extern __always_inline __attribute__ ((__gnu_inline__))
- # else
- # define __extern_inline extern __inline
- # define __extern_always_inline extern __always_inline
- # endif
- #endif
- #if __GNUC_PREREQ (4,3)
- # define __va_arg_pack() __builtin_va_arg_pack ()
- # define __va_arg_pack_len() __builtin_va_arg_pack_len ()
- #endif
- #if !__GNUC_PREREQ (2,8)
- # define __extension__
- #endif
- #if !__GNUC_PREREQ (2,92)
- # define __restrict
- #endif
- #if __GNUC_PREREQ (3,1) && !defined __GNUG__
- # define __restrict_arr __restrict
- #else
- # ifdef __GNUC__
- # define __restrict_arr
- # else
- # if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
- # define __restrict_arr restrict
- # else
- # define __restrict_arr
- # endif
- # endif
- #endif
- #if __GNUC__ >= 3
- # define __glibc_unlikely(cond) __builtin_expect((cond), 0)
- #else
- # define __glibc_unlikely(cond) (cond)
- #endif
- #endif
|