2 //===--------------------------- limits.h ---------------------------------===//
4 // The LLVM Compiler Infrastructure
6 // This file is dual licensed under the MIT and the University of Illinois Open
7 // Source Licenses. See LICENSE.TXT for details.
9 //===----------------------------------------------------------------------===//
11 #ifndef _LIBCPP_LIMITS_H
12 #define _LIBCPP_LIMITS_H
43 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
44 #pragma GCC system_header
48 #include_next <limits.h>
50 // GCC header limits.h recursively includes itself through another header called
51 // syslimits.h for some reason. This setup breaks down if we directly
52 // #include_next GCC's limits.h (reasons not entirely clear to me). Therefore,
53 // we manually re-create the necessary include sequence below:
55 // Get the system limits.h defines (force recurse into the next level)
56 #define _GCC_LIMITS_H_
57 #define _GCC_NEXT_LIMITS_H
58 #include_next <limits.h>
60 // Get the ISO C defines
62 #include_next <limits.h>
65 #endif // _LIBCPP_LIMITS_H