Add more missing C / C++ headers

This commit is contained in:
Justine Tunney 2022-09-04 04:53:52 -07:00
parent b9dc74b672
commit 8dd4ec68d0
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
152 changed files with 30711 additions and 6267 deletions

View file

@ -26,7 +26,6 @@
#define _Alignof(x) alignof(x)
#endif /* C++11 */
#else /* __cplusplus */
#define alignof(x) _Alignof(x)
#if __STDC_VERSION__ + 0 < 201112
#if __GNUC__ + _MSC_VER + 0 && !defined(__STRICT_ANSI__)
#define _Alignof(x) __alignof(x)

View file

@ -898,7 +898,7 @@ static size_t __asan_user_size(size_t n) {
static size_t __asan_heap_size(size_t n) {
if (n < 0x7fffffff0000) {
n = ROUNDUP(n, alignof(struct AsanExtra));
n = ROUNDUP(n, _Alignof(struct AsanExtra));
return __asan_roundup2pow(n + sizeof(struct AsanExtra));
} else {
return -1;
@ -990,7 +990,7 @@ static struct AsanExtra *__asan_get_extra(const void *p, size_t *c) {
(LIKELY(f == (int)((x - 1) >> 16)) || !kisdangerous((void *)(x - 1))) &&
(LIKELY(f == (int)((x = x - sizeof(*e)) >> 16)) ||
__asan_is_mapped(x >> 16)) &&
!(x & (alignof(struct AsanExtra) - 1))) {
!(x & (_Alignof(struct AsanExtra) - 1))) {
*c = n;
return (struct AsanExtra *)x;
} else {

18
libc/iso646.internal.h Normal file
View file

@ -0,0 +1,18 @@
#ifndef COSMOPOLITAN_LIBC_ISO646_H_
#define COSMOPOLITAN_LIBC_ISO646_H_
#ifndef __cplusplus
#define and &&
#define and_eq &=
#define bitand &
#define bitor |
#define compl ~
#define not !
#define not_eq !=
#define or ||
#define or_eq |=
#define xor ^
#define xor_eq ^=
#endif /* __cplusplus */
#endif /* COSMOPOLITAN_LIBC_ISO646_H_ */

4
libc/isystem/algorithm Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_ALGORITHM_
#define COSMOPOLITAN_LIBC_ISYSTEM_ALGORITHM_
#include "third_party/libcxx/algorithm"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_ALGORITHM_ */

4
libc/isystem/any Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_ANY_
#define COSMOPOLITAN_LIBC_ISYSTEM_ANY_
#include "third_party/libcxx/any"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_ANY_ */

4
libc/isystem/array Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_ARRAY_
#define COSMOPOLITAN_LIBC_ISYSTEM_ARRAY_
#include "third_party/libcxx/array"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_ARRAY_ */

4
libc/isystem/atomic Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_ATOMIC_
#define COSMOPOLITAN_LIBC_ISYSTEM_ATOMIC_
#include "third_party/libcxx/atomic"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_ATOMIC_ */

4
libc/isystem/bit Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_BIT_
#define COSMOPOLITAN_LIBC_ISYSTEM_BIT_
#include "third_party/libcxx/bit"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_BIT_ */

4
libc/isystem/bitset Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_BITSET_
#define COSMOPOLITAN_LIBC_ISYSTEM_BITSET_
#include "third_party/libcxx/bitset"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_BITSET_ */

4
libc/isystem/cassert Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_CASSERT_
#define COSMOPOLITAN_LIBC_ISYSTEM_CASSERT_
#include "third_party/libcxx/cassert"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_CASSERT_ */

4
libc/isystem/ccomplex Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_CCOMPLEX_
#define COSMOPOLITAN_LIBC_ISYSTEM_CCOMPLEX_
#include "third_party/libcxx/ccomplex"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_CCOMPLEX_ */

4
libc/isystem/cctype Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_CCTYPE_
#define COSMOPOLITAN_LIBC_ISYSTEM_CCTYPE_
#include "third_party/libcxx/cctype"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_CCTYPE_ */

4
libc/isystem/cerrno Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_CERRNO_
#define COSMOPOLITAN_LIBC_ISYSTEM_CERRNO_
#include "third_party/libcxx/cerrno"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_CERRNO_ */

4
libc/isystem/cfenv Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_CFENV_
#define COSMOPOLITAN_LIBC_ISYSTEM_CFENV_
#include "third_party/libcxx/cfenv"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_CFENV_ */

4
libc/isystem/cfloat Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_CFLOAT_
#define COSMOPOLITAN_LIBC_ISYSTEM_CFLOAT_
#include "third_party/libcxx/cfloat"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_CFLOAT_ */

4
libc/isystem/charconv Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_CHARCONV_
#define COSMOPOLITAN_LIBC_ISYSTEM_CHARCONV_
#include "third_party/libcxx/charconv"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_CHARCONV_ */

4
libc/isystem/chrono Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_CHRONO_
#define COSMOPOLITAN_LIBC_ISYSTEM_CHRONO_
#include "third_party/libcxx/chrono"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_CHRONO_ */

4
libc/isystem/cinttypes Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_CINTTYPES_
#define COSMOPOLITAN_LIBC_ISYSTEM_CINTTYPES_
#include "third_party/libcxx/cinttypes"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_CINTTYPES_ */

4
libc/isystem/ciso646 Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_CISO646_
#define COSMOPOLITAN_LIBC_ISYSTEM_CISO646_
#include "third_party/libcxx/ciso646"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_CISO646_ */

4
libc/isystem/climits Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_CLIMITS_
#define COSMOPOLITAN_LIBC_ISYSTEM_CLIMITS_
#include "third_party/libcxx/climits"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_CLIMITS_ */

4
libc/isystem/clocale Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_CLOCALE_
#define COSMOPOLITAN_LIBC_ISYSTEM_CLOCALE_
#include "third_party/libcxx/clocale"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_CLOCALE_ */

4
libc/isystem/cmath Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_CMATH_
#define COSMOPOLITAN_LIBC_ISYSTEM_CMATH_
#include "third_party/libcxx/cmath"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_CMATH_ */

4
libc/isystem/codecvt Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_CODECVT_
#define COSMOPOLITAN_LIBC_ISYSTEM_CODECVT_
#include "third_party/libcxx/codecvt"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_CODECVT_ */

4
libc/isystem/compare Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_COMPARE_
#define COSMOPOLITAN_LIBC_ISYSTEM_COMPARE_
#include "third_party/libcxx/compare"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_COMPARE_ */

4
libc/isystem/complex Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_COMPLEX_
#define COSMOPOLITAN_LIBC_ISYSTEM_COMPLEX_
#include "third_party/libcxx/complex"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_COMPLEX_ */

View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_CONDITION_VARIABLE_
#define COSMOPOLITAN_LIBC_ISYSTEM_CONDITION_VARIABLE_
#include "third_party/libcxx/condition_variable"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_CONDITION_VARIABLE_ */

4
libc/isystem/csetjmp Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_CSETJMP_
#define COSMOPOLITAN_LIBC_ISYSTEM_CSETJMP_
#include "third_party/libcxx/csetjmp"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_CSETJMP_ */

4
libc/isystem/csignal Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_CSIGNAL_
#define COSMOPOLITAN_LIBC_ISYSTEM_CSIGNAL_
#include "third_party/libcxx/csignal"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_CSIGNAL_ */

4
libc/isystem/cstdarg Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_CSTDARG_
#define COSMOPOLITAN_LIBC_ISYSTEM_CSTDARG_
#include "third_party/libcxx/cstdarg"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_CSTDARG_ */

4
libc/isystem/cstdbool Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_CSTDBOOL_
#define COSMOPOLITAN_LIBC_ISYSTEM_CSTDBOOL_
#include "third_party/libcxx/cstdbool"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_CSTDBOOL_ */

4
libc/isystem/cstddef Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_CSTDDEF_
#define COSMOPOLITAN_LIBC_ISYSTEM_CSTDDEF_
#include "third_party/libcxx/cstddef"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_CSTDDEF_ */

4
libc/isystem/cstdint Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_CSTDINT_
#define COSMOPOLITAN_LIBC_ISYSTEM_CSTDINT_
#include "third_party/libcxx/cstdint"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_CSTDINT_ */

4
libc/isystem/cstdio Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_CSTDIO_
#define COSMOPOLITAN_LIBC_ISYSTEM_CSTDIO_
#include "third_party/libcxx/cstdio"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_CSTDIO_ */

4
libc/isystem/cstdlib Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_CSTDLIB_
#define COSMOPOLITAN_LIBC_ISYSTEM_CSTDLIB_
#include "third_party/libcxx/cstdlib"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_CSTDLIB_ */

4
libc/isystem/cstring Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_CSTRING_
#define COSMOPOLITAN_LIBC_ISYSTEM_CSTRING_
#include "third_party/libcxx/cstring"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_CSTRING_ */

4
libc/isystem/ctgmath Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_CTGMATH_
#define COSMOPOLITAN_LIBC_ISYSTEM_CTGMATH_
#include "third_party/libcxx/ctgmath"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_CTGMATH_ */

4
libc/isystem/ctime Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_CTIME_
#define COSMOPOLITAN_LIBC_ISYSTEM_CTIME_
#include "third_party/libcxx/ctime"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_CTIME_ */

4
libc/isystem/cwchar Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_CWCHAR_
#define COSMOPOLITAN_LIBC_ISYSTEM_CWCHAR_
#include "third_party/libcxx/cwchar"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_CWCHAR_ */

4
libc/isystem/cwctype Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_CWCTYPE_
#define COSMOPOLITAN_LIBC_ISYSTEM_CWCTYPE_
#include "third_party/libcxx/cwctype"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_CWCTYPE_ */

4
libc/isystem/deque Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_DEQUE_
#define COSMOPOLITAN_LIBC_ISYSTEM_DEQUE_
#include "third_party/libcxx/deque"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_DEQUE_ */

4
libc/isystem/exception Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_EXCEPTION_
#define COSMOPOLITAN_LIBC_ISYSTEM_EXCEPTION_
#include "third_party/libcxx/exception"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_EXCEPTION_ */

4
libc/isystem/execution Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_EXECUTION_
#define COSMOPOLITAN_LIBC_ISYSTEM_EXECUTION_
#include "third_party/libcxx/execution"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_EXECUTION_ */

4
libc/isystem/fenv.h Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_FENV_H_
#define COSMOPOLITAN_LIBC_ISYSTEM_FENV_H_
#include "libc/runtime/fenv.h"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_FENV_H_ */

4
libc/isystem/filesystem Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_FILESYSTEM_
#define COSMOPOLITAN_LIBC_ISYSTEM_FILESYSTEM_
#include "third_party/libcxx/filesystem"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_FILESYSTEM_ */

View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_FORWARD_LIST_
#define COSMOPOLITAN_LIBC_ISYSTEM_FORWARD_LIST_
#include "third_party/libcxx/forward_list"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_FORWARD_LIST_ */

4
libc/isystem/fstream Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_FSTREAM_
#define COSMOPOLITAN_LIBC_ISYSTEM_FSTREAM_
#include "third_party/libcxx/fstream"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_FSTREAM_ */

4
libc/isystem/functional Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_FUNCTIONAL_
#define COSMOPOLITAN_LIBC_ISYSTEM_FUNCTIONAL_
#include "third_party/libcxx/functional"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_FUNCTIONAL_ */

View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_INITIALIZER_LIST_
#define COSMOPOLITAN_LIBC_ISYSTEM_INITIALIZER_LIST_
#include "third_party/libcxx/initializer_list"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_INITIALIZER_LIST_ */

View file

@ -1,4 +1,5 @@
#ifndef LIBC_ISYSTEM_INTTYPES_H_
#define LIBC_ISYSTEM_INTTYPES_H_
#include "libc/fmt/conv.h"
#include "libc/inttypes.h"
#endif /* LIBC_ISYSTEM_INTTYPES_H_ */

4
libc/isystem/iomanip Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_IOMANIP_
#define COSMOPOLITAN_LIBC_ISYSTEM_IOMANIP_
#include "third_party/libcxx/iomanip"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_IOMANIP_ */

4
libc/isystem/ios Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_IOS_
#define COSMOPOLITAN_LIBC_ISYSTEM_IOS_
#include "third_party/libcxx/ios"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_IOS_ */

4
libc/isystem/iosfwd Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_IOSFWD_
#define COSMOPOLITAN_LIBC_ISYSTEM_IOSFWD_
#include "third_party/libcxx/iosfwd"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_IOSFWD_ */

4
libc/isystem/iostream Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_IOSTREAM_
#define COSMOPOLITAN_LIBC_ISYSTEM_IOSTREAM_
#include "third_party/libcxx/iostream"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_IOSTREAM_ */

View file

@ -1,16 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_ISO646_H_
#define COSMOPOLITAN_LIBC_ISYSTEM_ISO646_H_
#define and &&
#define and_eq &=
#define bitand &
#define bitor |
#define compl ~
#define not !
#define not_eq !=
#define or ||
#define or_eq |=
#define xor ^
#define xor_eq ^=
#include "libc/iso646.internal.h"
#endif

4
libc/isystem/istream Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_ISTREAM_
#define COSMOPOLITAN_LIBC_ISYSTEM_ISTREAM_
#include "third_party/libcxx/istream"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_ISTREAM_ */

4
libc/isystem/iterator Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_ITERATOR_
#define COSMOPOLITAN_LIBC_ISYSTEM_ITERATOR_
#include "third_party/libcxx/iterator"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_ITERATOR_ */

4
libc/isystem/limits Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_LIMITS_
#define COSMOPOLITAN_LIBC_ISYSTEM_LIMITS_
#include "third_party/libcxx/limits"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_LIMITS_ */

4
libc/isystem/list Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_LIST_
#define COSMOPOLITAN_LIBC_ISYSTEM_LIST_
#include "third_party/libcxx/list"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_LIST_ */

4
libc/isystem/locale Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_LOCALE_
#define COSMOPOLITAN_LIBC_ISYSTEM_LOCALE_
#include "third_party/libcxx/locale"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_LOCALE_ */

4
libc/isystem/map Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_MAP_
#define COSMOPOLITAN_LIBC_ISYSTEM_MAP_
#include "third_party/libcxx/map"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_MAP_ */

4
libc/isystem/memory Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_MEMORY_
#define COSMOPOLITAN_LIBC_ISYSTEM_MEMORY_
#include "third_party/libcxx/memory"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_MEMORY_ */

4
libc/isystem/mutex Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_MUTEX_
#define COSMOPOLITAN_LIBC_ISYSTEM_MUTEX_
#include "third_party/libcxx/mutex"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_MUTEX_ */

4
libc/isystem/new Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_NEW_
#define COSMOPOLITAN_LIBC_ISYSTEM_NEW_
#include "third_party/libcxx/new"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_NEW_ */

4
libc/isystem/numeric Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_NUMERIC_
#define COSMOPOLITAN_LIBC_ISYSTEM_NUMERIC_
#include "third_party/libcxx/numeric"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_NUMERIC_ */

4
libc/isystem/optional Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_OPTIONAL_
#define COSMOPOLITAN_LIBC_ISYSTEM_OPTIONAL_
#include "third_party/libcxx/optional"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_OPTIONAL_ */

4
libc/isystem/ostream Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_OSTREAM_
#define COSMOPOLITAN_LIBC_ISYSTEM_OSTREAM_
#include "third_party/libcxx/ostream"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_OSTREAM_ */

4
libc/isystem/queue Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_QUEUE_
#define COSMOPOLITAN_LIBC_ISYSTEM_QUEUE_
#include "third_party/libcxx/queue"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_QUEUE_ */

4
libc/isystem/random Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_RANDOM_
#define COSMOPOLITAN_LIBC_ISYSTEM_RANDOM_
#include "third_party/libcxx/random"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_RANDOM_ */

4
libc/isystem/ratio Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_RATIO_
#define COSMOPOLITAN_LIBC_ISYSTEM_RATIO_
#include "third_party/libcxx/ratio"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_RATIO_ */

4
libc/isystem/regex Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_REGEX_
#define COSMOPOLITAN_LIBC_ISYSTEM_REGEX_
#include "third_party/libcxx/regex"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_REGEX_ */

View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_SCOPED_ALLOCATOR_
#define COSMOPOLITAN_LIBC_ISYSTEM_SCOPED_ALLOCATOR_
#include "third_party/libcxx/scoped_allocator"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_SCOPED_ALLOCATOR_ */

4
libc/isystem/set Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_SET_
#define COSMOPOLITAN_LIBC_ISYSTEM_SET_
#include "third_party/libcxx/set"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_SET_ */

4
libc/isystem/sstream Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_SSTREAM_
#define COSMOPOLITAN_LIBC_ISYSTEM_SSTREAM_
#include "third_party/libcxx/sstream"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_SSTREAM_ */

4
libc/isystem/stack Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_STACK_
#define COSMOPOLITAN_LIBC_ISYSTEM_STACK_
#include "third_party/libcxx/stack"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_STACK_ */

4
libc/isystem/stdalign.h Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_STDALIGN_H_
#define COSMOPOLITAN_LIBC_ISYSTEM_STDALIGN_H_
#include "libc/stdalign.internal.h"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_STDALIGN_H_ */

4
libc/isystem/stdexcept Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_STDEXCEPT_
#define COSMOPOLITAN_LIBC_ISYSTEM_STDEXCEPT_
#include "third_party/libcxx/stdexcept"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_STDEXCEPT_ */

4
libc/isystem/streambuf Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_STREAMBUF_
#define COSMOPOLITAN_LIBC_ISYSTEM_STREAMBUF_
#include "third_party/libcxx/streambuf"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_STREAMBUF_ */

4
libc/isystem/string Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_STRING_
#define COSMOPOLITAN_LIBC_ISYSTEM_STRING_
#include "third_party/libcxx/string"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_STRING_ */

4
libc/isystem/string_view Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_STRING_VIEW_
#define COSMOPOLITAN_LIBC_ISYSTEM_STRING_VIEW_
#include "third_party/libcxx/string_view"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_STRING_VIEW_ */

4
libc/isystem/strstream Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_STRSTREAM_
#define COSMOPOLITAN_LIBC_ISYSTEM_STRSTREAM_
#include "third_party/libcxx/strstream"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_STRSTREAM_ */

View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_SYSTEM_ERROR_
#define COSMOPOLITAN_LIBC_ISYSTEM_SYSTEM_ERROR_
#include "third_party/libcxx/system_error"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_SYSTEM_ERROR_ */

4
libc/isystem/thread Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_THREAD_
#define COSMOPOLITAN_LIBC_ISYSTEM_THREAD_
#include "third_party/libcxx/thread"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_THREAD_ */

4
libc/isystem/tuple Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_TUPLE_
#define COSMOPOLITAN_LIBC_ISYSTEM_TUPLE_
#include "third_party/libcxx/tuple"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_TUPLE_ */

4
libc/isystem/type_traits Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_TYPE_TRAITS_
#define COSMOPOLITAN_LIBC_ISYSTEM_TYPE_TRAITS_
#include "third_party/libcxx/type_traits"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_TYPE_TRAITS_ */

4
libc/isystem/typeindex Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_TYPEINDEX_
#define COSMOPOLITAN_LIBC_ISYSTEM_TYPEINDEX_
#include "third_party/libcxx/typeindex"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_TYPEINDEX_ */

4
libc/isystem/typeinfo Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_TYPEINFO_
#define COSMOPOLITAN_LIBC_ISYSTEM_TYPEINFO_
#include "third_party/libcxx/typeinfo"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_TYPEINFO_ */

4
libc/isystem/uchar.h Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_UCHAR_H_
#define COSMOPOLITAN_LIBC_ISYSTEM_UCHAR_H_
#include "libc/str/str.h"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_UCHAR_H_ */

View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_UNORDERED_MAP_
#define COSMOPOLITAN_LIBC_ISYSTEM_UNORDERED_MAP_
#include "third_party/libcxx/unordered_map"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_UNORDERED_MAP_ */

View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_UNORDERED_SET_
#define COSMOPOLITAN_LIBC_ISYSTEM_UNORDERED_SET_
#include "third_party/libcxx/unordered_set"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_UNORDERED_SET_ */

4
libc/isystem/utility Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_UTILITY_
#define COSMOPOLITAN_LIBC_ISYSTEM_UTILITY_
#include "third_party/libcxx/utility"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_UTILITY_ */

4
libc/isystem/valarray Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_VALARRAY_
#define COSMOPOLITAN_LIBC_ISYSTEM_VALARRAY_
#include "third_party/libcxx/valarray"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_VALARRAY_ */

4
libc/isystem/variant Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_VARIANT_
#define COSMOPOLITAN_LIBC_ISYSTEM_VARIANT_
#include "third_party/libcxx/variant"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_VARIANT_ */

4
libc/isystem/vector Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_VECTOR_
#define COSMOPOLITAN_LIBC_ISYSTEM_VECTOR_
#include "third_party/libcxx/vector"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_VECTOR_ */

4
libc/isystem/version Normal file
View file

@ -0,0 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_VERSION_
#define COSMOPOLITAN_LIBC_ISYSTEM_VERSION_
#include "third_party/libcxx/version"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_VERSION_ */

View file

@ -13,8 +13,6 @@
#define TRUE 1
#define FALSE 0
#define alignas(x) _Alignas(x)
#define IS2POW(X) (!((X) & ((X)-1)))
#define ROUNDUP(X, K) (((X) + (K)-1) & -(K))
#define ROUNDDOWN(X, K) ((X) & -(K))

View file

@ -10,7 +10,6 @@ extern const uint64_t kSha512[80];
extern const unsigned char kTensIndex[64];
void imapxlatab(void *);
void insertionsort(int32_t *, size_t);
void CheckStackIsAligned(void);
COSMOPOLITAN_C_END_

View file

@ -33,6 +33,7 @@
#include "libc/nt/thunk/msabi.h"
#include "libc/runtime/internal.h"
#include "libc/runtime/runtime.h"
#include "libc/stdalign.internal.h"
#include "libc/str/str.h"
#include "libc/sysv/consts/clone.h"
#include "libc/sysv/consts/futex.h"

View file

@ -31,6 +31,7 @@
#include "libc/nt/thread.h"
#include "libc/runtime/internal.h"
#include "libc/runtime/runtime.h"
#include "libc/stdalign.internal.h"
#include "libc/str/str.h"
#include "libc/sysv/consts/nrlinux.h"
#include "libc/thread/thread.h"

12
libc/stdalign.internal.h Normal file
View file

@ -0,0 +1,12 @@
#ifndef COSMOPOLITAN_LIBC_STDALIGN_INTERNAL_H_
#define COSMOPOLITAN_LIBC_STDALIGN_INTERNAL_H_
#ifndef __cplusplus
#define alignas _Alignas
#define alignof _Alignof
#endif /* __cplusplus */
#define __alignas_is_defined 1
#define __alignof_is_defined 1
#endif /* COSMOPOLITAN_LIBC_STDALIGN_INTERNAL_H_ */

View file

@ -1,38 +0,0 @@
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-│
vi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :vi
Copyright 2020 Justine Alexandra Roberts Tunney
Permission to use, copy, modify, and/or distribute this software for
any purpose with or without fee is hereby granted, provided that the
above copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
*/
#include "libc/log/log.h"
#include "libc/nexgen32e/nexgen32e.h"
/**
* Sorts array of signed 32-bit integers.
* @see djbsort()
*/
textreal void insertionsort(int32_t *a, size_t n) {
int t;
unsigned i, j;
for (i = 1; i < n; ++i) {
j = i;
t = a[i];
while (j > 0 && t < a[j - 1]) {
a[j] = a[j - 1];
--j;
}
a[j] = t;
}
}

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