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