File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
libc/include/llvm-libc-macros Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change 9
9
#ifndef __LLVM_LIBC_MACROS_LIMITS_MACROS_H
10
10
#define __LLVM_LIBC_MACROS_LIMITS_MACROS_H
11
11
12
+ #if __has_include_next (< limits .h > )
13
+
12
14
// Suppress `#include_next is a language extension` warnings.
13
15
#ifdef __clang__
14
16
#pragma clang diagnostic push
15
17
#pragma clang diagnostic ignored "-Wgnu-include-next"
16
- #else // gcc
18
+ #elif defined(__GNUC__ ) // gcc
19
+ #if !defined _GCC_LIMITS_H_
20
+ #define _GCC_LIMITS_H_
21
+ #endif
17
22
#pragma GCC system_header
18
- #endif // __clang__
23
+ #endif // __clang__, __GNUC__
19
24
25
+ // Include compiler's header
20
26
#include_next <limits.h>
21
27
22
28
#ifdef __clang__
23
29
#pragma clang diagnostic pop
24
30
#endif // __clang__
25
31
32
+ #endif // __has_include_next(<limits.h>)
33
+
34
+ // Supplement missing macros.
35
+
26
36
#ifndef CHAR_BIT
27
37
#ifdef __CHAR_BIT__
28
38
#define CHAR_BIT __CHAR_BIT__
You can’t perform that action at this time.
0 commit comments