• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifndef _FEATURES_H
2 #define _FEATURES_H
3 
4 #define _GNU_SOURCE
5 
6 #if defined(_ALL_SOURCE) && !defined(_GNU_SOURCE)
7 #define _GNU_SOURCE 1
8 #endif
9 
10 #if defined(_DEFAULT_SOURCE) && !defined(_BSD_SOURCE)
11 #define _BSD_SOURCE 1
12 #endif
13 
14 #if !defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE) \
15  && !defined(_XOPEN_SOURCE) && !defined(_GNU_SOURCE) \
16  && !defined(_BSD_SOURCE) && !defined(__STRICT_ANSI__)
17 #define _BSD_SOURCE 1
18 #define _XOPEN_SOURCE 700
19 #endif
20 
21 #if __STDC_VERSION__ >= 199901L
22 #define __restrict restrict
23 #elif !defined(__GNUC__)
24 #define __restrict
25 #endif
26 
27 #if __STDC_VERSION__ >= 199901L || defined(__cplusplus)
28 #define __inline inline
29 #elif !defined(__GNUC__)
30 #define __inline
31 #endif
32 
33 #if __STDC_VERSION__ >= 201112L
34 #elif defined(__GNUC__)
35 #define _Noreturn __attribute__((__noreturn__))
36 #else
37 #define _Noreturn
38 #endif
39 
40 #define __REDIR(x,y) __typeof__(x) x __asm__(#y)
41 
42 #endif
43