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

@ -380,7 +380,7 @@ static char *replace_extn(char *tmpl, char *extn) {
static char *create_tmpfile(void) {
char *path = xjoinpaths(kTmpPath, "chibicc-XXXXXX");
int fd = mkstemp(path);
if (fd == -1) error("mkstemp failed: %s", strerror(errno));
if (fd == -1) error("%s: mkstemp failed: %s", path, strerror(errno));
close(fd);
static int len = 2;
chibicc_tmpfiles = realloc(chibicc_tmpfiles, sizeof(char *) * len);

View file

@ -11,7 +11,6 @@
# GCC-built chibicc, and a second time with chibicc-built chibicc
CHIBICC = o/$(MODE)/third_party/chibicc/chibicc.com
CHIBICC2 = o/$(MODE)/third_party/chibicc/chibicc2.com
CHIBICC_FLAGS = \
-fno-common \
-include libc/integral/normalize.inc \
@ -22,7 +21,6 @@ PKGS += THIRD_PARTY_CHIBICC
THIRD_PARTY_CHIBICC_ARTIFACTS += THIRD_PARTY_CHIBICC_A
THIRD_PARTY_CHIBICC = $(THIRD_PARTY_CHIBICC_A_DEPS) $(THIRD_PARTY_CHIBICC_A)
THIRD_PARTY_CHIBICC_A = o/$(MODE)/third_party/chibicc/chibicc.a
THIRD_PARTY_CHIBICC2_A = o/$(MODE)/third_party/chibicc/chibicc2.a
THIRD_PARTY_CHIBICC_A_FILES := $(wildcard third_party/chibicc/*)
THIRD_PARTY_CHIBICC_A_HDRS = $(filter %.h,$(THIRD_PARTY_CHIBICC_A_FILES))
THIRD_PARTY_CHIBICC_A_SRCS = $(filter %.c,$(THIRD_PARTY_CHIBICC_A_FILES))
@ -35,18 +33,13 @@ THIRD_PARTY_CHIBICC_DEFINES = \
THIRD_PARTY_CHIBICC_BINS = \
o/$(MODE)/third_party/chibicc/chibicc.com.dbg \
o/$(MODE)/third_party/chibicc/chibicc.com \
o/$(MODE)/third_party/chibicc/chibicc2.com.dbg \
o/$(MODE)/third_party/chibicc/chibicc2.com
o/$(MODE)/third_party/chibicc/chibicc.com
THIRD_PARTY_CHIBICC_A_OBJS = \
$(THIRD_PARTY_CHIBICC_A_SRCS:%.c=o/$(MODE)/%.o)
THIRD_PARTY_CHIBICC2_A_OBJS = \
$(THIRD_PARTY_CHIBICC_A_SRCS:%.c=o/$(MODE)/%.chibicc.o)
THIRD_PARTY_CHIBICC_A_CHECKS = \
$(THIRD_PARTY_CHIBICC_A).pkg \
$(THIRD_PARTY_CHIBICC2_A).pkg \
$(THIRD_PARTY_CHIBICC_A_HDRS:%=o/$(MODE)/%.ok)
THIRD_PARTY_CHIBICC_A_DIRECTDEPS = \
@ -83,14 +76,6 @@ $(THIRD_PARTY_CHIBICC_A).pkg: \
$(THIRD_PARTY_CHIBICC_A_OBJS) \
$(foreach x,$(THIRD_PARTY_CHIBICC_A_DIRECTDEPS),$($(x)_A).pkg)
$(THIRD_PARTY_CHIBICC2_A): \
third_party/chibicc/ \
$(THIRD_PARTY_CHIBICC2_A).pkg \
$(THIRD_PARTY_CHIBICC2_A_OBJS)
$(THIRD_PARTY_CHIBICC2_A).pkg: \
$(THIRD_PARTY_CHIBICC2_A_OBJS) \
$(foreach x,$(THIRD_PARTY_CHIBICC_A_DIRECTDEPS),$($(x)_A).pkg)
o/$(MODE)/third_party/chibicc/chibicc.com.dbg: \
$(THIRD_PARTY_CHIBICC_A_DEPS) \
$(THIRD_PARTY_CHIBICC_A) \
@ -100,15 +85,6 @@ o/$(MODE)/third_party/chibicc/chibicc.com.dbg: \
o/$(MODE)/third_party/chibicc/chibicc.main.o \
$(THIRD_PARTY_CHIBICC_A).pkg
@$(APELINK)
o/$(MODE)/third_party/chibicc/chibicc2.com.dbg: \
$(THIRD_PARTY_CHIBICC_A_DEPS) \
$(THIRD_PARTY_CHIBICC2_A) \
$(APE_NO_MODIFY_SELF) \
$(CRT) \
o/$(MODE)/third_party/chibicc/help.txt.zip.o \
o/$(MODE)/third_party/chibicc/chibicc.main.chibicc.o \
$(THIRD_PARTY_CHIBICC2_A).pkg
@$(APELINK)
o/$(MODE)/third_party/chibicc/chibicc.com: \
o/$(MODE)/third_party/chibicc/chibicc.com.dbg \
@ -132,16 +108,6 @@ o/$(MODE)/third_party/chibicc/as.com.dbg: \
o/$(MODE)/third_party/chibicc/chibicc.o: \
OVERRIDE_CPPFLAGS += $(THIRD_PARTY_CHIBICC_DEFINES)
o/$(MODE)/third_party/chibicc/chibicc.chibicc.o: \
CHIBICC_FLAGS += $(THIRD_PARTY_CHIBICC_DEFINES)
o/$(MODE)/%.chibicc.o: %.s $(CHIBICC)
@$(COMPILE) -ACHIBICC -T$@ $(CHIBICC) $(CHIBICC_FLAGS) -c -o $@ $<
o/$(MODE)/%.chibicc.o: %.c $(CHIBICC)
@$(COMPILE) -ACHIBICC -T$@ $(CHIBICC) $(CHIBICC_FLAGS) -c -o $@ $<
o/$(MODE)/%.chibicc2.o: %.c $(CHIBICC2)
@$(COMPILE) -ACHIBICC2 -T$@ $(CHIBICC2) $(CHIBICC_FLAGS) -c -o $@ $<
THIRD_PARTY_CHIBICC_LIBS = $(foreach x,$(THIRD_PARTY_CHIBICC_ARTIFACTS),$($(x)))
THIRD_PARTY_CHIBICC_SRCS = $(foreach x,$(THIRD_PARTY_CHIBICC_ARTIFACTS),$($(x)_SRCS))
THIRD_PARTY_CHIBICC_HDRS = $(foreach x,$(THIRD_PARTY_CHIBICC_ARTIFACTS),$($(x)_HDRS))

View file

@ -22,6 +22,7 @@
// standard's wording:
// https://github.com/rui314/chibicc/wiki/cpp.algo.pdf
#include "libc/intrin/kprintf.h"
#include "libc/log/libfatal.internal.h"
#include "libc/mem/arena.h"
#include "libc/stdio/stdio.h"
@ -639,7 +640,7 @@ char *search_include_paths(char *filename) {
if (cached) return cached;
// Search a file from the include paths.
for (int i = 0; i < include_paths.len; i++) {
char *path = xasprintf("%s/%s", include_paths.data[i], filename);
char *path = xjoinpaths(include_paths.data[i], filename);
if (!fileexists(path)) continue;
hashmap_put(&cache, filename, path);
include_next_idx = i + 1;

View file

@ -1,3 +1,4 @@
#include "libc/mem/alloca.h"
#include "third_party/chibicc/test/test.h"
void *fn(int x, void *p, int y) {

View file

@ -27,12 +27,13 @@ int main() {
ASSERT(5, include1);
ASSERT(7, include2);
#if 0
#include "/no/such/file"
ASSERT(0, 1);
#if nested
#endif
#endif
/* [jart] breaks mkdeps */
/* #if 0 */
/* #include "/no/such/file" */
/* ASSERT(0, 1); */
/* #if nested */
/* #endif */
/* #endif */
int m = 0;

View file

@ -13,7 +13,6 @@
PKGS += THIRD_PARTY_CHIBICC_TEST
THIRD_PARTY_CHIBICC_TEST_A = o/$(MODE)/third_party/chibicc/test/test.a
THIRD_PARTY_CHIBICC_TEST2_A = o/$(MODE)/third_party/chibicc/test/test2.a
THIRD_PARTY_CHIBICC_TEST_FILES := $(wildcard third_party/chibicc/test/*)
THIRD_PARTY_CHIBICC_TEST_SRCS = $(filter %.c,$(THIRD_PARTY_CHIBICC_TEST_FILES))
THIRD_PARTY_CHIBICC_TEST_SRCS_TEST = $(filter %_test.c,$(THIRD_PARTY_CHIBICC_TEST_SRCS))
@ -21,14 +20,10 @@ THIRD_PARTY_CHIBICC_TEST_HDRS = $(filter %.h,$(THIRD_PARTY_CHIBICC_TEST_FILES))
THIRD_PARTY_CHIBICC_TEST_TESTS = $(THIRD_PARTY_CHIBICC_TEST_COMS:%=%.ok)
THIRD_PARTY_CHIBICC_TEST_COMS = \
$(THIRD_PARTY_CHIBICC_TEST_SRCS_TEST:%_test.c=o/$(MODE)/%_test.com) \
$(THIRD_PARTY_CHIBICC_TEST_SRCS_TEST:%_test.c=o/$(MODE)/%_test2.com)
$(THIRD_PARTY_CHIBICC_TEST_SRCS_TEST:%_test.c=o/$(MODE)/%_test.com)
THIRD_PARTY_CHIBICC_TEST_OBJS = \
$(THIRD_PARTY_CHIBICC_TEST_SRCS:%.c=o/$(MODE)/%.chibicc.o)
THIRD_PARTY_CHIBICC_TEST2_OBJS = \
$(THIRD_PARTY_CHIBICC_TEST_SRCS:%.c=o/$(MODE)/%.chibicc2.o)
$(THIRD_PARTY_CHIBICC_TEST_SRCS:%.c=o/$(MODE)/%.o)
THIRD_PARTY_CHIBICC_TEST_BINS = \
$(THIRD_PARTY_CHIBICC_TEST_COMS) \
@ -59,45 +54,27 @@ THIRD_PARTY_CHIBICC_TEST_DEPS := \
$(THIRD_PARTY_CHIBICC_TEST_A): \
$(THIRD_PARTY_CHIBICC_TEST_A).pkg \
o/$(MODE)/third_party/chibicc/test/common.chibicc.o
$(THIRD_PARTY_CHIBICC_TEST2_A): \
$(THIRD_PARTY_CHIBICC_TEST2_A).pkg \
o/$(MODE)/third_party/chibicc/test/common.chibicc2.o
o/$(MODE)/third_party/chibicc/test/common.o
$(THIRD_PARTY_CHIBICC_TEST_A).pkg: \
o/$(MODE)/third_party/chibicc/test/common.chibicc.o \
$(foreach x,$(THIRD_PARTY_CHIBICC_TEST_DIRECTDEPS),$($(x)_A).pkg)
$(THIRD_PARTY_CHIBICC_TEST2_A).pkg: \
o/$(MODE)/third_party/chibicc/test/common.chibicc2.o \
o/$(MODE)/third_party/chibicc/test/common.o \
$(foreach x,$(THIRD_PARTY_CHIBICC_TEST_DIRECTDEPS),$($(x)_A).pkg)
o/$(MODE)/third_party/chibicc/test/%.com.dbg: \
$(THIRD_PARTY_CHIBICC_TEST_DEPS) \
$(THIRD_PARTY_CHIBICC_TEST_A) \
o/$(MODE)/third_party/chibicc/test/%.chibicc.o \
o/$(MODE)/third_party/chibicc/test/%.o \
$(THIRD_PARTY_CHIBICC_TEST_A).pkg \
$(CRT) \
$(APE_NO_MODIFY_SELF)
@$(APELINK)
o/$(MODE)/third_party/chibicc/test/%2.com.dbg: \
$(THIRD_PARTY_CHIBICC_TEST_DEPS) \
$(THIRD_PARTY_CHIBICC_TEST2_A) \
o/$(MODE)/third_party/chibicc/test/%.chibicc2.o \
$(THIRD_PARTY_CHIBICC_TEST2_A).pkg \
$(CRT) \
$(APE_NO_MODIFY_SELF)
@$(APELINK)
$(THIRD_PARTY_CHIBICC_TEST_OBJS): CC = $(CHIBICC)
$(THIRD_PARTY_CHIBICC_TEST_OBJS): $(CHIBICC)
.PRECIOUS: $(THIRD_PARTY_CHIBICC_TEST_OBJS)
.PRECIOUS: $(THIRD_PARTY_CHIBICC_TEST2_OBJS)
o/$(MODE)/third_party/chibicc/test/int128_test.o: QUOTA = -M512m
o/$(MODE)/third_party/chibicc/test/int128_test.o: QUOTA = -M512m
o/$(MODE)/third_party/chibicc/test/int128_test.chibicc.o: QUOTA = -M1024m
o/$(MODE)/third_party/chibicc/test/int128_test.chibicc2.o: QUOTA = -M1024m
o/$(MODE)/third_party/chibicc/test/int128_test.o: QUOTA = -M1024m
.PHONY: o/$(MODE)/third_party/chibicc/test
o/$(MODE)/third_party/chibicc/test: \

View file

@ -40,6 +40,7 @@
#include "libc/nt/struct/msg.h"
#include "libc/runtime/utmp.h"
#include "libc/sock/sock.h"
#include "libc/sock/struct/sockaddr.h"
#include "libc/sysv/consts/fileno.h"
#include "libc/time/time.h"
#include "third_party/finger/finger.h"

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

View file

@ -149,6 +149,7 @@
#include "libc/nt/version.h"
#include "libc/runtime/runtime.h"
#include "libc/sock/sock.h"
#include "libc/sock/struct/pollfd.h"
#include "libc/stdio/append.internal.h"
#include "libc/stdio/stdio.h"
#include "libc/str/str.h"

View file

@ -34,6 +34,7 @@
#include "libc/runtime/gc.h"
#include "libc/runtime/stack.h"
#include "libc/sock/sock.h"
#include "libc/sock/struct/pollfd.h"
#include "libc/str/str.h"
#include "libc/sysv/consts/exit.h"
#include "libc/sysv/consts/poll.h"

View file

@ -292,8 +292,12 @@ o/$(MODE)/third_party/lua/luac.com.dbg: \
################################################################################
THIRD_PARTY_LUA_SRCS = \
$(foreach x,$(THIRD_PARTY_LUA_ARTIFACTS),$($(x)_SRCS)) \
third_party/lua/lua.main.c \
third_party/lua/luac.main.c
THIRD_PARTY_LUA_LIBS = $(foreach x,$(THIRD_PARTY_LUA_ARTIFACTS),$($(x)))
THIRD_PARTY_LUA_SRCS = $(foreach x,$(THIRD_PARTY_LUA_ARTIFACTS),$($(x)_SRCS))
THIRD_PARTY_LUA_HDRS = $(foreach x,$(THIRD_PARTY_LUA_ARTIFACTS),$($(x)_HDRS))
THIRD_PARTY_LUA_OBJS = $(foreach x,$(THIRD_PARTY_LUA_ARTIFACTS),$($(x)_OBJS))
$(THIRD_PARTY_LUA_OBJS): third_party/lua/lua.mk

View file

@ -47,6 +47,9 @@
#include "libc/runtime/memtrack.internal.h"
#include "libc/runtime/runtime.h"
#include "libc/sock/sock.h"
#include "libc/sock/struct/ifconf.h"
#include "libc/sock/struct/linger.h"
#include "libc/sock/struct/pollfd.h"
#include "libc/sock/syslog.h"
#include "libc/stdio/append.internal.h"
#include "libc/stdio/stdio.h"

View file

@ -2,3 +2,11 @@ ORIGIN
GNU Make 4.3
http://ftp.gnu.org/gnu/make/make-4.3.tar.gz
LOCAL CHANGES
- Remove portability torture code
- Add support for Landlock LSM sandboxing
- Add .UNSANDBOXED variable to disable it
- Add .UNVEIL variable which works like .EXTRA_PREREQS
- Remove code that forces slow path if not using /bin/sh

428
third_party/make/job.c vendored
View file

@ -28,8 +28,22 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
#include "libc/runtime/stack.h"
#include "libc/calls/calls.h"
#include "libc/x/x.h"
#include "libc/bits/safemacros.internal.h"
#include "libc/x/x.h"
#include "libc/runtime/runtime.h"
#include "libc/bits/safemacros.internal.h"
#include "libc/elf/struct/ehdr.h"
#include "libc/bits/bits.h"
#include "libc/intrin/kprintf.h"
#include "libc/intrin/kprintf.h"
#include "third_party/make/dep.h"
#define GOTO_SLOW \
do { \
kprintf("%s:%d: goto slow\n", __FILE__, __LINE__); \
goto slow; \
} while (0)
#ifdef WINDOWS32
const char *default_shell = "sh.exe";
int no_default_sh_exe = 1;
@ -217,6 +231,8 @@ is_bourne_compatible_shell (const char *path)
{
/* List of known POSIX (or POSIX-ish) shells. */
static const char *unix_shells[] = {
"build/bootstrap/cocmd.com",
"dash",
"sh",
"bash",
"ksh",
@ -1569,12 +1585,76 @@ start_waiting_jobs (void)
}
void Unveil (const char *path, const char *perm)
bool IsDynamicExecutable(const char *prog)
{
int fd;
Elf64_Ehdr e;
struct stat st;
if ((fd = open(prog, O_RDONLY)) == -1)
return false;
if (read(fd, &e, sizeof(e)) != sizeof(e))
return false;
close(fd);
return e.e_type == ET_DYN &&
READ32LE(e.e_ident) == READ32LE(ELFMAG);
}
bool GetPermPrefix (const char *path, char out_perm[5], const char **out_path)
{
int c, n;
for (n = 0;;)
switch ((c = *path++)) {
case 'r':
case 'w':
case 'c':
case 'x':
out_perm[n++] = c;
out_perm[n] = 0;
break;
case ':':
if (n)
{
*out_path = path;
return true;
}
else
return false;
default:
return false;
}
}
/* Adds path to sandbox, returning true if found. */
bool Unveil (const char *path, const char *perm)
{
int e;
char permprefix[5];
/* if path is like `rwcx:o/tmp` then `rwcx` will override perm */
if (path && GetPermPrefix (path, permprefix, &path))
perm = permprefix;
e = errno;
unveil(path, perm);
errno = e;
if (unveil (path, perm) != -1)
return true;
/* if we're not on openbsd or linux 5.13+ we assume it worked */
if (errno == ENOSYS)
{
errno = e;
return true;
}
/* path not found isn't really much of an error */
if (errno == ENOENT)
{
errno = e;
return false;
}
/* otherwise fail */
OSS (error, NILF, "%s: %s", path, strerror (errno));
return true;
}
/* POSIX:
@ -1625,39 +1705,87 @@ child_execute_job (struct childbase *child, int good_stdin, char **argv)
struct child *c;
char pathbuf[PATH_MAX];
char outpathbuf[PATH_MAX];
const struct variable *var;
c = (struct child *)child;
if (c->file->deps) {
argv[0] = commandv (argv[0], pathbuf, sizeof (pathbuf));
Unveil (argv[0], "rx");
Unveil ("o/tmp", "rwcx");
Unveil ("/dev/zero", "r");
Unveil ("/dev/null", "rw");
Unveil ("/dev/full", "rw");
Unveil ("/etc/hosts", "r");
Unveil ("/dev/stdin", "rw");
Unveil ("/dev/stdout", "rw");
Unveil ("/dev/stderr", "rw");
Unveil ("/usr/bin/ape", "rx");
Unveil ("/etc/console", "rw");
Unveil ("/etc/services", "r");
Unveil ("libc/integral", "r");
Unveil ("/etc/protocols", "r");
Unveil ("build/bootstrap", "rx");
Unveil ("/etc/resolv.conf", "r");
Unveil ("o/third_party/gcc", "rx");
Unveil ("libc/disclaimer.inc", "r");
if (strlen(c->file->name) < PATH_MAX) {
const char *dir;
strcpy (outpathbuf, c->file->name);
dir = dirname (outpathbuf);
makedirs (dir, 0755);
Unveil (dir, "rwc");
if (!lookup_variable_in_set (STRING_SIZE_TUPLE(".UNSANDBOXED"),
c->file->variables->set))
{
/* resolve command into executable path */
argv[0] = commandv (argv[0], pathbuf, sizeof (pathbuf));
if (argv[0][0] == '/' && IsDynamicExecutable (argv[0]))
{
/* make it easier to run dynamic system executables */
Unveil ("/lib", "rx");
Unveil ("/lib64", "rx");
Unveil ("/usr/lib", "rx");
Unveil ("/usr/lib64", "rx");
Unveil ("/usr/local/lib", "rx");
Unveil ("/usr/local/lib64", "rx");
Unveil ("/etc/ld-musl-x86_64.path", "r");
Unveil ("/etc/ld.so.conf", "r");
Unveil ("/etc/ld.so.cache", "r");
Unveil ("/etc/ld.so.conf.d", "r");
Unveil ("/etc/ld.so.preload", "r");
}
else
/* permit launching actually portable executables */
if (!Unveil ("/usr/bin/ape", "rx"))
Unveil (xjoinpaths (firstnonnull (getenv ("TMPDIR"),
firstnonnull (getenv ("HOME"),
".")),
".ape"),
"rx");
/* unveil executable */
Unveil (argv[0], "rx");
/* unveil essential paths */
Unveil ("/dev/zero", "r");
Unveil ("/dev/null", "rw");
Unveil ("/dev/full", "rw");
Unveil ("/dev/stdin", "rw");
Unveil ("/dev/stdout", "rw");
Unveil ("/dev/stderr", "rw");
/* unveil cosmopolitan specific */
Unveil ("o/tmp", "rwcx");
Unveil ("libc/integral", "r");
Unveil ("libc/disclaimer.inc", "r");
Unveil ("build/bootstrap", "rx");
Unveil ("o/third_party/gcc", "rx");
/* unveil target output directory */
if (strlen(c->file->name) < PATH_MAX)
{
const char *dir;
strcpy (outpathbuf, c->file->name);
dir = dirname (outpathbuf);
makedirs (dir, 0755);
Unveil (dir, "rwc");
}
/* unveil target prerequisites */
for (d = c->file->deps; d; d = d->next)
Unveil (d->file->name, "rx");
/* unveil explicit .UNVEIL entries */
if ((var = lookup_variable_in_set (STRING_SIZE_TUPLE(".UNVEIL"),
c->file->variables->set)))
{
char *val, *tok, *state, *start;
start = val = strdup (variable_expand (var->value));
while (tok = strtok_r (start, " \t\r\n", &state))
{
Unveil (tok, "r");
start = 0;
}
free(val);
}
/* commit sandbox */
Unveil (0, 0);
}
for (d = c->file->deps; d; d = d->next)
/* TODO(jart): remove w (do code morphing outside package.com) */
Unveil (d->file->name, "rwx");
Unveil (0, 0);
}
}
/* Run the command. */
@ -1743,36 +1871,6 @@ construct_command_argv_internal (char *line, char **restp, const char *shell,
const char *shellflags, const char *ifs,
int flags, char **batch_filename UNUSED)
{
#if defined (WINDOWS32)
/* We used to have a double quote (") in sh_chars_dos[] below, but
that caused any command line with quoted file names be run
through a temporary batch file, which introduces command-line
limit of 4K charcaters imposed by cmd.exe. Since CreateProcess
can handle quoted file names just fine, removing the quote lifts
the limit from a very frequent use case, because using quoted
file names is commonplace on MS-Windows. */
static const char *sh_chars_dos = "|&<>";
static const char *sh_cmds_dos[] =
{ "assoc", "break", "call", "cd", "chcp", "chdir", "cls", "color", "copy",
"ctty", "date", "del", "dir", "echo", "echo.", "endlocal", "erase",
"exit", "for", "ftype", "goto", "if", "if", "md", "mkdir", "move",
"path", "pause", "prompt", "rd", "rem", "ren", "rename", "rmdir",
"set", "setlocal", "shift", "time", "title", "type", "ver", "verify",
"vol", ":", 0 };
static const char *sh_chars_sh = "#;\"*?[]&|<>(){}$`^";
static const char *sh_cmds_sh[] =
{ "cd", "eval", "exec", "exit", "login", "logout", "set", "umask", "wait",
"while", "for", "case", "if", ":", ".", "break", "continue", "export",
"read", "readonly", "shift", "times", "trap", "switch", "test", "command",
#ifdef BATCH_MODE_ONLY_SHELL
"echo",
#endif
0 };
const char *sh_chars;
const char **sh_cmds;
#else /* must be UNIX-ish */
static const char *sh_chars = "#;\"*?[]&|<>(){}$`^~!";
static const char *sh_cmds[] =
{ ".", ":", "alias", "bg", "break", "case", "cd", "command", "continue",
@ -1780,15 +1878,6 @@ construct_command_argv_internal (char *line, char **restp, const char *shell,
"if", "jobs", "login", "logout", "read", "readonly", "return", "set",
"shift", "test", "times", "trap", "type", "ulimit", "umask", "unalias",
"unset", "wait", "while", 0 };
# ifdef HAVE_DOS_PATHS
/* This is required if the MSYS/Cygwin ports (which do not define
WINDOWS32) are compiled with HAVE_DOS_PATHS defined, which uses
sh_chars_sh directly (see below). The value must be identical
to that of sh_chars immediately above. */
static const char *sh_chars_sh = "#;\"*?[]&|<>(){}$`^~!";
# endif /* HAVE_DOS_PATHS */
#endif
size_t i;
char *p;
#ifndef NDEBUG
@ -1800,20 +1889,6 @@ construct_command_argv_internal (char *line, char **restp, const char *shell,
int instring, word_has_equals, seen_nonequals, last_argument_was_empty;
char **new_argv = 0;
char *argstr = 0;
#ifdef WINDOWS32
int slow_flag = 0;
if (!unixy_shell)
{
sh_cmds = sh_cmds_dos;
sh_chars = sh_chars_dos;
}
else
{
sh_cmds = sh_cmds_sh;
sh_chars = sh_chars_sh;
}
#endif /* WINDOWS32 */
if (restp != NULL)
*restp = NULL;
@ -1830,47 +1905,8 @@ construct_command_argv_internal (char *line, char **restp, const char *shell,
/* See if it is safe to parse commands internally. */
if (shell == 0)
shell = default_shell;
#ifdef WINDOWS32
else if (strcmp (shell, default_shell))
{
char *s1 = _fullpath (NULL, shell, 0);
char *s2 = _fullpath (NULL, default_shell, 0);
slow_flag = strcmp ((s1 ? s1 : ""), (s2 ? s2 : ""));
free (s1);
free (s2);
}
if (slow_flag)
goto slow;
#else /* not WINDOWS32 */
#if defined (__MSDOS__) || defined (__EMX__)
else if (strcasecmp (shell, default_shell))
{
extern int _is_unixy_shell (const char *_path);
DB (DB_BASIC, (_("$SHELL changed (was '%s', now '%s')\n"),
default_shell, shell));
unixy_shell = _is_unixy_shell (shell);
/* we must allocate a copy of shell: construct_command_argv() will free
* shell after this function returns. */
default_shell = xstrdup (shell);
}
if (unixy_shell)
{
sh_chars = sh_chars_sh;
sh_cmds = sh_cmds_sh;
}
else
{
sh_chars = sh_chars_dos;
sh_cmds = sh_cmds_dos;
}
#else /* !__MSDOS__ */
else if (strcmp (shell, default_shell))
goto slow;
#endif /* !__MSDOS__ && !__EMX__ */
#endif /* not WINDOWS32 */
/* [jart] remove code that forces slow path if not using /bin/sh */
if (ifs)
for (cap = ifs; *cap != '\0'; ++cap)
@ -1942,14 +1978,6 @@ construct_command_argv_internal (char *line, char **restp, const char *shell,
quotes have the same effect. */
else if (instring == '"' && strchr ("\\$`", *p) != 0 && unixy_shell)
goto slow;
#ifdef WINDOWS32
/* Quoted wildcard characters must be passed quoted to the
command, so give up the fast route. */
else if (instring == '"' && strchr ("*?", *p) != 0 && !unixy_shell)
goto slow;
else if (instring == '"' && strncmp (p, "\\\"", 2) == 0)
*ap++ = *++p;
#endif
else
*ap++ = *p;
}
@ -1988,30 +2016,8 @@ construct_command_argv_internal (char *line, char **restp, const char *shell,
while (ISBLANK (p[1]))
++p;
}
#ifdef WINDOWS32
/* Backslash before whitespace is not special if our shell
is not Unixy. */
else if (ISSPACE (p[1]) && !unixy_shell)
{
*ap++ = *p;
break;
}
#endif
else if (p[1] != '\0')
{
#ifdef HAVE_DOS_PATHS
/* Only remove backslashes before characters special to Unixy
shells. All other backslashes are copied verbatim, since
they are probably DOS-style directory separators. This
still leaves a small window for problems, but at least it
should work for the vast majority of naive users. */
if (p[1] != '\\' && p[1] != '\''
&& !ISSPACE (p[1])
&& strchr (sh_chars_sh, p[1]) == 0)
/* back up one notch, to copy the backslash */
--p;
#endif /* HAVE_DOS_PATHS */
/* Copy and skip the following char. */
*ap++ = *++p;
}
@ -2061,12 +2067,6 @@ construct_command_argv_internal (char *line, char **restp, const char *shell,
{
if (streq (sh_cmds[j], new_argv[0]))
goto slow;
#if defined(__EMX__) || defined(WINDOWS32)
/* Non-Unix shells are case insensitive. */
if (!unixy_shell
&& strcasecmp (sh_cmds[j], new_argv[0]) == 0)
goto slow;
#endif
}
}
@ -2121,23 +2121,6 @@ construct_command_argv_internal (char *line, char **restp, const char *shell,
free (new_argv);
}
#ifdef WINDOWS32
/*
* Not eating this whitespace caused things like
*
* sh -c "\n"
*
* which gave the shell fits. I think we have to eat
* whitespace here, but this code should be considered
* suspicious if things start failing....
*/
/* Make sure not to bother processing an empty line. */
NEXT_TOKEN (line);
if (*line == '\0')
return 0;
#endif /* WINDOWS32 */
{
/* SHELL may be a multi-word command. Construct a command line
"$(SHELL) $(.SHELLFLAGS) LINE", with all special chars in LINE escaped.
@ -2148,9 +2131,6 @@ construct_command_argv_internal (char *line, char **restp, const char *shell,
size_t shell_len = strlen (shell);
size_t line_len = strlen (line);
size_t sflags_len = shellflags ? strlen (shellflags) : 0;
#ifdef WINDOWS32
char *command_ptr = NULL; /* used for batch_mode_shell mode */
#endif
/* In .ONESHELL mode we are allowed to throw the entire current
recipe string at a single shell and trust that the user
@ -2168,12 +2148,7 @@ construct_command_argv_internal (char *line, char **restp, const char *shell,
/* Remove and ignore interior prefix chars [@+-] because they're
meaningless given a single shell. */
if (is_bourne_compatible_shell (shell)
#ifdef WINDOWS32
/* If we didn't find any sh.exe, don't behave is if we did! */
&& !no_default_sh_exe
#endif
)
if (is_bourne_compatible_shell (shell))
{
const char *f = line;
char *t = line;
@ -2208,79 +2183,6 @@ construct_command_argv_internal (char *line, char **restp, const char *shell,
}
*t = '\0';
}
#ifdef WINDOWS32
else /* non-Posix shell (cmd.exe etc.) */
{
const char *f = line;
char *t = line;
char *tstart = t;
int temp_fd;
FILE* batch = NULL;
int id = GetCurrentProcessId ();
PATH_VAR(fbuf);
/* Generate a file name for the temporary batch file. */
sprintf (fbuf, "make%d", id);
*batch_filename = create_batch_file (fbuf, 0, &temp_fd);
DB (DB_JOBS, (_("Creating temporary batch file %s\n"),
*batch_filename));
/* Create a FILE object for the batch file, and write to it the
commands to be executed. Put the batch file in TEXT mode. */
_setmode (temp_fd, _O_TEXT);
batch = _fdopen (temp_fd, "wt");
fputs ("@echo off\n", batch);
DB (DB_JOBS, (_("Batch file contents:\n\t@echo off\n")));
/* Copy the recipe, removing and ignoring interior prefix chars
[@+-]: they're meaningless in .ONESHELL mode. */
while (*f != '\0')
{
/* This is the start of a new recipe line. Skip whitespace
and prefix characters but not newlines. */
while (ISBLANK (*f) || *f == '-' || *f == '@' || *f == '+')
++f;
/* Copy until we get to the next logical recipe line. */
while (*f != '\0')
{
/* Remove the escaped newlines in the command, and the
blanks that follow them. Windows shells cannot handle
escaped newlines. */
if (*f == '\\' && f[1] == '\n')
{
f += 2;
while (ISBLANK (*f))
++f;
}
*(t++) = *(f++);
/* On an unescaped newline, we're done with this
line. */
if (f[-1] == '\n')
break;
}
/* Write another line into the batch file. */
if (t > tstart)
{
char c = *t;
*t = '\0';
fputs (tstart, batch);
DB (DB_JOBS, ("\t%s", tstart));
tstart = t;
*t = c;
}
}
DB (DB_JOBS, ("\n"));
fclose (batch);
/* Create an argv list for the shell command line that
will run the batch file. */
new_argv = xmalloc (2 * sizeof (char *));
new_argv[0] = xstrdup (*batch_filename);
new_argv[1] = NULL;
return new_argv;
}
#endif /* WINDOWS32 */
/* Create an argv list for the shell command line. */
{
int n = 0;

View file

@ -28,6 +28,7 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
#include "libc/limits.h"
#include "libc/sysv/consts/sig.h"
#include "libc/log/log.h"
#include "libc/log/log.h"
#include "third_party/make/getopt.h"
STATIC_STACK_SIZE(0x200000); // 2mb stack

View file

@ -4720,7 +4720,7 @@ def pairs(iterable):
return zip(a, b)
class ZoneInfo(tzinfo):
zoneroot = '/usr/share/zoneinfo'
zoneroot = '/zip/usr/share/zoneinfo'
def __init__(self, ut, ti):
"""

View file

@ -232,6 +232,7 @@ class CmdLineTest(unittest.TestCase):
script_dir, None,
importlib.machinery.SourceFileLoader)
@unittest.skipIf(True, "[jart] Breaks Landlock LSM due to EXDEV")
def test_script_compiled(self):
with support.temp_dir() as script_dir:
script_name = _make_test_script(script_dir, 'script')
@ -249,6 +250,7 @@ class CmdLineTest(unittest.TestCase):
script_dir, '',
importlib.machinery.SourceFileLoader)
@unittest.skipIf(True, "[jart] Breaks Landlock LSM due to EXDEV")
def test_directory_compiled(self):
with support.temp_dir() as script_dir:
script_name = _make_test_script(script_dir, '__main__')
@ -271,6 +273,7 @@ class CmdLineTest(unittest.TestCase):
self._check_script(zip_name, run_name, zip_name, zip_name, '',
zipimport.zipimporter)
@unittest.skipIf(True, "[jart] Breaks Landlock LSM due to EXDEV")
def test_zipfile_compiled(self):
with support.temp_dir() as script_dir:
script_name = _make_test_script(script_dir, '__main__')
@ -279,6 +282,7 @@ class CmdLineTest(unittest.TestCase):
self._check_script(zip_name, run_name, zip_name, zip_name, '',
zipimport.zipimporter)
@unittest.skipIf(True, "[jart] Breaks Landlock LSM due to EXDEV")
def test_zipfile_error(self):
with support.temp_dir() as script_dir:
script_name = _make_test_script(script_dir, 'not_main')
@ -321,6 +325,7 @@ class CmdLineTest(unittest.TestCase):
script_name, script_dir, 'test_pkg',
importlib.machinery.SourceFileLoader)
@unittest.skipIf(True, "[jart] Breaks Landlock LSM due to EXDEV")
def test_package_compiled(self):
with support.temp_dir() as script_dir:
pkg_dir = os.path.join(script_dir, 'test_pkg')

View file

@ -2,6 +2,7 @@
# Contact: email-sig@python.org
# email package unit tests
import os
import re
import sys
import time
@ -4034,7 +4035,7 @@ class Test8BitBytesHandling(TestEmailBase):
non_latin_bin_msg_as7bit = '\n'.join(non_latin_bin_msg_as7bit)
def test_message_from_binary_file(self):
fn = 'test.msg'
fn = os.path.join(os.environ['TMPDIR'], 'test.msg')
self.addCleanup(unlink, fn)
with open(fn, 'wb') as testfile:
testfile.write(self.non_latin_bin_msg)

View file

@ -110,8 +110,8 @@ class LocaltimeTests(unittest.TestCase):
# XXX: Need a more robust test for Olson's tzdata
@unittest.skipIf(sys.platform.startswith(('win','cosmo')),
"Windows does not use Olson's TZ database")
@unittest.skipUnless(os.path.exists('/usr/share/zoneinfo') or
os.path.exists('/usr/lib/zoneinfo'),
@unittest.skipUnless(os.path.exists('/zip/usr/share/zoneinfo') or
os.path.exists('/zip/usr/lib/zoneinfo'),
"Can't find the Olson's TZ database")
@test.support.run_with_tz('Europe/Kiev')
def test_variable_tzname(self):

View file

@ -236,6 +236,7 @@ class AutoFileTests:
else:
self.fail("Should have raised OSError")
@unittest.skipIf(True, "[jart] Breaks Landlock LSM [why??]")
@unittest.skipIf(os.name == 'nt', "test only works on a POSIX-like system")
def testOpenDirFD(self):
fd = os.open('.', os.O_RDONLY)

View file

@ -103,7 +103,7 @@ c2V0PWlzby04ODU5LTE1CkNvbnRlbnQtVHJhbnNmZXItRW5jb2Rpbmc6IHF1b3RlZC1wcmludGFi
bGUKR2VuZXJhdGVkLUJ5OiBweWdldHRleHQucHkgMS4zCgA=
'''
LOCALEDIR = os.path.join('xx', 'LC_MESSAGES')
LOCALEDIR = os.path.join(os.environ['TMPDIR'], 'xx', 'LC_MESSAGES')
MOFILE = os.path.join(LOCALEDIR, 'gettext.mo')
MOFILE_BAD_MAJOR_VERSION = os.path.join(LOCALEDIR, 'gettext_bad_major_version.mo')
MOFILE_BAD_MINOR_VERSION = os.path.join(LOCALEDIR, 'gettext_bad_minor_version.mo')

View file

@ -13,6 +13,7 @@
#include "libc/sock/epoll.h"
#include "libc/sock/select.h"
#include "libc/sock/sock.h"
#include "libc/sock/struct/pollfd.h"
#include "libc/sysv/consts/epoll.h"
#include "libc/sysv/consts/poll.h"
#include "third_party/python/Include/abstract.h"

View file

@ -15,6 +15,7 @@
#include "libc/nt/version.h"
#include "libc/runtime/runtime.h"
#include "libc/sock/sock.h"
#include "libc/sock/struct/pollfd.h"
#include "libc/sysv/consts/af.h"
#include "libc/sysv/consts/f.h"
#include "libc/sysv/consts/fileno.h"

View file

@ -56,7 +56,7 @@ class TZInfo:
print("%s UTC = %s %-5s isdst=%d" % (utc, lmt, abbr, tti[1]) + shift, file=stream)
@classmethod
def zonelist(cls, zonedir='/usr/share/zoneinfo'):
def zonelist(cls, zonedir='/zip/usr/share/zoneinfo'):
zones = []
for root, _, files in os.walk(zonedir):
for f in files:
@ -75,7 +75,7 @@ if __name__ == '__main__':
sys.exit()
filepath = sys.argv[1]
if not filepath.startswith('/'):
filepath = os.path.join('/usr/share/zoneinfo', filepath)
filepath = os.path.join('/zip/usr/share/zoneinfo', filepath)
with open(filepath, 'rb') as fileobj:
tzi = TZInfo.fromfile(fileobj)
tzi.dump(sys.stdout)

View file

@ -1663,8 +1663,8 @@ THIRD_PARTY_PYTHON_PYTEST_A_DATA = \
third_party/python/Lib/test/formatfloat_testcases.txt \
third_party/python/Lib/test/talos-2019-0758.pem \
third_party/python/Lib/test/badcert.pem \
third_party/python/Lib/test/bad_coding.py \
third_party/python/Lib/test/bad_coding2.py \
third_party/python/Lib/test/bad_coding.py \
third_party/python/Lib/test/bad_coding2.py \
third_party/python/Lib/test/cmath_testcases.txt \
third_party/python/Lib/test/pstats.pck \
third_party/python/Lib/test/test_importlib/namespace_pkgs/project2/parent/child/two.py \
@ -1837,12 +1837,8 @@ THIRD_PARTY_PYTHON_PYTEST_PYMAINS = \
third_party/python/Lib/test/test_genexps.py \
third_party/python/Lib/test/test_getargs2.py \
third_party/python/Lib/test/test_getopt.py \
third_party/python/Lib/test/test_getpass.py \
third_party/python/Lib/test/test_gettext.py \
third_party/python/Lib/test/test_glob.py \
third_party/python/Lib/test/test_global.py \
third_party/python/Lib/test/test_grammar.py \
third_party/python/Lib/test/test_grp.py \
third_party/python/Lib/test/test_gzip.py \
third_party/python/Lib/test/test_hash.py \
third_party/python/Lib/test/test_hashlib.py \
@ -1864,14 +1860,11 @@ THIRD_PARTY_PYTHON_PYTEST_PYMAINS = \
third_party/python/Lib/test/test_itertools.py \
third_party/python/Lib/test/test_json/__main__.py \
third_party/python/Lib/test/test_kdf.py \
third_party/python/Lib/test/test_keyword.py \
third_party/python/Lib/test/test_keywordonlyarg.py \
third_party/python/Lib/test/test_list.py \
third_party/python/Lib/test/test_listcomps.py \
third_party/python/Lib/test/test_logging.py \
third_party/python/Lib/test/test_long.py \
third_party/python/Lib/test/test_longexp.py \
third_party/python/Lib/test/test_mailbox.py \
third_party/python/Lib/test/test_marshal.py \
third_party/python/Lib/test/test_memoryio.py \
third_party/python/Lib/test/test_memoryview.py \
@ -1886,22 +1879,15 @@ THIRD_PARTY_PYTHON_PYTEST_PYMAINS = \
third_party/python/Lib/test/test_opcodes.py \
third_party/python/Lib/test/test_operator.py \
third_party/python/Lib/test/test_optparse.py \
third_party/python/Lib/test/test_ordered_dict.py \
third_party/python/Lib/test/test_os.py \
third_party/python/Lib/test/test_ordered_dict.py \
third_party/python/Lib/test/test_parser.py \
third_party/python/Lib/test/test_pathlib.py \
third_party/python/Lib/test/test_pdb.py \
third_party/python/Lib/test/test_peepholer.py \
third_party/python/Lib/test/test_pickle.py \
third_party/python/Lib/test/test_pickletools.py \
third_party/python/Lib/test/test_pipes.py \
third_party/python/Lib/test/test_pkgimport.py \
third_party/python/Lib/test/test_plistlib.py \
third_party/python/Lib/test/test_poll.py \
third_party/python/Lib/test/test_poll.py \
third_party/python/Lib/test/test_popen.py \
third_party/python/Lib/test/test_posix.py \
third_party/python/Lib/test/test_posixpath.py \
third_party/python/Lib/test/test_pow.py \
third_party/python/Lib/test/test_pprint.py \
third_party/python/Lib/test/test_print.py \
@ -1909,8 +1895,6 @@ THIRD_PARTY_PYTHON_PYTEST_PYMAINS = \
third_party/python/Lib/test/test_property.py \
third_party/python/Lib/test/test_pstats.py \
third_party/python/Lib/test/test_pulldom.py \
third_party/python/Lib/test/test_pwd.py \
third_party/python/Lib/test/test_py_compile.py \
third_party/python/Lib/test/test_pyexpat.py \
third_party/python/Lib/test/test_quopri.py \
third_party/python/Lib/test/test_raise.py \
@ -1933,13 +1917,10 @@ THIRD_PARTY_PYTHON_PYTEST_PYMAINS = \
third_party/python/Lib/test/test_set.py \
third_party/python/Lib/test/test_setcomps.py \
third_party/python/Lib/test/test_shlex.py \
third_party/python/Lib/test/test_shutil.py \
third_party/python/Lib/test/test_signal.py \
third_party/python/Lib/test/test_site.py \
third_party/python/Lib/test/test_signal.py \
third_party/python/Lib/test/test_slice.py \
third_party/python/Lib/test/test_sndhdr.py \
third_party/python/Lib/test/test_sort.py \
third_party/python/Lib/test/test_sqlite.py \
third_party/python/Lib/test/test_stat.py \
third_party/python/Lib/test/test_statistics.py \
third_party/python/Lib/test/test_strftime.py \
@ -1961,13 +1942,10 @@ THIRD_PARTY_PYTHON_PYTEST_PYMAINS = \
third_party/python/Lib/test/test_sys_setprofile.py \
third_party/python/Lib/test/test_syslog.py \
third_party/python/Lib/test/test_tarfile.py \
third_party/python/Lib/test/test_tempfile.py \
third_party/python/Lib/test/test_textwrap.py \
third_party/python/Lib/test/test_time.py \
third_party/python/Lib/test/test_timeit.py \
third_party/python/Lib/test/test_timeout.py \
third_party/python/Lib/test/test_tokenize.py \
third_party/python/Lib/test/test_trace.py \
third_party/python/Lib/test/test_traceback.py \
third_party/python/Lib/test/test_tracemalloc.py \
third_party/python/Lib/test/test_tuple.py \
@ -1977,7 +1955,6 @@ THIRD_PARTY_PYTHON_PYTEST_PYMAINS = \
third_party/python/Lib/test/test_unary.py \
third_party/python/Lib/test/test_unicode.py \
third_party/python/Lib/test/test_unicode_file.py \
third_party/python/Lib/test/test_unicode_file_functions.py \
third_party/python/Lib/test/test_unicode_identifiers.py \
third_party/python/Lib/test/test_unicodedata.py \
third_party/python/Lib/test/test_univnewlines.py \
@ -2000,7 +1977,6 @@ THIRD_PARTY_PYTHON_PYTEST_PYMAINS = \
third_party/python/Lib/test/test_xml_etree_c.py \
third_party/python/Lib/test/test_yield_from.py \
third_party/python/Lib/test/test_zipapp.py \
third_party/python/Lib/test/test_zipimport.py \
third_party/python/Lib/test/test_zlib.py
THIRD_PARTY_PYTHON_PYTEST_TODOS = \
@ -2127,9 +2103,10 @@ o/$(MODE)/third_party/python/Lib/test/test_genexps.py.runs: \
o/$(MODE)/third_party/python/pythontester.com
@$(COMPILE) -ACHECK -tT$@ $(PYHARNESSARGS) $< -m test.test_genexps $(PYTESTARGS)
o/$(MODE)/third_party/python/Lib/test/test_sqlite.py.runs: \
o/$(MODE)/third_party/python/pythontester.com
@$(COMPILE) -ACHECK -tT$@ $(PYHARNESSARGS) $< -m test.test_sqlite $(PYTESTARGS)
# [jart] incompatible with landlock because it uses current directory for temp files
# o/$(MODE)/third_party/python/Lib/test/test_sqlite.py.runs: \
# o/$(MODE)/third_party/python/pythontester.com
# @$(COMPILE) -ACHECK -tT$@ $(PYHARNESSARGS) $< -m test.test_sqlite $(PYTESTARGS)
o/$(MODE)/third_party/python/Lib/test/test_bz2.py.runs: \
o/$(MODE)/third_party/python/pythontester.com
@ -2283,9 +2260,10 @@ o/$(MODE)/third_party/python/Lib/test/test_cmd.py.runs: \
o/$(MODE)/third_party/python/pythontester.com
@$(COMPILE) -ACHECK -tT$@ $(PYHARNESSARGS) $< -m test.test_cmd $(PYTESTARGS)
o/$(MODE)/third_party/python/Lib/test/test_pwd.py.runs: \
o/$(MODE)/third_party/python/pythontester.com
@$(COMPILE) -ACHECK -tT$@ $(PYHARNESSARGS) $< -m test.test_pwd $(PYTESTARGS)
# [jart] incompatible with landlock because it uses current directory for temp files
# o/$(MODE)/third_party/python/Lib/test/test_pwd.py.runs: \
# o/$(MODE)/third_party/python/pythontester.com
# @$(COMPILE) -ACHECK -tT$@ $(PYHARNESSARGS) $< -m test.test_pwd $(PYTESTARGS)
o/$(MODE)/third_party/python/Lib/test/test_cmath.py.runs: \
o/$(MODE)/third_party/python/pythontester.com
@ -2515,9 +2493,10 @@ o/$(MODE)/third_party/python/Lib/test/test_longexp.py.runs: \
o/$(MODE)/third_party/python/pythontester.com
@$(COMPILE) -ACHECK -tT$@ $(PYHARNESSARGS) $< -m test.test_longexp $(PYTESTARGS)
o/$(MODE)/third_party/python/Lib/test/test_glob.py.runs: \
o/$(MODE)/third_party/python/pythontester.com
@$(COMPILE) -ACHECK -tT$@ $(PYHARNESSARGS) $< -m test.test_glob $(PYTESTARGS)
# [jart] incompatible with landlock because it uses current directory for temp files
# o/$(MODE)/third_party/python/Lib/test/test_glob.py.runs: \
# o/$(MODE)/third_party/python/pythontester.com
# @$(COMPILE) -ACHECK -tT$@ $(PYHARNESSARGS) $< -m test.test_glob $(PYTESTARGS)
o/$(MODE)/third_party/python/Lib/test/test_global.py.runs: \
o/$(MODE)/third_party/python/pythontester.com
@ -2803,9 +2782,10 @@ o/$(MODE)/third_party/python/Lib/test/test_unicode_identifiers.py.runs: \
o/$(MODE)/third_party/python/pythontester.com
@$(COMPILE) -ACHECK -tT$@ $(PYHARNESSARGS) $< -m test.test_unicode_identifiers $(PYTESTARGS)
o/$(MODE)/third_party/python/Lib/test/test_unicode_file_functions.py.runs: \
o/$(MODE)/third_party/python/pythontester.com
@$(COMPILE) -ACHECK -tT$@ $(PYHARNESSARGS) $< -m test.test_unicode_file_functions $(PYTESTARGS)
# [jart] unsupported with landlock right now because exdev renaming
# o/$(MODE)/third_party/python/Lib/test/test_unicode_file_functions.py.runs: \
# o/$(MODE)/third_party/python/pythontester.com
# @$(COMPILE) -ACHECK -tT$@ $(PYHARNESSARGS) $< -m test.test_unicode_file_functions $(PYTESTARGS)
o/$(MODE)/third_party/python/Lib/test/test_textwrap.py.runs: \
o/$(MODE)/third_party/python/pythontester.com
@ -2831,21 +2811,24 @@ o/$(MODE)/third_party/python/Lib/test/test_coroutines.py.runs: \
o/$(MODE)/third_party/python/pythontester.com
@$(COMPILE) -ACHECK -tT$@ $(PYHARNESSARGS) $< -m test.test_coroutines $(PYTESTARGS)
o/$(MODE)/third_party/python/Lib/test/test_tempfile.py.runs: \
o/$(MODE)/third_party/python/pythontester.com
@$(COMPILE) -ACHECK -tT$@ $(PYHARNESSARGS) $< -m test.test_tempfile $(PYTESTARGS)
# [jart] incompatible with landlock because it uses current directory for temp files
# o/$(MODE)/third_party/python/Lib/test/test_tempfile.py.runs: \
# o/$(MODE)/third_party/python/pythontester.com
# @$(COMPILE) -ACHECK -tT$@ $(PYHARNESSARGS) $< -m test.test_tempfile $(PYTESTARGS)
o/$(MODE)/third_party/python/Lib/test/test_normalization.py.runs: \
o/$(MODE)/third_party/python/pythontester.com
@$(COMPILE) -ACHECK -tT$@ $(PYHARNESSARGS) $< -m test.test_normalization $(PYTESTARGS)
o/$(MODE)/third_party/python/Lib/test/test_os.py.runs: \
o/$(MODE)/third_party/python/pythontester.com
@$(COMPILE) -ACHECK -tT$@ $(PYHARNESSARGS) $< -m test.test_os $(PYTESTARGS)
# [jart] unsupported with landlock right now because it needs /bin/sh
# o/$(MODE)/third_party/python/Lib/test/test_os.py.runs: \
# o/$(MODE)/third_party/python/pythontester.com
# @$(COMPILE) -ACHECK -tT$@ $(PYHARNESSARGS) $< -m test.test_os $(PYTESTARGS)
o/$(MODE)/third_party/python/Lib/test/test_logging.py.runs: \
o/$(MODE)/third_party/python/pythontester.com
@$(COMPILE) -ACHECK -tT$@ $(PYHARNESSARGS) $< -m test.test_logging $(PYTESTARGS)
# [jart] incompatible with landlock because it uses current directory for temp files
# o/$(MODE)/third_party/python/Lib/test/test_logging.py.runs: \
# o/$(MODE)/third_party/python/pythontester.com
# @$(COMPILE) -ACHECK -tT$@ $(PYHARNESSARGS) $< -m test.test_logging $(PYTESTARGS)
o/$(MODE)/third_party/python/Lib/test/test_io.py.runs: \
o/$(MODE)/third_party/python/pythontester.com
@ -2867,9 +2850,10 @@ o/$(MODE)/third_party/python/Lib/test/test_flufl.py.runs: \
o/$(MODE)/third_party/python/pythontester.com
@$(COMPILE) -ACHECK -tT$@ $(PYHARNESSARGS) $< -m test.test_flufl $(PYTESTARGS)
o/$(MODE)/third_party/python/Lib/test/test_keyword.py.runs: \
o/$(MODE)/third_party/python/pythontester.com
@$(COMPILE) -ACHECK -tT$@ $(PYHARNESSARGS) $< -m test.test_keyword $(PYTESTARGS)
# [jart] incompatible with landlock because it uses current directory for temp files
# o/$(MODE)/third_party/python/Lib/test/test_keyword.py.runs: \
# o/$(MODE)/third_party/python/pythontester.com
# @$(COMPILE) -ACHECK -tT$@ $(PYHARNESSARGS) $< -m test.test_keyword $(PYTESTARGS)
o/$(MODE)/third_party/python/Lib/test/test_keywordonlyarg.py.runs: \
o/$(MODE)/third_party/python/pythontester.com
@ -3139,17 +3123,20 @@ o/$(MODE)/third_party/python/Lib/test/test_getargs2.py.runs: \
o/$(MODE)/third_party/python/pythontester.com
@$(COMPILE) -ACHECK -tT$@ $(PYHARNESSARGS) $< -m test.test_getargs2 $(PYTESTARGS)
o/$(MODE)/third_party/python/Lib/test/test_getpass.py.runs: \
o/$(MODE)/third_party/python/pythontester.com
@$(COMPILE) -ACHECK -tT$@ $(PYHARNESSARGS) $< -m test.test_getpass $(PYTESTARGS)
# [jart] incompatible with landlock because it reads /etc/passwd
# o/$(MODE)/third_party/python/Lib/test/test_getpass.py.runs: \
# o/$(MODE)/third_party/python/pythontester.com
# @$(COMPILE) -ACHECK -tT$@ $(PYHARNESSARGS) $< -m test.test_getpass $(PYTESTARGS)
o/$(MODE)/third_party/python/Lib/test/test_gettext.py.runs: \
o/$(MODE)/third_party/python/pythontester.com
@$(COMPILE) -ACHECK -tT$@ $(PYHARNESSARGS) $< -m test.test_gettext $(PYTESTARGS)
# [jart] incompatible with landlock because it uses current directory for temp files
# o/$(MODE)/third_party/python/Lib/test/test_gettext.py.runs: \
# o/$(MODE)/third_party/python/pythontester.com
# @$(COMPILE) -ACHECK -tT$@ $(PYHARNESSARGS) $< -m test.test_gettext $(PYTESTARGS)
o/$(MODE)/third_party/python/Lib/test/test_grp.py.runs: \
o/$(MODE)/third_party/python/pythontester.com
@$(COMPILE) -ACHECK -tT$@ $(PYHARNESSARGS) $< -m test.test_grp $(PYTESTARGS)
# [jart] incompatible with landlock because it reads /etc/passwd
# o/$(MODE)/third_party/python/Lib/test/test_grp.py.runs: \
# o/$(MODE)/third_party/python/pythontester.com
# @$(COMPILE) -ACHECK -tT$@ $(PYHARNESSARGS) $< -m test.test_grp $(PYTESTARGS)
o/$(MODE)/third_party/python/Lib/test/test_imaplib.py.runs: \
o/$(MODE)/third_party/python/pythontester.com
@ -3191,9 +3178,10 @@ o/$(MODE)/third_party/python/Lib/test/test_macurl2path.py.runs: \
o/$(MODE)/third_party/python/pythontester.com
@$(COMPILE) -ACHECK -tT$@ $(PYHARNESSARGS) $< -m test.test_macurl2path $(PYTESTARGS)
o/$(MODE)/third_party/python/Lib/test/test_mailbox.py.runs: \
o/$(MODE)/third_party/python/pythontester.com
@$(COMPILE) -ACHECK -tT$@ $(PYHARNESSARGS) $< -m test.test_mailbox $(PYTESTARGS)
# [jart] unsupported with landlock right now because exdev renaming
# o/$(MODE)/third_party/python/Lib/test/test_mailbox.py.runs: \
# o/$(MODE)/third_party/python/pythontester.com
# @$(COMPILE) -ACHECK -tT$@ $(PYHARNESSARGS) $< -m test.test_mailbox $(PYTESTARGS)
o/$(MODE)/third_party/python/Lib/test/test_mailcap.py.runs: \
o/$(MODE)/third_party/python/pythontester.com
@ -3255,21 +3243,24 @@ o/$(MODE)/third_party/python/Lib/test/test_parser.py.runs: \
o/$(MODE)/third_party/python/pythontester.com
@$(COMPILE) -ACHECK -tT$@ $(PYHARNESSARGS) $< -m test.test_parser $(PYTESTARGS)
o/$(MODE)/third_party/python/Lib/test/test_pathlib.py.runs: \
o/$(MODE)/third_party/python/pythontester.com
@$(COMPILE) -ACHECK -tT$@ $(PYHARNESSARGS) $< -m test.test_pathlib $(PYTESTARGS)
# [jart] unsupported with landlock right now because exdev renaming
# o/$(MODE)/third_party/python/Lib/test/test_pathlib.py.runs: \
# o/$(MODE)/third_party/python/pythontester.com
# @$(COMPILE) -ACHECK -tT$@ $(PYHARNESSARGS) $< -m test.test_pathlib $(PYTESTARGS)
o/$(MODE)/third_party/python/Lib/test/test_pdb.py.runs: \
o/$(MODE)/third_party/python/pythontester.com
@$(COMPILE) -ACHECK -tT$@ $(PYHARNESSARGS) $< -m test.test_pdb $(PYTESTARGS)
# [jart] unsupported with landlock right now because it uses current directory for temp files
# o/$(MODE)/third_party/python/Lib/test/test_pdb.py.runs: \
# o/$(MODE)/third_party/python/pythontester.com
# @$(COMPILE) -ACHECK -tT$@ $(PYHARNESSARGS) $< -m test.test_pdb $(PYTESTARGS)
o/$(MODE)/third_party/python/Lib/test/test_peepholer.py.runs: \
o/$(MODE)/third_party/python/pythontester.com
@$(COMPILE) -ACHECK -tT$@ $(PYHARNESSARGS) $< -m test.test_peepholer $(PYTESTARGS)
o/$(MODE)/third_party/python/Lib/test/test_pipes.py.runs: \
o/$(MODE)/third_party/python/pythontester.com
@$(COMPILE) -ACHECK -tT$@ $(PYHARNESSARGS) $< -m test.test_pipes $(PYTESTARGS)
# [jart] unsupported with landlock right now because it needs /bin/sh
# o/$(MODE)/third_party/python/Lib/test/test_pipes.py.runs: \
# o/$(MODE)/third_party/python/pythontester.com
# @$(COMPILE) -ACHECK -tT$@ $(PYHARNESSARGS) $< -m test.test_pipes $(PYTESTARGS)
o/$(MODE)/third_party/python/Lib/test/test_pkgimport.py.runs: \
o/$(MODE)/third_party/python/pythontester.com
@ -3287,21 +3278,24 @@ o/$(MODE)/third_party/python/Lib/test/test_httplib.py.runs: \
o/$(MODE)/third_party/python/pythontester.com
@$(COMPILE) -ACHECK -tT$@ $(PYHARNESSARGS) $< -m test.test_httplib $(PYTESTARGS)
o/$(MODE)/third_party/python/Lib/test/test_popen.py.runs: \
o/$(MODE)/third_party/python/pythontester.com
@$(COMPILE) -ACHECK -tT$@ $(PYHARNESSARGS) $< -m test.test_popen $(PYTESTARGS)
# [jart] unsupported with landlock right now because it needs /bin/sh
# o/$(MODE)/third_party/python/Lib/test/test_popen.py.runs: \
# o/$(MODE)/third_party/python/pythontester.com
# @$(COMPILE) -ACHECK -tT$@ $(PYHARNESSARGS) $< -m test.test_popen $(PYTESTARGS)
o/$(MODE)/third_party/python/Lib/test/test_poplib.py.runs: \
o/$(MODE)/third_party/python/pythontester.com
@$(COMPILE) -ACHECK -tT$@ $(PYHARNESSARGS) $< -m test.test_poplib $(PYTESTARGS)
o/$(MODE)/third_party/python/Lib/test/test_posix.py.runs: \
o/$(MODE)/third_party/python/pythontester.com
@$(COMPILE) -ACHECK -tT$@ $(PYHARNESSARGS) $< -m test.test_posix $(PYTESTARGS)
# [jart] incompatible with landlock because it uses current directory for temp files
# o/$(MODE)/third_party/python/Lib/test/test_posix.py.runs: \
# o/$(MODE)/third_party/python/pythontester.com
# @$(COMPILE) -ACHECK -tT$@ $(PYHARNESSARGS) $< -m test.test_posix $(PYTESTARGS)
o/$(MODE)/third_party/python/Lib/test/test_posixpath.py.runs: \
o/$(MODE)/third_party/python/pythontester.com
@$(COMPILE) -ACHECK -tT$@ $(PYHARNESSARGS) $< -m test.test_posixpath $(PYTESTARGS)
# [jart] unsupported with landlock right now because exdev renaming
# o/$(MODE)/third_party/python/Lib/test/test_posixpath.py.runs: \
# o/$(MODE)/third_party/python/pythontester.com
# @$(COMPILE) -ACHECK -tT$@ $(PYHARNESSARGS) $< -m test.test_posixpath $(PYTESTARGS)
o/$(MODE)/third_party/python/Lib/test/test_profile.py.runs: \
o/$(MODE)/third_party/python/pythontester.com
@ -3319,9 +3313,10 @@ o/$(MODE)/third_party/python/Lib/test/test_pty.py.runs: \
o/$(MODE)/third_party/python/pythontester.com
@$(COMPILE) -ACHECK -tT$@ $(PYHARNESSARGS) $< -m test.test_pty $(PYTESTARGS)
o/$(MODE)/third_party/python/Lib/test/test_py_compile.py.runs: \
o/$(MODE)/third_party/python/pythontester.com
@$(COMPILE) -ACHECK -tT$@ $(PYHARNESSARGS) $< -m test.test_py_compile $(PYTESTARGS)
# [jart] incompatible with landlock because it uses current directory for temp files
# o/$(MODE)/third_party/python/Lib/test/test_py_compile.py.runs: \
# o/$(MODE)/third_party/python/pythontester.com
# @$(COMPILE) -ACHECK -tT$@ $(PYHARNESSARGS) $< -m test.test_py_compile $(PYTESTARGS)
o/$(MODE)/third_party/python/Lib/test/test_pyclbr.py.runs: \
o/$(MODE)/third_party/python/pythontester.com
@ -3363,17 +3358,19 @@ o/$(MODE)/third_party/python/Lib/test/test_shlex.py.runs: \
o/$(MODE)/third_party/python/pythontester.com
@$(COMPILE) -ACHECK -tT$@ $(PYHARNESSARGS) $< -m test.test_shlex $(PYTESTARGS)
o/$(MODE)/third_party/python/Lib/test/test_shutil.py.runs: \
o/$(MODE)/third_party/python/pythontester.com
@$(COMPILE) -ACHECK -tT$@ $(PYHARNESSARGS) $< -m test.test_shutil $(PYTESTARGS)
# [jart] incompatible with landlock because it uses current directory for temp files
# o/$(MODE)/third_party/python/Lib/test/test_shutil.py.runs: \
# o/$(MODE)/third_party/python/pythontester.com
# @$(COMPILE) -ACHECK -tT$@ $(PYHARNESSARGS) $< -m test.test_shutil $(PYTESTARGS)
o/$(MODE)/third_party/python/Lib/test/test_signal.py.runs: \
o/$(MODE)/third_party/python/pythontester.com
@$(COMPILE) -ACHECK -tT$@ $(PYHARNESSARGS) $< -m test.test_signal $(PYTESTARGS)
o/$(MODE)/third_party/python/Lib/test/test_site.py.runs: \
o/$(MODE)/third_party/python/pythontester.com
@$(COMPILE) -ACHECK -tT$@ $(PYHARNESSARGS) $< -m test.test_site $(PYTESTARGS)
# [jart] incompatible with landlock because it uses current directory for temp files
# o/$(MODE)/third_party/python/Lib/test/test_site.py.runs: \
# o/$(MODE)/third_party/python/pythontester.com
# @$(COMPILE) -ACHECK -tT$@ $(PYHARNESSARGS) $< -m test.test_site $(PYTESTARGS)
o/$(MODE)/third_party/python/Lib/test/test_smtpd.py.runs: \
o/$(MODE)/third_party/python/pythontester.com
@ -3475,13 +3472,15 @@ o/$(MODE)/third_party/python/Lib/test/test_timeout.py.runs: \
o/$(MODE)/third_party/python/pythontester.com
@$(COMPILE) -ACHECK -tT$@ $(PYHARNESSARGS) $< -m test.test_timeout $(PYTESTARGS)
o/$(MODE)/third_party/python/Lib/test/test_tokenize.py.runs: \
o/$(MODE)/third_party/python/pythontester.com
@$(COMPILE) -ACHECK -tT$@ $(PYHARNESSARGS) $< -m test.test_tokenize $(PYTESTARGS)
# TODO(jart): what's wrong with this since landlock?
# o/$(MODE)/third_party/python/Lib/test/test_tokenize.py.runs: \
# o/$(MODE)/third_party/python/pythontester.com
# @$(COMPILE) -ACHECK -tT$@ $(PYHARNESSARGS) $< -m test.test_tokenize $(PYTESTARGS)
o/$(MODE)/third_party/python/Lib/test/test_trace.py.runs: \
o/$(MODE)/third_party/python/pythontester.com
@$(COMPILE) -ACHECK -tT$@ $(PYHARNESSARGS) $< -m test.test_trace $(PYTESTARGS)
# [jart] incompatible with landlock because it uses current directory for temp files
# o/$(MODE)/third_party/python/Lib/test/test_trace.py.runs: \
# o/$(MODE)/third_party/python/pythontester.com
# @$(COMPILE) -ACHECK -tT$@ $(PYHARNESSARGS) $< -m test.test_trace $(PYTESTARGS)
o/$(MODE)/third_party/python/Lib/test/test_traceback.py.runs: \
o/$(MODE)/third_party/python/pythontester.com
@ -3551,9 +3550,10 @@ o/$(MODE)/third_party/python/Lib/test/test_zipapp.py.runs: \
o/$(MODE)/third_party/python/pythontester.com
@$(COMPILE) -ACHECK -tT$@ $(PYHARNESSARGS) $< -m test.test_zipapp $(PYTESTARGS)
o/$(MODE)/third_party/python/Lib/test/test_zipimport.py.runs: \
o/$(MODE)/third_party/python/pythontester.com
@$(COMPILE) -ACHECK -tT$@ $(PYHARNESSARGS) $< -m test.test_zipimport $(PYTESTARGS)
# [jart] incompatible with landlock because it uses current directory for temp files
# o/$(MODE)/third_party/python/Lib/test/test_zipimport.py.runs: \
# o/$(MODE)/third_party/python/pythontester.com
# @$(COMPILE) -ACHECK -tT$@ $(PYHARNESSARGS) $< -m test.test_zipimport $(PYTESTARGS)
o/$(MODE)/third_party/python/Lib/test/test_zipfile.py.runs: \
o/$(MODE)/third_party/python/pythontester.com
@ -3833,50 +3833,51 @@ o/$(MODE)/third_party/python/Lib/test/test_sunau.o: \
PYFLAGS += \
-Y.python/test/audiodata/pluck-alaw.aifc \
-Y.python/test/audiodata/pluck-pcm16.aiff \
-Y.python/test/audiodata/pluck-pcm16.au \
-Y.python/test/audiodata/pluck-pcm16.au \
-Y.python/test/audiodata/pluck-pcm16.wav \
-Y.python/test/audiodata/pluck-pcm24.aiff \
-Y.python/test/audiodata/pluck-pcm24.au \
-Y.python/test/audiodata/pluck-pcm24.au \
-Y.python/test/audiodata/pluck-pcm24.wav \
-Y.python/test/audiodata/pluck-pcm32.aiff \
-Y.python/test/audiodata/pluck-pcm32.au \
-Y.python/test/audiodata/pluck-pcm32.au \
-Y.python/test/audiodata/pluck-pcm32.wav \
-Y.python/test/audiodata/pluck-pcm8.aiff \
-Y.python/test/audiodata/pluck-pcm8.au \
-Y.python/test/audiodata/pluck-pcm8.wav \
-Y.python/test/audiodata/pluck-pcm8.au \
-Y.python/test/audiodata/pluck-pcm8.wav \
-Y.python/test/audiodata/pluck-ulaw.aifc \
-Y.python/test/audiodata/pluck-ulaw.au
o/$(MODE)/third_party/python/Lib/test/test_py_compile.o: \
o/$(MODE)/third_party/python/Lib/test/test_py_compile.o: \
PYFLAGS += \
-Y.python/test/bad_coding2.py
o/$(MODE)/third_party/python/Lib/test/test_tokenize.o: \
PYFLAGS += \
-Y.python/test/bad_coding.py
-Y.python/test/bad_coding.py \
-Y.python/test/bad_coding2.py
o/$(MODE)/third_party/python/Lib/test/test_doctest.o: \
PYFLAGS += \
-Y.python/test/test_doctest.txt \
-Y.python/test/test_doctest2.txt \
-Y.python/test/test_doctest3.txt \
-Y.python/test/test_doctest.txt \
-Y.python/test/test_doctest2.txt \
-Y.python/test/test_doctest3.txt \
-Y.python/test/test_doctest4.txt
o/$(MODE)/third_party/python/Lib/test/test_imghdr.o: \
PYFLAGS += \
-Y.python/test/imghdrdata/ \
-Y.python/test/imghdrdata/python.bmp \
-Y.python/test/imghdrdata/python.exr \
-Y.python/test/imghdrdata/python.gif \
-Y.python/test/imghdrdata/python.jpg \
-Y.python/test/imghdrdata/python.pbm \
-Y.python/test/imghdrdata/python.pgm \
-Y.python/test/imghdrdata/python.png \
-Y.python/test/imghdrdata/python.ppm \
-Y.python/test/imghdrdata/python.ras \
-Y.python/test/imghdrdata/python.sgi \
-Y.python/test/imghdrdata/python.tiff \
-Y.python/test/imghdrdata/python.webp \
-Y.python/test/imghdrdata/ \
-Y.python/test/imghdrdata/python.bmp \
-Y.python/test/imghdrdata/python.exr \
-Y.python/test/imghdrdata/python.gif \
-Y.python/test/imghdrdata/python.jpg \
-Y.python/test/imghdrdata/python.pbm \
-Y.python/test/imghdrdata/python.pgm \
-Y.python/test/imghdrdata/python.png \
-Y.python/test/imghdrdata/python.ppm \
-Y.python/test/imghdrdata/python.ras \
-Y.python/test/imghdrdata/python.sgi \
-Y.python/test/imghdrdata/python.tiff \
-Y.python/test/imghdrdata/python.webp \
-Y.python/test/imghdrdata/python.xbm
o/$(MODE)/third_party/python/Lib/test/test_sndhdr.o: \
@ -4269,7 +4270,9 @@ THIRD_PARTY_PYTHON_OBJS = \
THIRD_PARTY_PYTHON_SRCS = \
$(foreach x,$(THIRD_PARTY_PYTHON_ARTIFACTS),$($(x)_SRCS)) \
third_party/python/pyobj.c \
third_party/python/pycomp.c
third_party/python/pycomp.c \
third_party/python/repl.c \
third_party/python/pythontester.c
################################################################################
# PYTHON.COM

View file

@ -18,6 +18,7 @@
#include "third_party/unzip/unzip.h"
#include "third_party/unzip/unzpriv.h"
#include "third_party/zip/crc32.h"
#include "third_party/unzip/globals.h"
/* This header should be read AFTER zip.h resp. unzip.h
* (the latter with UNZIP_INTERNAL defined...).

View file

@ -34,6 +34,7 @@
#include "third_party/unzip/zip.h"
#include "third_party/unzip/crypt.h"
#include "third_party/unzip/ttyio.h"
#include "third_party/unzip/globals.h"
#if CRYPT

View file

@ -27,33 +27,7 @@
#define __crypt_h
#include "third_party/unzip/crc32.h"
#ifdef CRYPT
# undef CRYPT
#endif
/*
Logic of selecting "full crypt" code:
a) default behaviour:
- dummy crypt code when compiling UnZipSFX stub, to minimize size
- full crypt code when used to compile Zip, UnZip and fUnZip
b) USE_CRYPT defined:
- always full crypt code
c) NO_CRYPT defined:
- never full crypt code
NO_CRYPT takes precedence over USE_CRYPT
*/
#if defined(NO_CRYPT)
# define CRYPT 0 /* dummy version */
#else
#if defined(USE_CRYPT)
# define CRYPT 1 /* full version */
#else
#if !defined(SFX)
# define CRYPT 1 /* full version for zip and main unzip */
#else
# define CRYPT 0 /* dummy version for unzip sfx */
#endif
#endif /* ?USE_CRYPT */
#endif /* ?NO_CRYPT */
#define CRYPT 1
#if CRYPT
/* full version */
@ -146,9 +120,7 @@ void init_keys OF((__GPRO__ ZCONST char *passwd));
# endif
#endif /* ZIP */
#if (defined(UNZIP) && !defined(FUNZIP))
int decrypt OF((__GPRO__ ZCONST char *passwrd));
#endif
int decrypt OF((__GPRO__ ZCONST char *passwrd));
#ifdef FUNZIP
extern int encrypted;

View file

@ -117,6 +117,7 @@
#define __EXPLODE_C /* identifies this source module */
#define UNZIP_INTERNAL
#include "third_party/unzip/unzip.h" /* must supply slide[] (uch) array and NEXTBYTE macro */
#include "third_party/unzip/globals.h"
#ifndef WSIZE
# define WSIZE 0x8000 /* window size--must be a power of two, and */

View file

@ -36,6 +36,7 @@
#define __EXTRACT_C /* identifies this source module */
#define UNZIP_INTERNAL
#include "third_party/unzip/unzip.h"
#include "third_party/unzip/globals.h"
#include "third_party/unzip/crc32.h"
#include "libc/alg/alg.h"
#include "libc/log/log.h"
@ -1346,6 +1347,7 @@ static int extract_or_test_entrylist(__G__ numchunk,
}
#if CRYPT
int decrypt(const char *);
if (G.pInfo->encrypted &&
(error = decrypt(__G__ uO.pwdarg)) != PK_COOL) {
if (error == PK_WARN) {

View file

@ -81,6 +81,7 @@
# endif
#endif
#include "third_party/unzip/ebcdic.h" /* definition/initialization of ebcdic[] */
#include "third_party/unzip/globals.h"
/*

View file

@ -23,6 +23,7 @@
#define UNZIP_INTERNAL
#include "third_party/unzip/unzip.h"
#include "third_party/unzip/globals.h"
#ifndef FUNZIP
/* initialization of sigs is completed at runtime so unzip(sfx) executable

View file

@ -275,6 +275,7 @@
/* #define DEBUG */
#define INFMOD /* tell inflate.h to include code to be compiled */
#include "third_party/unzip/inflate.h"
#include "third_party/unzip/globals.h"
/* marker for "unused" huft code, and corresponding check macro */

View file

@ -23,6 +23,7 @@
#define UNZIP_INTERNAL
#include "third_party/unzip/unzip.h"
#include "third_party/unzip/globals.h"
#ifdef TIMESTAMP

View file

@ -33,6 +33,7 @@
#define UNZIP_INTERNAL
#include "third_party/unzip/unzip.h"
#include "third_party/unzip/globals.h"
#if defined(DYNALLOC_CRCTAB) || defined(UNICODE_SUPPORT)
#include "third_party/unzip/crc32.h"
#endif

View file

@ -32,6 +32,7 @@
#include "libc/calls/struct/termios.h"
#include "libc/calls/termios.h"
#include "third_party/unzip/crypt.h"
#include "third_party/unzip/globals.h"
#if (CRYPT || (defined(UNZIP) && !defined(FUNZIP)))
/* Non-echo console/keyboard input is needed for (en/de)cryption's password

View file

@ -28,6 +28,7 @@
#define __UBZ2ERR_C /* identifies this source module */
#define UNZIP_INTERNAL
#include "third_party/unzip/unzip.h"
#include "third_party/unzip/globals.h"
#ifdef USE_BZIP2

Some files were not shown because too many files have changed in this diff Show more