workaround gcc got-register-reload performance problems in malloc
[musl] / include / features.h
1 #ifndef _FEATURES_H
2 #define _FEATURES_H
3
4 #if !defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE) \
5  && !defined(_XOPEN_SOURCE) && !defined(_GNU_SOURCE) \
6  && !defined(_BSD_SOURCE) && !defined(__STRICT_ANSI__)
7 #define _BSD_SOURCE 1
8 #define _XOPEN_SOURCE 700
9 #endif
10
11 #if __STDC_VERSION__ >= 199901L
12 #define __restrict restrict
13 #elif !defined(__GNUC__)
14 #define __restrict
15 #endif
16
17 #if __STDC_VERSION__ >= 199901L || defined(__cplusplus)
18 #define __inline inline
19 #endif
20
21 #if __STDC_VERSION__ >= 201112L
22 #elif defined(__GNUC__)
23 #define _Noreturn __attribute__((__noreturn__))
24 #else
25 #define _Noreturn
26 #endif
27
28 #endif