Prove that Makefile is fully defined

The whole repository is now buildable with GNU Make Landlock sandboxing.
This proves that no Makefile targets exist which touch files other than
their declared prerequisites. In order to do this, we had to:

  1. Stop code morphing GCC output in package.com and instead run a
     newly introduced FIXUPOBJ.COM command after GCC invocations.

  2. Disable all the crumby Python unit tests that do things like create
     files in the current directory, or rename() files between folders.
     This ended up being a lot of tests, but most of them are still ok.

  3. Introduce an .UNSANDBOXED variable to GNU Make to disable Landlock.
     We currently only do this for things like `make tags`.

  4. This change deletes some GNU Make code that was preventing the
     execve() optimization from working. This means it should no longer
     be necessary in most cases for command invocations to be indirected
     through the cocmd interpreter.

  5. Missing dependencies had to be declared in certain places, in cases
     where they couldn't be automatically determined by MKDEPS.COM

  6. The libcxx header situation has finally been tamed. One of the
     things that makes this difficult is MKDEPS.COM only wants to
     consider the first 64kb of a file, in order to go fast. But libcxx
     likes to have #include lines buried after huge documentation.

  7. An .UNVEIL variable has been introduced to GNU Make just in case
     we ever wish to explicitly specify additional things that need to
     be whitelisted which aren't strictly prerequisites. This works in
     a manner similar to the recently introduced .EXTRA_PREREQS feature.

There's now a new build/bootstrap/make.com prebuilt binary available. It
should no longer be possible to write invalid Makefile code.
This commit is contained in:
Justine Tunney 2022-08-06 03:51:50 -07:00
parent acdf591833
commit cf93ecbbb2
181 changed files with 1902 additions and 1986 deletions

View file

@ -9,6 +9,7 @@
#ifndef _LIBCPP_CONFIG
#define _LIBCPP_CONFIG
#include "libc/isystem/features.h"
#define _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER
#define _LIBCPP_HAS_NO_THREADS
@ -218,7 +219,6 @@
// Need to detect which libc we're using if we're on Linux.
#if defined(__linux__)
# include "libc/isystem/features.h"
# if defined(__GLIBC_PREREQ)
# define _LIBCPP_GLIBC_PREREQ(a, b) __GLIBC_PREREQ(a, b)
# else
@ -246,68 +246,6 @@
# endif // __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
#endif // __BYTE_ORDER__
#ifdef __FreeBSD__
# include "third_party/libcxx/sys/endian.h"
# include "third_party/libcxx/osreldate.h"
# if _BYTE_ORDER == _LITTLE_ENDIAN
# define _LIBCPP_LITTLE_ENDIAN
# else // _BYTE_ORDER == _LITTLE_ENDIAN
# define _LIBCPP_BIG_ENDIAN
# endif // _BYTE_ORDER == _LITTLE_ENDIAN
# ifndef __LONG_LONG_SUPPORTED
# define _LIBCPP_HAS_NO_LONG_LONG
# endif // __LONG_LONG_SUPPORTED
#endif // __FreeBSD__
#ifdef __NetBSD__
# include "third_party/libcxx/sys/endian.h"
# if _BYTE_ORDER == _LITTLE_ENDIAN
# define _LIBCPP_LITTLE_ENDIAN
# else // _BYTE_ORDER == _LITTLE_ENDIAN
# define _LIBCPP_BIG_ENDIAN
# endif // _BYTE_ORDER == _LITTLE_ENDIAN
# define _LIBCPP_HAS_QUICK_EXIT
#endif // __NetBSD__
#if defined(_WIN32)
# define _LIBCPP_WIN32API
# define _LIBCPP_LITTLE_ENDIAN
# define _LIBCPP_SHORT_WCHAR 1
// Both MinGW and native MSVC provide a "MSVC"-like environment
# define _LIBCPP_MSVCRT_LIKE
// If mingw not explicitly detected, assume using MS C runtime only if
// a MS compatibility version is specified.
# if defined(_MSC_VER) && !defined(__MINGW32__)
# define _LIBCPP_MSVCRT // Using Microsoft's C Runtime library
# endif
# if (defined(_M_AMD64) || defined(__x86_64__)) || (defined(_M_ARM) || defined(__arm__))
# define _LIBCPP_HAS_BITSCAN64
# endif
# define _LIBCPP_HAS_OPEN_WITH_WCHAR
# if defined(_LIBCPP_MSVCRT)
# define _LIBCPP_HAS_QUICK_EXIT
# endif
// Some CRT APIs are unavailable to store apps
# if defined(WINAPI_FAMILY)
# include "third_party/libcxx/winapifamily.h"
# if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) && \
(!defined(WINAPI_PARTITION_SYSTEM) || \
!WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_SYSTEM))
# define _LIBCPP_WINDOWS_STORE_APP
# endif
# endif
#endif // defined(_WIN32)
#ifdef __sun__
# include "third_party/libcxx/sys/isa_defs.h"
# ifdef _LITTLE_ENDIAN
# define _LIBCPP_LITTLE_ENDIAN
# else
# define _LIBCPP_BIG_ENDIAN
# endif
#endif // __sun__
#if defined(__CloudABI__)
// Certain architectures provide arc4random(). Prefer using
// arc4random() over /dev/{u,}random to make it possible to obtain
@ -328,7 +266,7 @@
#endif
#if !defined(_LIBCPP_LITTLE_ENDIAN) && !defined(_LIBCPP_BIG_ENDIAN)
# include "libc/isystem/endian.h"
#include "libc/isystem/endian.h"
# if __BYTE_ORDER == __LITTLE_ENDIAN
# define _LIBCPP_LITTLE_ENDIAN
# elif __BYTE_ORDER == __BIG_ENDIAN

View file

@ -18,13 +18,13 @@
#endif
#if defined(_LIBCPP_HAS_NO_NULLPTR)
# include "third_party/libcxx/cstddef"
#include "third_party/libcxx/cstddef"
#endif
#if _LIBCPP_DEBUG_LEVEL >= 1 || defined(_LIBCPP_BUILDING_LIBRARY)
# include "third_party/libcxx/cstdlib"
# include "third_party/libcxx/cstdio"
# include "third_party/libcxx/cstddef"
#include "third_party/libcxx/cstdlib"
#include "third_party/libcxx/cstdio"
#include "third_party/libcxx/cstddef"
#endif
#if _LIBCPP_DEBUG_LEVEL >= 1 && !defined(_LIBCPP_ASSERT)

View file

@ -10,6 +10,9 @@
#ifndef _LIBCPP___ERRC
#define _LIBCPP___ERRC
#include "third_party/libcxx/__config"
#include "third_party/libcxx/cerrno"
/*
system_error synopsis
@ -100,9 +103,6 @@ enum class errc
*/
#include "third_party/libcxx/__config"
#include "third_party/libcxx/cerrno"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif

View file

@ -10,6 +10,23 @@
#ifndef _LIBCPP___STRING
#define _LIBCPP___STRING
#include "third_party/libcxx/__config"
#include "third_party/libcxx/algorithm" // for search and min
#include "third_party/libcxx/cstdio" // For EOF.
#include "third_party/libcxx/memory" // for __murmur2_or_cityhash
#include "third_party/libcxx/__debug"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_PUSH_MACROS
#include "third_party/libcxx/__undef_macros"
_LIBCPP_BEGIN_NAMESPACE_STD
/*
string synopsis
@ -52,23 +69,6 @@ template <> struct char_traits<char8_t>; // c++20
*/
#include "third_party/libcxx/__config"
#include "third_party/libcxx/algorithm" // for search and min
#include "third_party/libcxx/cstdio" // For EOF.
#include "third_party/libcxx/memory" // for __murmur2_or_cityhash
#include "third_party/libcxx/__debug"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_PUSH_MACROS
#include "third_party/libcxx/__undef_macros"
_LIBCPP_BEGIN_NAMESPACE_STD
// char_traits
template <class _CharT>

View file

@ -10,6 +10,34 @@
#ifndef _LIBCPP_ALGORITHM
#define _LIBCPP_ALGORITHM
#include "third_party/libcxx/__config"
#include "third_party/libcxx/initializer_list"
#include "third_party/libcxx/type_traits"
#include "third_party/libcxx/cstring"
#include "third_party/libcxx/utility" // needed to provide swap_ranges.
#include "third_party/libcxx/memory"
#include "third_party/libcxx/functional"
#include "third_party/libcxx/iterator"
#include "third_party/libcxx/cstddef"
#include "third_party/libcxx/bit"
#include "third_party/libcxx/version"
#if defined(_LIBCPP_HAS_PARALLEL_ALGORITHMS) && _LIBCPP_STD_VER >= 17
# include "third_party/libcxx/__pstl_algorithm"
#endif
#include "third_party/libcxx/__debug"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_PUSH_MACROS
#include "third_party/libcxx/__undef_macros"
_LIBCPP_BEGIN_NAMESPACE_STD
/*
algorithm synopsis
@ -635,30 +663,6 @@ template <class BidirectionalIterator, class Compare>
*/
#include "third_party/libcxx/__config"
#include "third_party/libcxx/initializer_list"
#include "third_party/libcxx/type_traits"
#include "third_party/libcxx/cstring"
#include "third_party/libcxx/utility" // needed to provide swap_ranges.
#include "third_party/libcxx/memory"
#include "third_party/libcxx/functional"
#include "third_party/libcxx/iterator"
#include "third_party/libcxx/cstddef"
#include "third_party/libcxx/bit"
#include "third_party/libcxx/version"
#include "third_party/libcxx/__debug"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_PUSH_MACROS
#include "third_party/libcxx/__undef_macros"
_LIBCPP_BEGIN_NAMESPACE_STD
// I'd like to replace these with _VSTD::equal_to<void>, but can't because:
// * That only works with C++14 and later, and
// * We haven't included <functional> here.
@ -5678,8 +5682,4 @@ _LIBCPP_END_NAMESPACE_STD
_LIBCPP_POP_MACROS
#if defined(_LIBCPP_HAS_PARALLEL_ALGORITHMS) && _LIBCPP_STD_VER >= 17
# include "third_party/libcxx/__pstl_algorithm"
#endif
#endif // _LIBCPP_ALGORITHM

View file

@ -10,6 +10,23 @@
#ifndef _LIBCPP_ARRAY
#define _LIBCPP_ARRAY
#include "third_party/libcxx/__config"
#include "third_party/libcxx/__tuple"
#include "third_party/libcxx/type_traits"
#include "third_party/libcxx/utility"
#include "third_party/libcxx/iterator"
#include "third_party/libcxx/algorithm"
#include "third_party/libcxx/stdexcept"
#include "third_party/libcxx/cstdlib" // for _LIBCPP_UNREACHABLE
#include "third_party/libcxx/version"
#include "third_party/libcxx/__debug"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
/*
array synopsis
@ -103,25 +120,6 @@ template <size_t I, class T, size_t N> const T&& get(const array<T, N>&&) noexce
*/
#include "third_party/libcxx/__config"
#include "third_party/libcxx/__tuple"
#include "third_party/libcxx/type_traits"
#include "third_party/libcxx/utility"
#include "third_party/libcxx/iterator"
#include "third_party/libcxx/algorithm"
#include "third_party/libcxx/stdexcept"
#include "third_party/libcxx/cstdlib" // for _LIBCPP_UNREACHABLE
#include "third_party/libcxx/version"
#include "third_party/libcxx/__debug"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp, size_t _Size>
struct _LIBCPP_TEMPLATE_VIS array

View file

@ -11,6 +11,44 @@
#ifndef _LIBCPP_ATOMIC
#define _LIBCPP_ATOMIC
#include "third_party/libcxx/__config"
#include "third_party/libcxx/cstddef"
#include "third_party/libcxx/cstdint"
#include "third_party/libcxx/type_traits"
#include "third_party/libcxx/version"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
#ifdef _LIBCPP_HAS_NO_THREADS
# error <atomic> is not supported on this single threaded system
#endif
#ifdef _LIBCPP_HAS_NO_ATOMIC_HEADER
# error <atomic> is not implemented
#endif
#ifdef kill_dependency
# error C++ standard library is incompatible with <stdatomic.h>
#endif
#define _LIBCPP_CHECK_STORE_MEMORY_ORDER(__m) \
_LIBCPP_DIAGNOSE_WARNING(__m == memory_order_consume || \
__m == memory_order_acquire || \
__m == memory_order_acq_rel, \
"memory order argument to atomic operation is invalid")
#define _LIBCPP_CHECK_LOAD_MEMORY_ORDER(__m) \
_LIBCPP_DIAGNOSE_WARNING(__m == memory_order_release || \
__m == memory_order_acq_rel, \
"memory order argument to atomic operation is invalid")
#define _LIBCPP_CHECK_EXCHANGE_MEMORY_ORDER(__m, __f) \
_LIBCPP_DIAGNOSE_WARNING(__f == memory_order_release || \
__f == memory_order_acq_rel, \
"memory order argument to atomic operation is invalid")
_LIBCPP_BEGIN_NAMESPACE_STD
/*
atomic synopsis
@ -547,44 +585,6 @@ void atomic_signal_fence(memory_order m) noexcept;
*/
#include "third_party/libcxx/__config"
#include "third_party/libcxx/cstddef"
#include "third_party/libcxx/cstdint"
#include "third_party/libcxx/type_traits"
#include "third_party/libcxx/version"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
#ifdef _LIBCPP_HAS_NO_THREADS
# error <atomic> is not supported on this single threaded system
#endif
#ifdef _LIBCPP_HAS_NO_ATOMIC_HEADER
# error <atomic> is not implemented
#endif
#ifdef kill_dependency
# error C++ standard library is incompatible with <stdatomic.h>
#endif
#define _LIBCPP_CHECK_STORE_MEMORY_ORDER(__m) \
_LIBCPP_DIAGNOSE_WARNING(__m == memory_order_consume || \
__m == memory_order_acquire || \
__m == memory_order_acq_rel, \
"memory order argument to atomic operation is invalid")
#define _LIBCPP_CHECK_LOAD_MEMORY_ORDER(__m) \
_LIBCPP_DIAGNOSE_WARNING(__m == memory_order_release || \
__m == memory_order_acq_rel, \
"memory order argument to atomic operation is invalid")
#define _LIBCPP_CHECK_EXCHANGE_MEMORY_ORDER(__m, __f) \
_LIBCPP_DIAGNOSE_WARNING(__f == memory_order_release || \
__f == memory_order_acq_rel, \
"memory order argument to atomic operation is invalid")
_LIBCPP_BEGIN_NAMESPACE_STD
// Figure out what the underlying type for `memory_order` would be if it were
// declared as an unscoped enum (accounting for -fshort-enums). Use this result
// to pin the underlying type in C++20.

View file

@ -10,6 +10,21 @@
#ifndef _LIBCPP_BIT
#define _LIBCPP_BIT
#include "third_party/libcxx/__config"
#include "third_party/libcxx/limits"
#include "third_party/libcxx/type_traits"
#include "third_party/libcxx/version"
#include "third_party/libcxx/__debug"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_PUSH_MACROS
#include "third_party/libcxx/__undef_macros"
_LIBCPP_BEGIN_NAMESPACE_STD
/*
bit synopsis
@ -53,21 +68,6 @@ namespace std {
*/
#include "third_party/libcxx/__config"
#include "third_party/libcxx/limits"
#include "third_party/libcxx/type_traits"
#include "third_party/libcxx/version"
#include "third_party/libcxx/__debug"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_PUSH_MACROS
#include "third_party/libcxx/__undef_macros"
_LIBCPP_BEGIN_NAMESPACE_STD
#ifndef _LIBCPP_COMPILER_MSVC
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR

View file

@ -10,6 +10,25 @@
#ifndef _LIBCPP_BITSET
#define _LIBCPP_BITSET
#include "third_party/libcxx/__config"
#include "third_party/libcxx/__bit_reference"
#include "third_party/libcxx/cstddef"
#include "third_party/libcxx/climits"
#include "third_party/libcxx/string"
#include "third_party/libcxx/stdexcept"
#include "third_party/libcxx/iosfwd"
#include "third_party/libcxx/__functional_base"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_PUSH_MACROS
#include "third_party/libcxx/__undef_macros"
_LIBCPP_BEGIN_NAMESPACE_STD
/*
bitset synopsis
@ -112,25 +131,6 @@ template <size_t N> struct hash<std::bitset<N>>;
*/
#include "third_party/libcxx/__config"
#include "third_party/libcxx/__bit_reference"
#include "third_party/libcxx/cstddef"
#include "third_party/libcxx/climits"
#include "third_party/libcxx/string"
#include "third_party/libcxx/stdexcept"
#include "third_party/libcxx/iosfwd"
#include "third_party/libcxx/__functional_base"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_PUSH_MACROS
#include "third_party/libcxx/__undef_macros"
_LIBCPP_BEGIN_NAMESPACE_STD
template <size_t _N_words, size_t _Size>
class __bitset;

View file

@ -10,6 +10,9 @@
#ifndef _LIBCPP_CERRNO
#define _LIBCPP_CERRNO
#include "third_party/libcxx/__config"
#include "third_party/libcxx/errno.h"
/*
cerrno synopsis
@ -22,9 +25,6 @@ Macros:
*/
#include "third_party/libcxx/__config"
#include "third_party/libcxx/errno.h"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif

View file

@ -10,6 +10,24 @@
#ifndef _LIBCPP_CHARCONV
#define _LIBCPP_CHARCONV
#include "third_party/libcxx/__errc"
#include "third_party/libcxx/type_traits"
#include "third_party/libcxx/limits"
#include "third_party/libcxx/string.h"
#include "libc/literal.h"
#include "third_party/libcxx/math.h"
#include "third_party/libcxx/__debug"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_PUSH_MACROS
#include "third_party/libcxx/__undef_macros"
_LIBCPP_BEGIN_NAMESPACE_STD
/*
charconv synopsis
@ -73,24 +91,6 @@ namespace std {
*/
#include "third_party/libcxx/__errc"
#include "third_party/libcxx/type_traits"
#include "third_party/libcxx/limits"
#include "third_party/libcxx/string.h"
#include "libc/literal.h"
#include "third_party/libcxx/math.h"
#include "third_party/libcxx/__debug"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_PUSH_MACROS
#include "third_party/libcxx/__undef_macros"
_LIBCPP_BEGIN_NAMESPACE_STD
namespace __itoa {
_LIBCPP_FUNC_VIS char* __u64toa(uint64_t __value, char* __buffer);
_LIBCPP_FUNC_VIS char* __u32toa(uint32_t __value, char* __buffer);

View file

@ -10,6 +10,28 @@
#ifndef _LIBCPP_CHRONO
#define _LIBCPP_CHRONO
#include "third_party/libcxx/__config"
#include "third_party/libcxx/ctime"
#include "third_party/libcxx/type_traits"
#include "third_party/libcxx/ratio"
#include "third_party/libcxx/limits"
#include "third_party/libcxx/version"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_PUSH_MACROS
#include "third_party/libcxx/__undef_macros"
#ifndef _LIBCPP_CXX03_LANG
_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
struct _FilesystemClock;
_LIBCPP_END_NAMESPACE_FILESYSTEM
#endif // !_LIBCPP_CXX03_LANG
_LIBCPP_BEGIN_NAMESPACE_STD
/*
chrono synopsis
@ -823,28 +845,6 @@ constexpr chrono::year operator ""y(unsigned lo
} // std
*/
#include "third_party/libcxx/__config"
#include "third_party/libcxx/ctime"
#include "third_party/libcxx/type_traits"
#include "third_party/libcxx/ratio"
#include "third_party/libcxx/limits"
#include "third_party/libcxx/version"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_PUSH_MACROS
#include "third_party/libcxx/__undef_macros"
#ifndef _LIBCPP_CXX03_LANG
_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
struct _FilesystemClock;
_LIBCPP_END_NAMESPACE_FILESYSTEM
#endif // !_LIBCPP_CXX03_LANG
_LIBCPP_BEGIN_NAMESPACE_STD
namespace chrono
{

View file

@ -10,6 +10,20 @@
#ifndef _LIBCPP_CMATH
#define _LIBCPP_CMATH
#include "third_party/libcxx/__config"
#include "third_party/libcxx/math.h"
#include "third_party/libcxx/version"
#include "third_party/libcxx/type_traits"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_PUSH_MACROS
#include "third_party/libcxx/__undef_macros"
_LIBCPP_BEGIN_NAMESPACE_STD
/*
cmath synopsis
@ -300,20 +314,6 @@ long double truncl(long double x);
*/
#include "third_party/libcxx/__config"
#include "third_party/libcxx/math.h"
#include "third_party/libcxx/version"
#include "third_party/libcxx/type_traits"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_PUSH_MACROS
#include "third_party/libcxx/__undef_macros"
_LIBCPP_BEGIN_NAMESPACE_STD
using ::signbit;
using ::fpclassify;
using ::isfinite;

View file

@ -11,6 +11,15 @@
#ifndef _LIBCPP_CODECVT
#define _LIBCPP_CODECVT
#include "third_party/libcxx/__config"
#include "third_party/libcxx/__locale"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
/*
codecvt synopsis
@ -55,15 +64,6 @@ class codecvt_utf8_utf16
*/
#include "third_party/libcxx/__config"
#include "third_party/libcxx/__locale"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
enum codecvt_mode
{
consume_header = 4,

View file

@ -11,6 +11,18 @@
#ifndef _LIBCPP_CONDITION_VARIABLE
#define _LIBCPP_CONDITION_VARIABLE
#include "third_party/libcxx/__config"
#include "third_party/libcxx/__mutex_base"
#include "third_party/libcxx/memory"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
#ifndef _LIBCPP_HAS_NO_THREADS
_LIBCPP_BEGIN_NAMESPACE_STD
/*
condition_variable synopsis
@ -107,18 +119,6 @@ public:
*/
#include "third_party/libcxx/__config"
#include "third_party/libcxx/__mutex_base"
#include "third_party/libcxx/memory"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
#ifndef _LIBCPP_HAS_NO_THREADS
_LIBCPP_BEGIN_NAMESPACE_STD
class _LIBCPP_TYPE_VIS condition_variable_any
{
condition_variable __cv_;

View file

@ -10,6 +10,14 @@
#ifndef _LIBCPP_CSTDARG
#define _LIBCPP_CSTDARG
#include "third_party/libcxx/__config"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
/*
cstdarg synopsis
@ -31,14 +39,6 @@ Types:
*/
#include "third_party/libcxx/__config"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
using ::va_list;
_LIBCPP_END_NAMESPACE_STD

View file

@ -10,6 +10,16 @@
#ifndef _LIBCPP_CSTDINT
#define _LIBCPP_CSTDINT
#include "libc/inttypes.h"
#include "libc/calls/weirdtypes.h"
#include "third_party/libcxx/__config"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
/*
cstdint synopsis
@ -140,16 +150,6 @@ Types:
} // std
*/
#include "libc/inttypes.h"
#include "libc/calls/weirdtypes.h"
#include "third_party/libcxx/__config"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
using::int8_t;
using::int16_t;
using::int32_t;

View file

@ -10,6 +10,15 @@
#ifndef _LIBCPP_CSTDIO
#define _LIBCPP_CSTDIO
#include "third_party/libcxx/__config"
#include "third_party/libcxx/stdio.h"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
/*
cstdio synopsis
@ -95,15 +104,6 @@ void perror(const char* s);
} // std
*/
#include "third_party/libcxx/__config"
#include "third_party/libcxx/stdio.h"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
using ::FILE;
using ::fpos_t;
using ::size_t;

View file

@ -10,6 +10,9 @@
#ifndef _LIBCPP_CSTDLIB
#define _LIBCPP_CSTDLIB
#include "third_party/libcxx/__config"
#include "third_party/libcxx/stdlib.h"
/*
cstdlib synopsis
@ -81,9 +84,6 @@ void *aligned_alloc(size_t alignment, size_t size); // C11
*/
#include "third_party/libcxx/__config"
#include "third_party/libcxx/stdlib.h"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif

View file

@ -10,6 +10,15 @@
#ifndef _LIBCPP_CSTRING
#define _LIBCPP_CSTRING
#include "third_party/libcxx/__config"
#include "third_party/libcxx/string.h"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
/*
cstring synopsis
@ -56,15 +65,6 @@ size_t strlen(const char* s);
*/
#include "third_party/libcxx/__config"
#include "third_party/libcxx/string.h"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
using ::size_t;
using ::memcpy;
using ::memmove;

View file

@ -10,6 +10,16 @@
#ifndef _LIBCPP_CTIME
#define _LIBCPP_CTIME
#include "third_party/libcxx/__config"
#include "libc/calls/weirdtypes.h"
#include "libc/isystem/time.h"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
/*
ctime synopsis
@ -45,16 +55,6 @@ int timespec_get( struct timespec *ts, int base); // C++17
*/
#include "third_party/libcxx/__config"
#include "libc/calls/weirdtypes.h"
#include "libc/isystem/time.h"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
using ::clock_t;
using ::size_t;
using ::time_t;

View file

@ -10,6 +10,17 @@
#ifndef _LIBCPP_CWCHAR
#define _LIBCPP_CWCHAR
#include "third_party/libcxx/__config"
#include "third_party/libcxx/cwctype"
#include "third_party/libcxx/wchar.h"
#include "libc/time/struct/tm.h"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
/*
cwchar synopsis
@ -102,17 +113,6 @@ size_t wcsrtombs(char* restrict dst, const wchar_t** restrict src, size_t len,
*/
#include "third_party/libcxx/__config"
#include "third_party/libcxx/cwctype"
#include "third_party/libcxx/wchar.h"
#include "libc/time/struct/tm.h"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
using ::mbstate_t;
using ::size_t;
using ::tm;

View file

@ -10,6 +10,24 @@
#ifndef _LIBCPP_DEQUE
#define _LIBCPP_DEQUE
#include "third_party/libcxx/__config"
#include "third_party/libcxx/__split_buffer"
#include "third_party/libcxx/type_traits"
#include "third_party/libcxx/initializer_list"
#include "third_party/libcxx/iterator"
#include "third_party/libcxx/algorithm"
#include "third_party/libcxx/stdexcept"
#include "third_party/libcxx/version"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_PUSH_MACROS
#include "third_party/libcxx/__undef_macros"
_LIBCPP_BEGIN_NAMESPACE_STD
/*
deque synopsis
@ -158,25 +176,6 @@ template <class T, class Allocator, class Predicate>
*/
#include "third_party/libcxx/__config"
#include "third_party/libcxx/__split_buffer"
#include "third_party/libcxx/type_traits"
#include "third_party/libcxx/initializer_list"
#include "third_party/libcxx/iterator"
#include "third_party/libcxx/algorithm"
#include "third_party/libcxx/stdexcept"
#include "third_party/libcxx/version"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_PUSH_MACROS
#include "third_party/libcxx/__undef_macros"
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp, class _Allocator> class __deque_base;
template <class _Tp, class _Allocator = allocator<_Tp> > class _LIBCPP_TEMPLATE_VIS deque;

View file

@ -10,6 +10,16 @@
#ifndef _LIBCPP_EXCEPTION
#define _LIBCPP_EXCEPTION
#include "third_party/libcxx/__config"
#include "third_party/libcxx/cstddef"
#include "third_party/libcxx/cstdlib"
#include "third_party/libcxx/type_traits"
#include "third_party/libcxx/version"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
/*
exception synopsis
@ -76,16 +86,6 @@ template <class E> void rethrow_if_nested(const E& e);
*/
#include "third_party/libcxx/__config"
#include "third_party/libcxx/cstddef"
#include "third_party/libcxx/cstdlib"
#include "third_party/libcxx/type_traits"
#include "third_party/libcxx/version"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
namespace std // purposefully not using versioning namespace
{

View file

@ -10,6 +10,21 @@
#ifndef _LIBCPP_FUNCTIONAL
#define _LIBCPP_FUNCTIONAL
#include "third_party/libcxx/__config"
#include "third_party/libcxx/type_traits"
#include "third_party/libcxx/typeinfo"
#include "third_party/libcxx/exception"
#include "third_party/libcxx/memory"
#include "third_party/libcxx/tuple"
#include "third_party/libcxx/utility"
#include "third_party/libcxx/version"
#include "third_party/libcxx/__functional_base"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
/*
functional synopsis
@ -497,21 +512,6 @@ POLICY: For non-variadic implementations, the number of arguments is limited
*/
#include "third_party/libcxx/__config"
#include "third_party/libcxx/type_traits"
#include "third_party/libcxx/typeinfo"
#include "third_party/libcxx/exception"
#include "third_party/libcxx/memory"
#include "third_party/libcxx/tuple"
#include "third_party/libcxx/utility"
#include "third_party/libcxx/version"
#include "third_party/libcxx/__functional_base"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER > 11
@ -2528,7 +2528,7 @@ swap(function<_Rp(_ArgTypes...)>& __x, function<_Rp(_ArgTypes...)>& __y) _NOEXCE
#else // _LIBCPP_CXX03_LANG
#include "third_party/libcxx/__functional_03"
# include "third_party/libcxx/__functional_03"
#endif

View file

@ -10,6 +10,21 @@
#ifndef _LIBCPP_IOS
#define _LIBCPP_IOS
#include "third_party/libcxx/__config"
#include "third_party/libcxx/iosfwd"
#include "third_party/libcxx/__locale"
#include "third_party/libcxx/system_error"
#if !defined(_LIBCPP_HAS_NO_ATOMIC_HEADER)
#include "third_party/libcxx/atomic" // for __xindex_
#endif
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
/*
ios synopsis
@ -210,21 +225,6 @@ storage-class-specifier const error_category& iostream_category() noexcept;
*/
#include "third_party/libcxx/__config"
#include "third_party/libcxx/iosfwd"
#include "third_party/libcxx/__locale"
#include "third_party/libcxx/system_error"
#if !defined(_LIBCPP_HAS_NO_ATOMIC_HEADER)
#include "third_party/libcxx/atomic" // for __xindex_
#endif
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
typedef ptrdiff_t streamsize;
class _LIBCPP_TYPE_VIS ios_base

View file

@ -10,6 +10,15 @@
#ifndef _LIBCPP_IOSFWD
#define _LIBCPP_IOSFWD
#include "third_party/libcxx/__config"
#include "third_party/libcxx/wchar.h" // for mbstate_t
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
/*
iosfwd synopsis
@ -91,15 +100,6 @@ typedef fpos<char_traits<wchar_t>::state_type> wstreampos;
*/
#include "third_party/libcxx/__config"
#include "third_party/libcxx/wchar.h" // for mbstate_t
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
class _LIBCPP_TYPE_VIS ios_base;
template<class _CharT> struct _LIBCPP_TEMPLATE_VIS char_traits;

View file

@ -10,6 +10,20 @@
#ifndef _LIBCPP_ISTREAM
#define _LIBCPP_ISTREAM
#include "third_party/libcxx/__config"
#include "third_party/libcxx/version"
#include "third_party/libcxx/ostream"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_PUSH_MACROS
#include "third_party/libcxx/__undef_macros"
_LIBCPP_BEGIN_NAMESPACE_STD
/*
istream synopsis
@ -158,20 +172,6 @@ template <class charT, class traits, class T>
*/
#include "third_party/libcxx/__config"
#include "third_party/libcxx/version"
#include "third_party/libcxx/ostream"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_PUSH_MACROS
#include "third_party/libcxx/__undef_macros"
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _CharT, class _Traits>
class _LIBCPP_TEMPLATE_VIS basic_istream
: virtual public basic_ios<_CharT, _Traits>

View file

@ -10,6 +10,22 @@
#ifndef _LIBCPP_ITERATOR
#define _LIBCPP_ITERATOR
#include "third_party/libcxx/__config"
#include "third_party/libcxx/iosfwd" // for forward declarations of vector and string.
#include "third_party/libcxx/__functional_base"
#include "third_party/libcxx/type_traits"
#include "third_party/libcxx/cstddef"
#include "third_party/libcxx/initializer_list"
#include "third_party/libcxx/version"
#include "third_party/libcxx/__debug"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
/*
iterator synopsis
@ -416,25 +432,6 @@ template <class E> constexpr const E* data(initializer_list<E> il) noexcept;
*/
#include "third_party/libcxx/__config"
#include "third_party/libcxx/iosfwd" // for forward declarations of vector and string.
#include "third_party/libcxx/__functional_base"
#include "third_party/libcxx/type_traits"
#include "third_party/libcxx/cstddef"
#include "third_party/libcxx/initializer_list"
#include "third_party/libcxx/version"
#ifdef __APPLE__
#include "third_party/libcxx/Availability.h"
#endif
#include "third_party/libcxx/__debug"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
struct _LIBCPP_TEMPLATE_VIS input_iterator_tag {};
struct _LIBCPP_TEMPLATE_VIS output_iterator_tag {};
struct _LIBCPP_TEMPLATE_VIS forward_iterator_tag : public input_iterator_tag {};

View file

@ -7,43 +7,62 @@ THIRD_PARTY_LIBCXX_ARTIFACTS += THIRD_PARTY_LIBCXX_A
THIRD_PARTY_LIBCXX = $(THIRD_PARTY_LIBCXX_A_DEPS) $(THIRD_PARTY_LIBCXX_A)
THIRD_PARTY_LIBCXX_A = o/$(MODE)/third_party/libcxx/libcxx.a
# third_party/libcxx/__functional_base_03 \
THIRD_PARTY_LIBCXX_A_HDRS = \
third_party/libcxx/__bit_reference \
third_party/libcxx/__bsd_locale_fallbacks.h \
third_party/libcxx/__config \
third_party/libcxx/__debug \
third_party/libcxx/__errc \
third_party/libcxx/__functional_base \
third_party/libcxx/__hash_table \
third_party/libcxx/__locale \
third_party/libcxx/__mutex_base \
third_party/libcxx/__node_handle \
third_party/libcxx/__nullptr \
third_party/libcxx/__split_buffer \
third_party/libcxx/__sso_allocator \
third_party/libcxx/__std_stream \
third_party/libcxx/__string \
third_party/libcxx/__threading_support \
third_party/libcxx/__tree \
third_party/libcxx/__tuple \
third_party/libcxx/__undef_macros \
third_party/libcxx/algorithm \
third_party/libcxx/array \
third_party/libcxx/atomic \
third_party/libcxx/atomic_support.hh \
third_party/libcxx/bit \
third_party/libcxx/bitset \
third_party/libcxx/cassert \
third_party/libcxx/cctype \
third_party/libcxx/cerrno \
third_party/libcxx/charconv \
third_party/libcxx/chrono \
third_party/libcxx/climits \
third_party/libcxx/clocale \
third_party/libcxx/cmath \
third_party/libcxx/codecvt \
third_party/libcxx/condition_variable \
third_party/libcxx/config_elast.h \
third_party/libcxx/cstdarg \
third_party/libcxx/cstddef \
third_party/libcxx/cstdint \
third_party/libcxx/cstdio \
third_party/libcxx/cstdlib \
third_party/libcxx/cstring \
third_party/libcxx/ctime \
third_party/libcxx/ctype.h \
third_party/libcxx/cwchar \
third_party/libcxx/cwctype \
third_party/libcxx/deque \
third_party/libcxx/errno.h \
third_party/libcxx/exception \
third_party/libcxx/exception_fallback.hh \
third_party/libcxx/exception_pointer_unimplemented.hh \
third_party/libcxx/experimental/__config \
third_party/libcxx/functional \
third_party/libcxx/include/atomic_support.hh \
third_party/libcxx/include/config_elast.hh \
third_party/libcxx/initializer_list \
@ -51,9 +70,14 @@ THIRD_PARTY_LIBCXX_A_HDRS = \
third_party/libcxx/iosfwd \
third_party/libcxx/iostream \
third_party/libcxx/istream \
third_party/libcxx/iterator \
third_party/libcxx/limits \
third_party/libcxx/limits.h \
third_party/libcxx/list \
third_party/libcxx/locale \
third_party/libcxx/locale.h \
third_party/libcxx/map \
third_party/libcxx/math.h \
third_party/libcxx/memory \
third_party/libcxx/mutex \
third_party/libcxx/new \
@ -68,12 +92,17 @@ THIRD_PARTY_LIBCXX_A_HDRS = \
third_party/libcxx/refstring.hh \
third_party/libcxx/set \
third_party/libcxx/sstream \
third_party/libcxx/stack \
third_party/libcxx/stdexcept \
third_party/libcxx/stdexcept_default.hh \
third_party/libcxx/stdio.h \
third_party/libcxx/stdlib.h \
third_party/libcxx/streambuf \
third_party/libcxx/string \
third_party/libcxx/string.h \
third_party/libcxx/string_view \
third_party/libcxx/system_error \
third_party/libcxx/thread \
third_party/libcxx/tuple \
third_party/libcxx/type_traits \
third_party/libcxx/typeinfo \
@ -83,7 +112,8 @@ THIRD_PARTY_LIBCXX_A_HDRS = \
third_party/libcxx/variant \
third_party/libcxx/vector \
third_party/libcxx/version \
third_party/libcxx/wchar.h
third_party/libcxx/wchar.h \
third_party/libcxx/wctype.h
THIRD_PARTY_LIBCXX_A_SRCS_CC = \
third_party/libcxx/algorithm.cc \

View file

@ -10,6 +10,19 @@
#ifndef _LIBCPP_LIMITS
#define _LIBCPP_LIMITS
#include "third_party/libcxx/__config"
#include "third_party/libcxx/type_traits"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_PUSH_MACROS
#include "third_party/libcxx/__undef_macros"
#include "third_party/libcxx/version"
_LIBCPP_BEGIN_NAMESPACE_STD
/*
limits synopsis
@ -101,19 +114,6 @@ template<> class numeric_limits<cv long double>;
} // std
*/
#include "third_party/libcxx/__config"
#include "third_party/libcxx/type_traits"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_PUSH_MACROS
#include "third_party/libcxx/__undef_macros"
#include "third_party/libcxx/version"
_LIBCPP_BEGIN_NAMESPACE_STD
enum float_round_style
{

View file

@ -10,6 +10,28 @@
#ifndef _LIBCPP_LIST
#define _LIBCPP_LIST
#include "third_party/libcxx/__config"
#include "third_party/libcxx/memory"
#include "third_party/libcxx/limits"
#include "third_party/libcxx/initializer_list"
#include "third_party/libcxx/iterator"
#include "third_party/libcxx/algorithm"
#include "third_party/libcxx/type_traits"
#include "third_party/libcxx/version"
#include "third_party/libcxx/__debug"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_PUSH_MACROS
#include "third_party/libcxx/__undef_macros"
_LIBCPP_BEGIN_NAMESPACE_STD
/*
list synopsis
@ -178,28 +200,6 @@ template <class T, class Allocator, class Predicate>
*/
#include "third_party/libcxx/__config"
#include "third_party/libcxx/memory"
#include "third_party/libcxx/limits"
#include "third_party/libcxx/initializer_list"
#include "third_party/libcxx/iterator"
#include "third_party/libcxx/algorithm"
#include "third_party/libcxx/type_traits"
#include "third_party/libcxx/version"
#include "third_party/libcxx/__debug"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_PUSH_MACROS
#include "third_party/libcxx/__undef_macros"
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp, class _VoidPtr> struct __list_node;
template <class _Tp, class _VoidPtr> struct __list_node_base;

View file

@ -10,6 +10,41 @@
#ifndef _LIBCPP_LOCALE
#define _LIBCPP_LOCALE
#include "third_party/libcxx/__config"
#include "third_party/libcxx/__locale"
#include "third_party/libcxx/__debug"
#include "third_party/libcxx/algorithm"
#include "third_party/libcxx/memory"
#include "third_party/libcxx/ios"
#include "third_party/libcxx/streambuf"
#include "third_party/libcxx/iterator"
#include "third_party/libcxx/limits"
#include "third_party/libcxx/version"
#include "third_party/libcxx/cstdarg"
#include "third_party/libcxx/cstdlib"
#include "third_party/libcxx/ctime"
#include "third_party/libcxx/cstdio"
#ifdef _LIBCPP_HAS_CATOPEN
# include "libc/unicode/locale.h"
# include "third_party/libcxx/nl_types.h"
#endif
#ifdef _LIBCPP_LOCALE__L_EXTENSIONS
# include "third_party/libcxx/__bsd_locale_defaults.h"
#else
#include "third_party/libcxx/__bsd_locale_fallbacks.h"
#endif
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_PUSH_MACROS
#include "third_party/libcxx/__undef_macros"
_LIBCPP_BEGIN_NAMESPACE_STD
/*
locale synopsis
@ -177,47 +212,6 @@ template <class charT> class messages_byname;
*/
#include "third_party/libcxx/__config"
#include "third_party/libcxx/__locale"
#include "third_party/libcxx/__debug"
#include "third_party/libcxx/algorithm"
#include "third_party/libcxx/memory"
#include "third_party/libcxx/ios"
#include "third_party/libcxx/streambuf"
#include "third_party/libcxx/iterator"
#include "third_party/libcxx/limits"
#include "third_party/libcxx/version"
#ifndef __APPLE__
#include "third_party/libcxx/cstdarg"
#endif
#include "third_party/libcxx/cstdlib"
#include "third_party/libcxx/ctime"
#include "third_party/libcxx/cstdio"
#ifdef _LIBCPP_HAS_CATOPEN
#include "libc/unicode/locale.h"
#include "third_party/libcxx/nl_types.h"
#endif
#ifdef __APPLE__
#include "third_party/libcxx/Availability.h"
#endif
#ifdef _LIBCPP_LOCALE__L_EXTENSIONS
#include "third_party/libcxx/__bsd_locale_defaults.h"
#else
#include "third_party/libcxx/__bsd_locale_fallbacks.h"
#endif
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_PUSH_MACROS
#include "third_party/libcxx/__undef_macros"
_LIBCPP_BEGIN_NAMESPACE_STD
#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__COSMOPOLITAN__)
# define _LIBCPP_GET_C_LOCALE 0
#elif defined(__CloudABI__) || defined(__NetBSD__)

View file

@ -10,6 +10,23 @@
#ifndef _LIBCPP_MAP
#define _LIBCPP_MAP
#include "third_party/libcxx/__config"
#include "third_party/libcxx/__tree"
#include "third_party/libcxx/__node_handle"
#include "third_party/libcxx/iterator"
#include "third_party/libcxx/memory"
#include "third_party/libcxx/utility"
#include "third_party/libcxx/functional"
#include "third_party/libcxx/initializer_list"
#include "third_party/libcxx/type_traits"
#include "third_party/libcxx/version"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
/*
map synopsis
@ -475,23 +492,6 @@ template <class Key, class T, class Compare, class Allocator, class Predicate>
*/
#include "third_party/libcxx/__config"
#include "third_party/libcxx/__tree"
#include "third_party/libcxx/__node_handle"
#include "third_party/libcxx/iterator"
#include "third_party/libcxx/memory"
#include "third_party/libcxx/utility"
#include "third_party/libcxx/functional"
#include "third_party/libcxx/initializer_list"
#include "third_party/libcxx/type_traits"
#include "third_party/libcxx/version"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Key, class _CP, class _Compare,
bool = is_empty<_Compare>::value && !__libcpp_is_final<_Compare>::value>
class __map_value_compare

View file

@ -10,6 +10,26 @@
#ifndef _LIBCPP_MATH_H
#define _LIBCPP_MATH_H
#include "third_party/libcxx/__config"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
#define _LIBCPP_STDLIB_INCLUDE_NEXT
#include "third_party/libcxx/stdlib.h"
#include "libc/isystem/math.h"
#ifdef __cplusplus
// We support including .h headers inside 'extern "C"' contexts, so switch
// back to C++ linkage before including these C++ headers.
extern "C++" {
#include "third_party/libcxx/type_traits"
#include "third_party/libcxx/limits"
/*
math.h synopsis
@ -291,26 +311,6 @@ long double truncl(long double x);
*/
#include "third_party/libcxx/__config"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
#define _LIBCPP_STDLIB_INCLUDE_NEXT
#include "third_party/libcxx/stdlib.h"
#include "libc/isystem/math.h"
#ifdef __cplusplus
// We support including .h headers inside 'extern "C"' contexts, so switch
// back to C++ linkage before including these C++ headers.
extern "C++" {
#include "third_party/libcxx/type_traits"
#include "third_party/libcxx/limits"
// signbit
#ifdef signbit

View file

@ -10,6 +10,35 @@
#ifndef _LIBCPP_MEMORY
#define _LIBCPP_MEMORY
#include "third_party/libcxx/__config"
#include "third_party/libcxx/type_traits"
#include "third_party/libcxx/typeinfo"
#include "third_party/libcxx/cstddef"
#include "third_party/libcxx/cstdint"
#include "third_party/libcxx/new"
#include "third_party/libcxx/utility"
#include "third_party/libcxx/limits"
#include "third_party/libcxx/iterator"
#include "third_party/libcxx/__functional_base"
#include "third_party/libcxx/iosfwd"
#include "third_party/libcxx/tuple"
#include "third_party/libcxx/stdexcept"
#include "third_party/libcxx/cstring"
#if !defined(_LIBCPP_HAS_NO_ATOMIC_HEADER)
# include "third_party/libcxx/atomic"
#endif
#include "third_party/libcxx/version"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_PUSH_MACROS
#include "third_party/libcxx/__undef_macros"
_LIBCPP_BEGIN_NAMESPACE_STD
/*
memory synopsis
@ -648,35 +677,6 @@ void* align(size_t alignment, size_t size, void*& ptr, size_t& space);
*/
#include "third_party/libcxx/__config"
#include "third_party/libcxx/type_traits"
#include "third_party/libcxx/typeinfo"
#include "third_party/libcxx/cstddef"
#include "third_party/libcxx/cstdint"
#include "third_party/libcxx/new"
#include "third_party/libcxx/utility"
#include "third_party/libcxx/limits"
#include "third_party/libcxx/iterator"
#include "third_party/libcxx/__functional_base"
#include "third_party/libcxx/iosfwd"
#include "third_party/libcxx/tuple"
#include "third_party/libcxx/stdexcept"
#include "third_party/libcxx/cstring"
#if !defined(_LIBCPP_HAS_NO_ATOMIC_HEADER)
# include "third_party/libcxx/atomic"
#endif
#include "third_party/libcxx/version"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_PUSH_MACROS
#include "third_party/libcxx/__undef_macros"
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _ValueType>
inline _LIBCPP_INLINE_VISIBILITY
_ValueType __libcpp_relaxed_load(_ValueType const* __value) {

View file

@ -11,6 +11,27 @@
#ifndef _LIBCPP_MUTEX
#define _LIBCPP_MUTEX
#include "third_party/libcxx/__config"
#include "third_party/libcxx/__mutex_base"
#include "third_party/libcxx/cstdint"
#include "third_party/libcxx/functional"
#include "third_party/libcxx/memory"
#ifndef _LIBCPP_CXX03_LANG
#include "third_party/libcxx/tuple"
#endif
#include "third_party/libcxx/version"
#include "third_party/libcxx/__threading_support"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_PUSH_MACROS
#include "third_party/libcxx/__undef_macros"
_LIBCPP_BEGIN_NAMESPACE_STD
/*
mutex synopsis
@ -187,27 +208,6 @@ template<class Callable, class ...Args>
*/
#include "third_party/libcxx/__config"
#include "third_party/libcxx/__mutex_base"
#include "third_party/libcxx/cstdint"
#include "third_party/libcxx/functional"
#include "third_party/libcxx/memory"
#ifndef _LIBCPP_CXX03_LANG
#include "third_party/libcxx/tuple"
#endif
#include "third_party/libcxx/version"
#include "third_party/libcxx/__threading_support"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_PUSH_MACROS
#include "third_party/libcxx/__undef_macros"
_LIBCPP_BEGIN_NAMESPACE_STD
#ifndef _LIBCPP_HAS_NO_THREADS
class _LIBCPP_TYPE_VIS recursive_mutex

View file

@ -10,6 +10,15 @@
#ifndef _LIBCPP_NEW
#define _LIBCPP_NEW
#include "third_party/libcxx/__config"
#include "third_party/libcxx/exception"
#include "third_party/libcxx/type_traits"
#include "third_party/libcxx/cstddef"
#include "third_party/libcxx/version"
#ifdef _LIBCPP_NO_EXCEPTIONS
#include "third_party/libcxx/cstdlib"
#endif
/*
new synopsis
@ -86,15 +95,6 @@ void operator delete[](void* ptr, void*) noexcept;
*/
#include "third_party/libcxx/__config"
#include "third_party/libcxx/exception"
#include "third_party/libcxx/type_traits"
#include "third_party/libcxx/cstddef"
#include "third_party/libcxx/version"
#ifdef _LIBCPP_NO_EXCEPTIONS
#include "third_party/libcxx/cstdlib"
#endif
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif

View file

@ -10,6 +10,22 @@
#ifndef _LIBCPP_NUMERIC
#define _LIBCPP_NUMERIC
#include "third_party/libcxx/__config"
#include "third_party/libcxx/iterator"
#include "third_party/libcxx/limits" // for numeric_limits
#include "third_party/libcxx/functional"
#include "third_party/libcxx/cmath" // for isnormal
#include "third_party/libcxx/version"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_PUSH_MACROS
#include "third_party/libcxx/__undef_macros"
_LIBCPP_BEGIN_NAMESPACE_STD
/*
numeric synopsis
@ -141,22 +157,6 @@ floating_point midpoint(floating_point a, floating_point b); // C++20
*/
#include "third_party/libcxx/__config"
#include "third_party/libcxx/iterator"
#include "third_party/libcxx/limits" // for numeric_limits
#include "third_party/libcxx/functional"
#include "third_party/libcxx/cmath" // for isnormal
#include "third_party/libcxx/version"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_PUSH_MACROS
#include "third_party/libcxx/__undef_macros"
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _InputIterator, class _Tp>
inline _LIBCPP_INLINE_VISIBILITY
_Tp

View file

@ -10,6 +10,24 @@
#ifndef _LIBCPP_OPTIONAL
#define _LIBCPP_OPTIONAL
#include "third_party/libcxx/__config"
#include "third_party/libcxx/__debug"
#include "third_party/libcxx/__functional_base"
#include "third_party/libcxx/functional"
#include "third_party/libcxx/initializer_list"
#include "third_party/libcxx/new"
#include "third_party/libcxx/stdexcept"
#include "third_party/libcxx/type_traits"
#include "third_party/libcxx/utility"
#include "third_party/libcxx/version"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_PUSH_MACROS
#include "third_party/libcxx/__undef_macros"
/*
optional synopsis
@ -146,24 +164,6 @@ template<class T>
*/
#include "third_party/libcxx/__config"
#include "third_party/libcxx/__debug"
#include "third_party/libcxx/__functional_base"
#include "third_party/libcxx/functional"
#include "third_party/libcxx/initializer_list"
#include "third_party/libcxx/new"
#include "third_party/libcxx/stdexcept"
#include "third_party/libcxx/type_traits"
#include "third_party/libcxx/utility"
#include "third_party/libcxx/version"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_PUSH_MACROS
#include "third_party/libcxx/__undef_macros"
namespace std // purposefully not using versioning namespace
{

View file

@ -10,6 +10,20 @@
#ifndef _LIBCPP_OSTREAM
#define _LIBCPP_OSTREAM
#include "third_party/libcxx/__config"
#include "third_party/libcxx/ios"
#include "third_party/libcxx/streambuf"
#include "third_party/libcxx/locale"
#include "third_party/libcxx/iterator"
#include "third_party/libcxx/bitset"
#include "third_party/libcxx/version"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
/*
ostream synopsis
@ -134,20 +148,6 @@ template <class charT, class traits, class T>
*/
#include "third_party/libcxx/__config"
#include "third_party/libcxx/ios"
#include "third_party/libcxx/streambuf"
#include "third_party/libcxx/locale"
#include "third_party/libcxx/iterator"
#include "third_party/libcxx/bitset"
#include "third_party/libcxx/version"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _CharT, class _Traits>
class _LIBCPP_TEMPLATE_VIS basic_ostream
: virtual public basic_ios<_CharT, _Traits>

View file

@ -10,6 +10,18 @@
#ifndef _LIBCPP_QUEUE
#define _LIBCPP_QUEUE
#include "third_party/libcxx/__config"
#include "third_party/libcxx/deque"
#include "third_party/libcxx/vector"
#include "third_party/libcxx/functional"
#include "third_party/libcxx/algorithm"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
/*
queue synopsis
@ -185,18 +197,6 @@ template <class T, class Container, class Compare>
*/
#include "third_party/libcxx/__config"
#include "third_party/libcxx/deque"
#include "third_party/libcxx/vector"
#include "third_party/libcxx/functional"
#include "third_party/libcxx/algorithm"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp, class _Container = deque<_Tp> > class _LIBCPP_TEMPLATE_VIS queue;
template <class _Tp, class _Container>

View file

@ -10,6 +10,30 @@
#ifndef _LIBCPP_RANDOM
#define _LIBCPP_RANDOM
#include "third_party/libcxx/__config"
#include "third_party/libcxx/cstddef"
#include "third_party/libcxx/cstdint"
#include "third_party/libcxx/cmath"
#include "third_party/libcxx/type_traits"
#include "third_party/libcxx/initializer_list"
#include "third_party/libcxx/limits"
#include "third_party/libcxx/algorithm"
#include "third_party/libcxx/numeric"
#include "third_party/libcxx/vector"
#include "third_party/libcxx/string"
#include "third_party/libcxx/istream"
#include "third_party/libcxx/ostream"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_PUSH_MACROS
#include "third_party/libcxx/__undef_macros"
_LIBCPP_BEGIN_NAMESPACE_STD
/*
random synopsis
@ -1631,30 +1655,6 @@ class piecewise_linear_distribution
} // std
*/
#include "third_party/libcxx/__config"
#include "third_party/libcxx/cstddef"
#include "third_party/libcxx/cstdint"
#include "third_party/libcxx/cmath"
#include "third_party/libcxx/type_traits"
#include "third_party/libcxx/initializer_list"
#include "third_party/libcxx/limits"
#include "third_party/libcxx/algorithm"
#include "third_party/libcxx/numeric"
#include "third_party/libcxx/vector"
#include "third_party/libcxx/string"
#include "third_party/libcxx/istream"
#include "third_party/libcxx/ostream"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_PUSH_MACROS
#include "third_party/libcxx/__undef_macros"
_LIBCPP_BEGIN_NAMESPACE_STD
// __is_seed_sequence
template <class _Sseq, class _Engine>

View file

@ -10,6 +10,21 @@
#ifndef _LIBCPP_RATIO
#define _LIBCPP_RATIO
#include "third_party/libcxx/__config"
#include "third_party/libcxx/cstdint"
#include "third_party/libcxx/climits"
#include "third_party/libcxx/type_traits"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_PUSH_MACROS
#include "third_party/libcxx/__undef_macros"
_LIBCPP_BEGIN_NAMESPACE_STD
/*
ratio synopsis
@ -77,21 +92,6 @@ typedef ratio<1000000000000000000000000, 1> yotta; // not supported
}
*/
#include "third_party/libcxx/__config"
#include "third_party/libcxx/cstdint"
#include "third_party/libcxx/climits"
#include "third_party/libcxx/type_traits"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_PUSH_MACROS
#include "third_party/libcxx/__undef_macros"
_LIBCPP_BEGIN_NAMESPACE_STD
// __static_gcd
template <intmax_t _Xp, intmax_t _Yp>

View file

@ -10,6 +10,18 @@
#ifndef _LIBCPP_SET
#define _LIBCPP_SET
#include "third_party/libcxx/__config"
#include "third_party/libcxx/__tree"
#include "third_party/libcxx/__node_handle"
#include "third_party/libcxx/functional"
#include "third_party/libcxx/version"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
/*
set synopsis
@ -423,18 +435,6 @@ template <class Key, class Compare, class Allocator, class Predicate>
*/
#include "third_party/libcxx/__config"
#include "third_party/libcxx/__tree"
#include "third_party/libcxx/__node_handle"
#include "third_party/libcxx/functional"
#include "third_party/libcxx/version"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Key, class _Compare, class _Allocator>
class multiset;

View file

@ -10,6 +10,21 @@
#ifndef _LIBCPP_SSTREAM
#define _LIBCPP_SSTREAM
#include "third_party/libcxx/__config"
#include "third_party/libcxx/ostream"
#include "third_party/libcxx/istream"
#include "third_party/libcxx/string"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_PUSH_MACROS
#include "third_party/libcxx/__undef_macros"
_LIBCPP_BEGIN_NAMESPACE_STD
/*
sstream synopsis
@ -169,21 +184,6 @@ typedef basic_stringstream<wchar_t> wstringstream;
*/
#include "third_party/libcxx/__config"
#include "third_party/libcxx/ostream"
#include "third_party/libcxx/istream"
#include "third_party/libcxx/string"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_PUSH_MACROS
#include "third_party/libcxx/__undef_macros"
_LIBCPP_BEGIN_NAMESPACE_STD
// basic_stringbuf
template <class _CharT, class _Traits, class _Allocator>

View file

@ -11,6 +11,15 @@
#ifndef _LIBCPP_STACK
#define _LIBCPP_STACK
#include "third_party/libcxx/__config"
#include "third_party/libcxx/deque"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
/*
stack synopsis
@ -88,15 +97,6 @@ template <class T, class Container>
*/
#include "third_party/libcxx/__config"
#include "third_party/libcxx/deque"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp, class _Container = deque<_Tp> > class _LIBCPP_TEMPLATE_VIS stack;
template <class _Tp, class _Container>

View file

@ -22,6 +22,18 @@
#elif !defined(_LIBCPP_STDLIB_H)
#define _LIBCPP_STDLIB_H
#include "third_party/libcxx/__config"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
#include "libc/isystem/stdlib.h"
#ifdef __cplusplus
#include "third_party/libcxx/math.h"
#endif // __cplusplus
/*
stdlib.h synopsis
@ -88,16 +100,4 @@ void *aligned_alloc(size_t alignment, size_t size); // C11
*/
#include "third_party/libcxx/__config"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
#include "libc/isystem/stdlib.h"
#ifdef __cplusplus
#include "third_party/libcxx/math.h"
#endif // __cplusplus
#endif // _LIBCPP_STDLIB_H

View file

@ -10,6 +10,19 @@
#ifndef _LIBCPP_STEAMBUF
#define _LIBCPP_STEAMBUF
#include "third_party/libcxx/__config"
#include "third_party/libcxx/iosfwd"
#include "third_party/libcxx/ios"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_PUSH_MACROS
#include "third_party/libcxx/__undef_macros"
_LIBCPP_BEGIN_NAMESPACE_STD
/*
streambuf synopsis
@ -107,19 +120,6 @@ protected:
*/
#include "third_party/libcxx/__config"
#include "third_party/libcxx/iosfwd"
#include "third_party/libcxx/ios"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_PUSH_MACROS
#include "third_party/libcxx/__undef_macros"
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _CharT, class _Traits>
class _LIBCPP_TEMPLATE_VIS basic_streambuf
{

View file

@ -10,6 +10,37 @@
#ifndef _LIBCPP_STRING
#define _LIBCPP_STRING
#include "third_party/libcxx/__config"
#include "third_party/libcxx/string_view"
#include "third_party/libcxx/iosfwd"
#include "third_party/libcxx/cstring"
#include "third_party/libcxx/cstdio" // For EOF.
#include "third_party/libcxx/cwchar"
#include "third_party/libcxx/algorithm"
#include "third_party/libcxx/iterator"
#include "third_party/libcxx/utility"
#include "third_party/libcxx/memory"
#include "third_party/libcxx/stdexcept"
#include "third_party/libcxx/type_traits"
#include "third_party/libcxx/initializer_list"
#include "third_party/libcxx/__functional_base"
#include "third_party/libcxx/version"
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
#include "third_party/libcxx/cstdint"
#endif
#include "third_party/libcxx/__debug"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_PUSH_MACROS
#include "third_party/libcxx/__undef_macros"
_LIBCPP_BEGIN_NAMESPACE_STD
/*
string synopsis
@ -500,37 +531,6 @@ basic_string<char32_t> operator "" s( const char32_t *str, size_t len ); // C++1
*/
#include "third_party/libcxx/__config"
#include "third_party/libcxx/string_view"
#include "third_party/libcxx/iosfwd"
#include "third_party/libcxx/cstring"
#include "third_party/libcxx/cstdio" // For EOF.
#include "third_party/libcxx/cwchar"
#include "third_party/libcxx/algorithm"
#include "third_party/libcxx/iterator"
#include "third_party/libcxx/utility"
#include "third_party/libcxx/memory"
#include "third_party/libcxx/stdexcept"
#include "third_party/libcxx/type_traits"
#include "third_party/libcxx/initializer_list"
#include "third_party/libcxx/__functional_base"
#include "third_party/libcxx/version"
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
#include "third_party/libcxx/cstdint"
#endif
#include "third_party/libcxx/__debug"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_PUSH_MACROS
#include "third_party/libcxx/__undef_macros"
_LIBCPP_BEGIN_NAMESPACE_STD
// fpos
template <class _StateT>

View file

@ -10,6 +10,14 @@
#ifndef _LIBCPP_STRING_H
#define _LIBCPP_STRING_H
#include "third_party/libcxx/__config"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
#include "libc/str/str.h"
/*
string.h synopsis
@ -51,15 +59,6 @@ size_t strlen(const char* s);
*/
#include "third_party/libcxx/__config"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
#include "libc/alg/alg.h"
#include "libc/str/str.h"
// MSVCRT, GNU libc and its derivates may already have the correct prototype in
// <string.h>. This macro can be defined by users if their C library provides
// the right signature.

View file

@ -10,8 +10,28 @@
#ifndef _LIBCPP_STRING_VIEW
#define _LIBCPP_STRING_VIEW
#include "third_party/libcxx/__config"
#include "third_party/libcxx/__string"
#include "third_party/libcxx/iosfwd"
#include "third_party/libcxx/algorithm"
#include "third_party/libcxx/iterator"
#include "third_party/libcxx/limits"
#include "third_party/libcxx/stdexcept"
#include "third_party/libcxx/version"
#include "third_party/libcxx/__debug"
#pragma GCC diagnostic ignored "-Wliteral-suffix"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_PUSH_MACROS
#include "third_party/libcxx/__undef_macros"
_LIBCPP_BEGIN_NAMESPACE_STD
/*
string_view synopsis
@ -173,26 +193,6 @@ namespace std {
*/
#include "third_party/libcxx/__config"
#include "third_party/libcxx/__string"
#include "third_party/libcxx/iosfwd"
#include "third_party/libcxx/algorithm"
#include "third_party/libcxx/iterator"
#include "third_party/libcxx/limits"
#include "third_party/libcxx/stdexcept"
#include "third_party/libcxx/version"
#include "third_party/libcxx/__debug"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_PUSH_MACROS
#include "third_party/libcxx/__undef_macros"
_LIBCPP_BEGIN_NAMESPACE_STD
template<class _CharT, class _Traits = char_traits<_CharT> >
class _LIBCPP_TEMPLATE_VIS basic_string_view {
public:

View file

@ -10,6 +10,18 @@
#ifndef _LIBCPP_SYSTEM_ERROR
#define _LIBCPP_SYSTEM_ERROR
#include "third_party/libcxx/__errc"
#include "third_party/libcxx/type_traits"
#include "third_party/libcxx/stdexcept"
#include "third_party/libcxx/__functional_base"
#include "third_party/libcxx/string"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
/*
system_error synopsis
@ -142,18 +154,6 @@ template <> struct hash<std::error_condition>;
*/
#include "third_party/libcxx/__errc"
#include "third_party/libcxx/type_traits"
#include "third_party/libcxx/stdexcept"
#include "third_party/libcxx/__functional_base"
#include "third_party/libcxx/string"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
// is_error_code_enum
template <class _Tp>

View file

@ -11,6 +11,35 @@
#ifndef _LIBCPP_THREAD
#define _LIBCPP_THREAD
#include "third_party/libcxx/__config"
#include "third_party/libcxx/iosfwd"
#include "third_party/libcxx/__functional_base"
#include "third_party/libcxx/type_traits"
#include "third_party/libcxx/cstddef"
#include "third_party/libcxx/functional"
#include "third_party/libcxx/memory"
#include "third_party/libcxx/system_error"
#include "third_party/libcxx/chrono"
#include "third_party/libcxx/__mutex_base"
#ifndef _LIBCPP_CXX03_LANG
#include "third_party/libcxx/tuple"
#endif
#include "third_party/libcxx/__threading_support"
#include "third_party/libcxx/__debug"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_PUSH_MACROS
#include "third_party/libcxx/__undef_macros"
#ifdef _LIBCPP_HAS_NO_THREADS
#error <thread> is not supported on this single threaded system
#else // !_LIBCPP_HAS_NO_THREADS
_LIBCPP_BEGIN_NAMESPACE_STD
/*
thread synopsis
@ -83,35 +112,6 @@ void sleep_for(const chrono::duration<Rep, Period>& rel_time);
*/
#include "third_party/libcxx/__config"
#include "third_party/libcxx/iosfwd"
#include "third_party/libcxx/__functional_base"
#include "third_party/libcxx/type_traits"
#include "third_party/libcxx/cstddef"
#include "third_party/libcxx/functional"
#include "third_party/libcxx/memory"
#include "third_party/libcxx/system_error"
#include "third_party/libcxx/chrono"
#include "third_party/libcxx/__mutex_base"
#ifndef _LIBCPP_CXX03_LANG
#include "third_party/libcxx/tuple"
#endif
#include "third_party/libcxx/__threading_support"
#include "third_party/libcxx/__debug"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_PUSH_MACROS
#include "third_party/libcxx/__undef_macros"
#ifdef _LIBCPP_HAS_NO_THREADS
#error <thread> is not supported on this single threaded system
#else // !_LIBCPP_HAS_NO_THREADS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp> class __thread_specific_ptr;
class _LIBCPP_TYPE_VIS __thread_struct;
class _LIBCPP_HIDDEN __thread_struct_imp;

View file

@ -10,6 +10,20 @@
#ifndef _LIBCPP_TUPLE
#define _LIBCPP_TUPLE
#include "third_party/libcxx/__config"
#include "third_party/libcxx/__tuple"
#include "third_party/libcxx/cstddef"
#include "third_party/libcxx/type_traits"
#include "third_party/libcxx/__functional_base"
#include "third_party/libcxx/utility"
#include "third_party/libcxx/version"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
/*
tuple synopsis
@ -145,20 +159,6 @@ template <class... Types>
*/
#include "third_party/libcxx/__config"
#include "third_party/libcxx/__tuple"
#include "third_party/libcxx/cstddef"
#include "third_party/libcxx/type_traits"
#include "third_party/libcxx/__functional_base"
#include "third_party/libcxx/utility"
#include "third_party/libcxx/version"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
#ifndef _LIBCPP_CXX03_LANG

View file

@ -10,6 +10,16 @@
#ifndef _LIBCPP_TYPE_TRAITS
#define _LIBCPP_TYPE_TRAITS
#include "third_party/libcxx/__config"
#include "third_party/libcxx/cstddef"
#include "third_party/libcxx/version"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
/*
type_traits synopsis
@ -413,15 +423,6 @@ namespace std
}
*/
#include "third_party/libcxx/__config"
#include "third_party/libcxx/cstddef"
#include "third_party/libcxx/version"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _T1, class _T2> struct _LIBCPP_TEMPLATE_VIS pair;
template <class _Tp> class _LIBCPP_TEMPLATE_VIS reference_wrapper;

View file

@ -10,6 +10,14 @@
#ifndef __LIBCPP_TYPEINFO
#define __LIBCPP_TYPEINFO
#include "third_party/libcxx/__config"
#include "third_party/libcxx/exception"
#include "third_party/libcxx/cstddef"
#include "third_party/libcxx/cstdint"
#ifdef _LIBCPP_NO_EXCEPTIONS
#include "third_party/libcxx/cstdlib"
#endif
/*
typeinfo synopsis
@ -56,14 +64,6 @@ public:
*/
#include "third_party/libcxx/__config"
#include "third_party/libcxx/exception"
#include "third_party/libcxx/cstddef"
#include "third_party/libcxx/cstdint"
#ifdef _LIBCPP_NO_EXCEPTIONS
#include "third_party/libcxx/cstdlib"
#endif
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif

View file

@ -10,6 +10,22 @@
#ifndef _LIBCPP_UNORDERED_MAP
#define _LIBCPP_UNORDERED_MAP
#include "third_party/libcxx/__config"
#include "third_party/libcxx/__hash_table"
#include "third_party/libcxx/__node_handle"
#include "third_party/libcxx/functional"
#include "third_party/libcxx/stdexcept"
#include "third_party/libcxx/tuple"
#include "third_party/libcxx/version"
#include "third_party/libcxx/__debug"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
/*
unordered_map synopsis
@ -405,22 +421,6 @@ template <class Key, class T, class Hash, class Pred, class Alloc>
*/
#include "third_party/libcxx/__config"
#include "third_party/libcxx/__hash_table"
#include "third_party/libcxx/__node_handle"
#include "third_party/libcxx/functional"
#include "third_party/libcxx/stdexcept"
#include "third_party/libcxx/tuple"
#include "third_party/libcxx/version"
#include "third_party/libcxx/__debug"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Key, class _Cp, class _Hash,
bool = is_empty<_Hash>::value && !__libcpp_is_final<_Hash>::value>
class __unordered_map_hasher

View file

@ -10,6 +10,20 @@
#ifndef _LIBCPP_UNORDERED_SET
#define _LIBCPP_UNORDERED_SET
#include "third_party/libcxx/__config"
#include "third_party/libcxx/__hash_table"
#include "third_party/libcxx/__node_handle"
#include "third_party/libcxx/functional"
#include "third_party/libcxx/version"
#include "third_party/libcxx/__debug"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
/*
unordered_set synopsis
@ -360,20 +374,6 @@ template <class Value, class Hash, class Pred, class Alloc>
*/
#include "third_party/libcxx/__config"
#include "third_party/libcxx/__hash_table"
#include "third_party/libcxx/__node_handle"
#include "third_party/libcxx/functional"
#include "third_party/libcxx/version"
#include "third_party/libcxx/__debug"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Value, class _Hash, class _Pred, class _Alloc>
class unordered_multiset;

View file

@ -10,6 +10,22 @@
#ifndef _LIBCPP_UTILITY
#define _LIBCPP_UTILITY
#include "third_party/libcxx/__config"
#include "third_party/libcxx/__tuple"
#include "third_party/libcxx/type_traits"
#include "third_party/libcxx/initializer_list"
#include "third_party/libcxx/cstddef"
#include "third_party/libcxx/cstring"
#include "third_party/libcxx/cstdint"
#include "third_party/libcxx/version"
#include "third_party/libcxx/__debug"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
/*
utility synopsis
@ -195,22 +211,6 @@ template <size_t I>
*/
#include "third_party/libcxx/__config"
#include "third_party/libcxx/__tuple"
#include "third_party/libcxx/type_traits"
#include "third_party/libcxx/initializer_list"
#include "third_party/libcxx/cstddef"
#include "third_party/libcxx/cstring"
#include "third_party/libcxx/cstdint"
#include "third_party/libcxx/version"
#include "third_party/libcxx/__debug"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
namespace rel_ops
{

View file

@ -11,6 +11,26 @@
#ifndef _LIBCPP_VARIANT
#define _LIBCPP_VARIANT
#include "third_party/libcxx/__config"
#include "third_party/libcxx/__tuple"
#include "third_party/libcxx/array"
#include "third_party/libcxx/exception"
#include "third_party/libcxx/functional"
#include "third_party/libcxx/initializer_list"
#include "third_party/libcxx/new"
#include "third_party/libcxx/tuple"
#include "third_party/libcxx/type_traits"
#include "third_party/libcxx/utility"
#include "third_party/libcxx/limits"
#include "third_party/libcxx/version"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_PUSH_MACROS
#include "third_party/libcxx/__undef_macros"
/*
variant synopsis
@ -197,26 +217,6 @@ namespace std {
*/
#include "third_party/libcxx/__config"
#include "third_party/libcxx/__tuple"
#include "third_party/libcxx/array"
#include "third_party/libcxx/exception"
#include "third_party/libcxx/functional"
#include "third_party/libcxx/initializer_list"
#include "third_party/libcxx/new"
#include "third_party/libcxx/tuple"
#include "third_party/libcxx/type_traits"
#include "third_party/libcxx/utility"
#include "third_party/libcxx/limits"
#include "third_party/libcxx/version"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_PUSH_MACROS
#include "third_party/libcxx/__undef_macros"
namespace std { // explicitly not using versioning namespace
class _LIBCPP_EXCEPTION_ABI _LIBCPP_AVAILABILITY_BAD_VARIANT_ACCESS bad_variant_access : public exception {

View file

@ -10,6 +10,33 @@
#ifndef _LIBCPP_VECTOR
#define _LIBCPP_VECTOR
#include "third_party/libcxx/__config"
#include "third_party/libcxx/iosfwd" // for forward declaration of vector
#include "third_party/libcxx/__bit_reference"
#include "third_party/libcxx/type_traits"
#include "third_party/libcxx/climits"
#include "third_party/libcxx/limits"
#include "third_party/libcxx/initializer_list"
#include "third_party/libcxx/memory"
#include "third_party/libcxx/stdexcept"
#include "third_party/libcxx/algorithm"
#include "third_party/libcxx/cstring"
#include "third_party/libcxx/version"
#include "third_party/libcxx/__split_buffer"
#include "third_party/libcxx/__functional_base"
#include "third_party/libcxx/__debug"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_PUSH_MACROS
#include "third_party/libcxx/__undef_macros"
_LIBCPP_BEGIN_NAMESPACE_STD
/*
vector synopsis
@ -269,33 +296,6 @@ template <class T, class Allocator, class Predicate>
*/
#include "third_party/libcxx/__config"
#include "third_party/libcxx/iosfwd" // for forward declaration of vector
#include "third_party/libcxx/__bit_reference"
#include "third_party/libcxx/type_traits"
#include "third_party/libcxx/climits"
#include "third_party/libcxx/limits"
#include "third_party/libcxx/initializer_list"
#include "third_party/libcxx/memory"
#include "third_party/libcxx/stdexcept"
#include "third_party/libcxx/algorithm"
#include "third_party/libcxx/cstring"
#include "third_party/libcxx/version"
#include "third_party/libcxx/__split_buffer"
#include "third_party/libcxx/__functional_base"
#include "third_party/libcxx/__debug"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_PUSH_MACROS
#include "third_party/libcxx/__undef_macros"
_LIBCPP_BEGIN_NAMESPACE_STD
template <bool>
class _LIBCPP_TEMPLATE_VIS __vector_base_common
{

View file

@ -10,6 +10,12 @@
#ifndef _LIBCPP_VERSIONH
#define _LIBCPP_VERSIONH
#include "third_party/libcxx/__config"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
/*
version synopsis
@ -114,12 +120,6 @@ __cpp_lib_void_t 201411L <type_traits>
*/
#include "third_party/libcxx/__config"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
#if _LIBCPP_STD_VER > 11
# define __cpp_lib_chrono_udls 201304L
# define __cpp_lib_complex_udls 201309L

View file

@ -11,6 +11,11 @@
#define _LIBCPP_WCHAR_H
#include "libc/str/str.h"
#include "libc/time/time.h"
#include "third_party/libcxx/__config"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
/*
wchar.h synopsis
@ -99,12 +104,6 @@ size_t wcsrtombs(char* restrict dst, const wchar_t** restrict src, size_t len,
*/
#include "third_party/libcxx/__config"
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
#ifdef __cplusplus
#define __CORRECT_ISO_CPP_WCHAR_H_PROTO
#endif