mirror of
https://github.com/darlinghq/darling-libcxx.git
synced 2025-03-03 09:17:09 +00:00
[libcxx] Fix gcc build.
Attempt to fix a horrible gcc include order problem. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@283762 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
742d878b02
commit
f7b867b342
@ -44,6 +44,22 @@ Macros:
|
||||
#pragma GCC system_header
|
||||
#endif
|
||||
|
||||
#ifndef __GNUC__
|
||||
#include_next <limits.h>
|
||||
#else
|
||||
// GCC header limits.h recursively includes itself through another header called
|
||||
// syslimits.h for some reason. This setup breaks down if we directly
|
||||
// #include_next GCC's limits.h (reasons not entirely clear to me). Therefore,
|
||||
// we manually re-create the necessary include sequence below:
|
||||
|
||||
// Get the system limits.h defines (force recurse into the next level)
|
||||
#define _GCC_LIMITS_H_
|
||||
#define _GCC_NEXT_LIMITS_H
|
||||
#include_next <limits.h>
|
||||
|
||||
// Get the ISO C defines
|
||||
#undef _GCC_LIMITS_H_
|
||||
#include_next <limits.h>
|
||||
#endif // __GNUC__
|
||||
|
||||
#endif // _LIBCPP_LIMITS_H
|
||||
|
Loading…
x
Reference in New Issue
Block a user