mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-02 02:32:27 +00:00
Upgrade to 2022-era LLVM LIBCXX
This commit is contained in:
parent
2f4ca71f26
commit
8e68384e15
2078 changed files with 165657 additions and 65010 deletions
31
third_party/libcxx/limits.h
vendored
31
third_party/libcxx/limits.h
vendored
|
@ -1,5 +1,5 @@
|
|||
// -*- C++ -*-
|
||||
//===--------------------------- limits.h ---------------------------------===//
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
// See https://llvm.org/LICENSE.txt for license information.
|
||||
|
@ -37,12 +37,35 @@ Macros:
|
|||
|
||||
*/
|
||||
|
||||
#include "third_party/libcxx/__config"
|
||||
#include <__config>
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||
#pragma GCC system_header
|
||||
# pragma GCC system_header
|
||||
#endif
|
||||
|
||||
#include "libc/isystem/limits.h"
|
||||
#ifdef _LIBCPP_COMPILER_GCC
|
||||
|
||||
// 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).
|
||||
// See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107795 for more details.
|
||||
// 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>
|
||||
|
||||
#else
|
||||
|
||||
# if __has_include_next(<limits.h>)
|
||||
# include_next <limits.h>
|
||||
# endif
|
||||
|
||||
#endif // _LIBCPP_COMPILER_GCC
|
||||
|
||||
#endif // _LIBCPP_LIMITS_H
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue