Skip to content

Commit b03ddf3

Browse files
committed
Distinguish clang and gcc before setting _GCC_LIMITS_H_.
1 parent 50db524 commit b03ddf3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

libc/include/llvm-libc-macros/limits-macros.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@
1919
#pragma GCC system_header
2020
#endif // __clang__, __GNUC__
2121

22-
#if defined(__GNUC__) && !defined(_GCC_LIMITS_H_)
23-
// The system's limits.h may, in turn, try to #include_next GCC's limits.h.
22+
#if defined(__GNUC__) && !defined(__clang__) && !defined(_GCC_LIMITS_H_)
23+
// The system's limits.h may, in turn, try to #include_next GCC's limits.h when
24+
// building with GCC.
2425
// Define the macro _GCC_LIMITS_H_ to stop its chains of #include_next.
2526
#define _GCC_LIMITS_H_
2627
#endif

0 commit comments

Comments
 (0)