cdefs.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #ifndef _SYS_CDEFS_H
  2. /* This is outside of _ISOMAC to enforce that _Static_assert always
  3. uses the two-argument form. This can be removed once the minimum
  4. GCC version used to compile glibc is GCC 9.1. */
  5. #ifndef __cplusplus
  6. # define _Static_assert(expr, diagnostic) _Static_assert (expr, diagnostic)
  7. #endif
  8. #include <misc/sys/cdefs.h>
  9. #ifndef _ISOMAC
  10. /* The compiler will optimize based on the knowledge the parameter is
  11. not NULL. This will omit tests. A robust implementation cannot allow
  12. this so when compiling glibc itself we ignore this attribute. */
  13. # undef __nonnull
  14. # define __nonnull(params)
  15. extern void __chk_fail (void) __attribute__ ((__noreturn__));
  16. libc_hidden_proto (__chk_fail)
  17. rtld_hidden_proto (__chk_fail)
  18. /* If we are using redirects internally to support long double,
  19. we need to tweak some macros to ensure the PLT bypass tricks
  20. continue to work in libc. */
  21. #if __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 && IS_IN (libc) && defined SHARED
  22. # undef __LDBL_REDIR_DECL
  23. # define __LDBL_REDIR_DECL(func) \
  24. extern __typeof(func) func __asm (__ASMNAME ("__GI____ieee128_" #func));
  25. # undef libc_hidden_ldbl_proto
  26. # define libc_hidden_ldbl_proto(func, attrs...) \
  27. extern __typeof(func) ___ieee128_ ## func; \
  28. libc_hidden_proto (___ieee128_ ## func, ##attrs);
  29. # undef __LDBL_REDIR2_DECL
  30. # define __LDBL_REDIR2_DECL(func) \
  31. extern __typeof(__ ## func) __ ## func __asm (__ASMNAME ("__GI____ieee128___" #func));
  32. #endif
  33. #endif /* !defined _ISOMAC */
  34. #endif