File: cdefs.h

package info (click to toggle)
glibc 2.42-6
  • links: PTS, VCS
  • area: main
  • in suites: experimental, forky, sid
  • size: 312,360 kB
  • sloc: ansic: 1,060,858; asm: 238,416; makefile: 20,960; python: 13,509; sh: 11,828; cpp: 5,188; awk: 1,794; perl: 317; yacc: 292; pascal: 182; sed: 19
file content (66 lines) | stat: -rw-r--r-- 2,137 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#ifndef _SYS_CDEFS_H

/* This is outside of _ISOMAC to enforce that _Static_assert always
   uses the two-argument form.  This can be removed once the minimum
   GCC version used to compile glibc is GCC 9.1.  */
#ifndef __cplusplus
# define _Static_assert(expr, diagnostic) _Static_assert (expr, diagnostic)
#endif

#include <misc/sys/cdefs.h>

#ifndef _ISOMAC
/* The compiler will optimize based on the knowledge the parameter is
   not NULL.  This will omit tests.  A robust implementation cannot allow
   this so when compiling glibc itself we ignore this attribute.  */
# undef __nonnull
# define __nonnull(params)

extern void __chk_fail (void) __attribute__ ((__noreturn__));
libc_hidden_proto (__chk_fail)
rtld_hidden_proto (__chk_fail)

/* If we are using redirects internally to support long double,
   we need to tweak some macros to ensure the PLT bypass tricks
   continue to work in libc. */
#if __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 && IS_IN (libc) && defined SHARED

# undef __LDBL_REDIR_DECL
# define __LDBL_REDIR_DECL(func) \
   extern __typeof(func) func __asm (__ASMNAME ("__GI____ieee128_" #func));

# undef libc_hidden_ldbl_proto
# define libc_hidden_ldbl_proto(func, attrs...) \
   extern __typeof(func) ___ieee128_ ## func; \
   libc_hidden_proto (___ieee128_ ## func, ##attrs);

# undef __LDBL_REDIR2_DECL
# define __LDBL_REDIR2_DECL(func) \
   extern __typeof(__ ## func) __ ## func __asm (__ASMNAME ("__GI____ieee128___" #func));

#endif

#if defined SHARED
#if IS_IN (libc) && __USE_FORTIFY_LEVEL > 0 && defined __fortify_function

#undef __REDIRECT_FORTIFY
#define __REDIRECT_FORTIFY(name, proto, alias) \
  __REDIRECT(name, proto, __GI_##alias)

#undef __REDIRECT_FORTIFY_NTH
#define __REDIRECT_FORTIFY_NTH(name, proto, alias) \
  __REDIRECT_NTH(name, proto, __GI_##alias)

#endif
#endif /* defined SHARED */

#endif /* !defined _ISOMAC */

/*  Prevents a function from being considered for inlining and cloning.  */
#ifdef __clang__
# define __attribute_optimization_barrier__ __attribute__ ((optnone))
#else
# define __attribute_optimization_barrier__ __attribute__ ((noinline, noclone))
#endif

#endif