mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-14 23:09:16 +00:00
Reduce header complexity
- Remove most __ASSEMBLER__ __LINKER__ ifdefs - Rename libc/intrin/bits.h to libc/serialize.h - Block pthread cancelation in fchmodat() polyfill - Remove `clang-format off` statements in third_party
This commit is contained in:
parent
96f979dfc5
commit
fa20edc44d
3057 changed files with 410 additions and 4398 deletions
1
third_party/aarch64/acc_prof.internal.h
vendored
1
third_party/aarch64/acc_prof.internal.h
vendored
|
@ -1,4 +1,3 @@
|
|||
/* clang-format off */
|
||||
#if defined(__aarch64__) && !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
#ifndef _ACC_PROF_H
|
||||
#define _ACC_PROF_H 1
|
||||
|
|
1
third_party/aarch64/arm_acle.internal.h
vendored
1
third_party/aarch64/arm_acle.internal.h
vendored
|
@ -1,4 +1,3 @@
|
|||
/* clang-format off */
|
||||
#if defined(__aarch64__) && !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
#ifndef _GCC_ARM_ACLE_H
|
||||
#define _GCC_ARM_ACLE_H
|
||||
|
|
1
third_party/aarch64/arm_bf16.internal.h
vendored
1
third_party/aarch64/arm_bf16.internal.h
vendored
|
@ -1,4 +1,3 @@
|
|||
/* clang-format off */
|
||||
#if defined(__aarch64__) && !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
#ifndef _AARCH64_BF16_H_
|
||||
#define _AARCH64_BF16_H_
|
||||
|
|
1
third_party/aarch64/arm_fp16.internal.h
vendored
1
third_party/aarch64/arm_fp16.internal.h
vendored
|
@ -1,4 +1,3 @@
|
|||
/* clang-format off */
|
||||
#if defined(__aarch64__) && !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
#ifndef _AARCH64_FP16_H_
|
||||
#define _AARCH64_FP16_H_
|
||||
|
|
1
third_party/aarch64/arm_neon.internal.h
vendored
1
third_party/aarch64/arm_neon.internal.h
vendored
|
@ -1,4 +1,3 @@
|
|||
/* clang-format off */
|
||||
#if defined(__aarch64__) && !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
#ifndef _AARCH64_NEON_H_
|
||||
#define _AARCH64_NEON_H_
|
||||
|
|
1
third_party/aarch64/arm_sve.internal.h
vendored
1
third_party/aarch64/arm_sve.internal.h
vendored
|
@ -1,4 +1,3 @@
|
|||
/* clang-format off */
|
||||
#if defined(__aarch64__) && !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
#ifndef _ARM_SVE_H_
|
||||
#define _ARM_SVE_H_
|
||||
|
|
1
third_party/aarch64/openacc.internal.h
vendored
1
third_party/aarch64/openacc.internal.h
vendored
|
@ -1,4 +1,3 @@
|
|||
/* clang-format off */
|
||||
#if defined(__aarch64__) && !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
#ifndef _OPENACC_H
|
||||
#define _OPENACC_H 1
|
||||
|
|
1
third_party/aarch64/upgrade.sh
vendored
1
third_party/aarch64/upgrade.sh
vendored
|
@ -63,7 +63,6 @@ done
|
|||
|
||||
for f in third_party/aarch64/*.h; do
|
||||
(
|
||||
printf %s\\n '/* clang-format off */'
|
||||
printf %s\\n '#if defined(__aarch64__) && !(__ASSEMBLER__ + __LINKER__ + 0)'
|
||||
cat $f
|
||||
printf %s\\n '#endif'
|
||||
|
|
1
third_party/argon2/argon2.c
vendored
1
third_party/argon2/argon2.c
vendored
|
@ -26,7 +26,6 @@ asm(".ident\t\"\\n\\n\
|
|||
argon2 (CC0 or Apache2)\\n\
|
||||
Copyright 2016 Daniel Dinu, Dmitry Khovratovich\\n\
|
||||
Copyright 2016 Jean-Philippe Aumasson, Samuel Neves\"");
|
||||
/* clang-format off */
|
||||
|
||||
/**
|
||||
* Function that gives the string representation of an argon2_type.
|
||||
|
|
2
third_party/argon2/argon2.h
vendored
2
third_party/argon2/argon2.h
vendored
|
@ -5,7 +5,6 @@
|
|||
|
||||
#define ARGON2_NO_THREADS
|
||||
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
/*
|
||||
|
@ -210,5 +209,4 @@ size_t argon2_encodedlen(uint32_t, uint32_t, uint32_t, uint32_t, uint32_t,
|
|||
argon2_type);
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_THIRD_PARTY_ARGON2_ARGON2_H_ */
|
||||
|
|
1
third_party/argon2/blake2-impl.h
vendored
1
third_party/argon2/blake2-impl.h
vendored
|
@ -1,7 +1,6 @@
|
|||
#ifndef PORTABLE_BLAKE2_IMPL_H
|
||||
#define PORTABLE_BLAKE2_IMPL_H
|
||||
#include "libc/str/str.h"
|
||||
/* clang-format off */
|
||||
|
||||
static inline uint64_t load64(const void *src) {
|
||||
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
|
|
2
third_party/argon2/blake2.h
vendored
2
third_party/argon2/blake2.h
vendored
|
@ -1,7 +1,6 @@
|
|||
#ifndef COSMOPOLITAN_THIRD_PARTY_ARGON2_BLAKE2_H_
|
||||
#define COSMOPOLITAN_THIRD_PARTY_ARGON2_BLAKE2_H_
|
||||
#include "third_party/argon2/argon2.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
enum blake2b_constant {
|
||||
|
@ -48,5 +47,4 @@ int blake2b(void *, size_t, const void *, size_t, const void *, size_t);
|
|||
int blake2b_long(void *, size_t, const void *, size_t);
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_THIRD_PARTY_ARGON2_BLAKE2_H_ */
|
||||
|
|
3
third_party/argon2/blake2b.c
vendored
3
third_party/argon2/blake2b.c
vendored
|
@ -15,12 +15,11 @@
|
|||
│ - Apache 2.0 : https://www.apache.org/licenses/LICENSE-2.0 │
|
||||
│ │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/intrin/bits.h"
|
||||
#include "libc/serialize.h"
|
||||
#include "libc/limits.h"
|
||||
#include "third_party/argon2/blake2-impl.h"
|
||||
#include "third_party/argon2/blake2.h"
|
||||
#include "third_party/argon2/core.h"
|
||||
/* clang-format off */
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
argon2 (CC0 or Apache2)\\n\
|
||||
|
|
1
third_party/argon2/blamka-round-ref.h
vendored
1
third_party/argon2/blamka-round-ref.h
vendored
|
@ -2,7 +2,6 @@
|
|||
#define BLAKE_ROUND_MKA_H
|
||||
#include "third_party/argon2/blake2-impl.h"
|
||||
#include "third_party/argon2/blake2.h"
|
||||
/* clang-format off */
|
||||
|
||||
/* designed by the Lyra PHC team */
|
||||
static inline uint64_t fBlaMka(uint64_t x, uint64_t y) {
|
||||
|
|
1
third_party/argon2/core.c
vendored
1
third_party/argon2/core.c
vendored
|
@ -24,7 +24,6 @@ asm(".ident\t\"\\n\\n\
|
|||
argon2 (CC0 or Apache2)\\n\
|
||||
Copyright 2016 Daniel Dinu, Dmitry Khovratovich\\n\
|
||||
Copyright 2016 Jean-Philippe Aumasson, Samuel Neves\"");
|
||||
/* clang-format off */
|
||||
|
||||
int FLAG_clear_internal_memory = 1;
|
||||
|
||||
|
|
2
third_party/argon2/core.h
vendored
2
third_party/argon2/core.h
vendored
|
@ -1,7 +1,6 @@
|
|||
#ifndef COSMOPOLITAN_THIRD_PARTY_ARGON2_CORE_H_
|
||||
#define COSMOPOLITAN_THIRD_PARTY_ARGON2_CORE_H_
|
||||
#include "third_party/argon2/argon2.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
enum argon2_core_constants {
|
||||
|
@ -83,5 +82,4 @@ void fill_segment(const argon2_instance_t *, argon2_position_t);
|
|||
int fill_memory_blocks(argon2_instance_t *);
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_THIRD_PARTY_ARGON2_CORE_H_ */
|
||||
|
|
1
third_party/argon2/encoding.c
vendored
1
third_party/argon2/encoding.c
vendored
|
@ -25,7 +25,6 @@ asm(".ident\t\"\\n\\n\
|
|||
argon2 (CC0 or Apache2)\\n\
|
||||
Copyright 2016 Daniel Dinu, Dmitry Khovratovich\\n\
|
||||
Copyright 2016 Jean-Philippe Aumasson, Samuel Neves\"");
|
||||
/* clang-format off */
|
||||
|
||||
/*
|
||||
* Example code for a decoder and encoder of "hash strings", with Argon2
|
||||
|
|
2
third_party/argon2/encoding.h
vendored
2
third_party/argon2/encoding.h
vendored
|
@ -1,7 +1,6 @@
|
|||
#ifndef COSMOPOLITAN_THIRD_PARTY_ARGON2_ENCODING_H_
|
||||
#define COSMOPOLITAN_THIRD_PARTY_ARGON2_ENCODING_H_
|
||||
#include "third_party/argon2/argon2.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
#define ARGON2_MAX_DECODED_LANES UINT32_C(255)
|
||||
|
@ -14,5 +13,4 @@ size_t b64len(uint32_t);
|
|||
size_t numlen(uint32_t);
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_THIRD_PARTY_ARGON2_ENCODING_H_ */
|
||||
|
|
1
third_party/argon2/ref.c
vendored
1
third_party/argon2/ref.c
vendored
|
@ -26,7 +26,6 @@ asm(".ident\t\"\\n\\n\
|
|||
argon2 (CC0 or Apache2)\\n\
|
||||
Copyright 2016 Daniel Dinu, Dmitry Khovratovich\\n\
|
||||
Copyright 2016 Jean-Philippe Aumasson, Samuel Neves\"");
|
||||
/* clang-format off */
|
||||
|
||||
/*
|
||||
* Argon2 reference source code package - reference C implementations
|
||||
|
|
3
third_party/awk/awk.h
vendored
3
third_party/awk/awk.h
vendored
|
@ -4,9 +4,7 @@
|
|||
#include "libc/limits.h"
|
||||
#include "libc/literal.h"
|
||||
#include "libc/stdio/stdio.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
/* clang-format off */
|
||||
|
||||
typedef double Awkfloat;
|
||||
|
||||
|
@ -412,5 +410,4 @@ extern Cell *gsub(Node **, int);
|
|||
extern const char *flags2str(int flags);
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_THIRD_PARTY_AWK_AWK_H_ */
|
||||
|
|
1
third_party/awk/awkgram.tab.c
vendored
1
third_party/awk/awkgram.tab.c
vendored
|
@ -1,4 +1,3 @@
|
|||
// clang-format off
|
||||
#include "libc/mem/mem.h"
|
||||
#include "libc/str/str.h"
|
||||
#define YYBYACC 1
|
||||
|
|
2
third_party/awk/awkgram.tab.h
vendored
2
third_party/awk/awkgram.tab.h
vendored
|
@ -1,7 +1,6 @@
|
|||
#ifndef COSMOPOLITAN_THIRD_PARTY_AWK_AWKGRAM_TAB_H_
|
||||
#define COSMOPOLITAN_THIRD_PARTY_AWK_AWKGRAM_TAB_H_
|
||||
#include "third_party/awk/awk.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
#define FIRSTTOKEN 257
|
||||
|
@ -111,5 +110,4 @@ typedef union {
|
|||
extern YYSTYPE yylval;
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_THIRD_PARTY_AWK_AWKGRAM_TAB_H_ */
|
||||
|
|
1
third_party/awk/b.c
vendored
1
third_party/awk/b.c
vendored
|
@ -31,7 +31,6 @@
|
|||
#include "libc/str/str.h"
|
||||
#include "third_party/awk/awk.h"
|
||||
#include "third_party/awk/awkgram.tab.h"
|
||||
// clang-format off
|
||||
|
||||
/* lasciate ogne speranza, voi ch'intrate. */
|
||||
|
||||
|
|
2
third_party/awk/cmd.h
vendored
2
third_party/awk/cmd.h
vendored
|
@ -1,10 +1,8 @@
|
|||
#ifndef COSMOPOLITAN_THIRD_PARTY_AWK_CMD_H_
|
||||
#define COSMOPOLITAN_THIRD_PARTY_AWK_CMD_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
int _awk(int, char *[]);
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_THIRD_PARTY_AWK_CMD_H_ */
|
||||
|
|
1
third_party/awk/lex.c
vendored
1
third_party/awk/lex.c
vendored
|
@ -34,7 +34,6 @@
|
|||
#include "third_party/awk/awk.h"
|
||||
#include "third_party/awk/awkgram.tab.h"
|
||||
#include "third_party/gdtoa/gdtoa.h"
|
||||
// clang-format off
|
||||
|
||||
extern bool infunc;
|
||||
|
||||
|
|
1
third_party/awk/lib.c
vendored
1
third_party/awk/lib.c
vendored
|
@ -35,7 +35,6 @@
|
|||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/awk/awk.h"
|
||||
// clang-format off
|
||||
|
||||
char EMPTY[] = { '\0' };
|
||||
static FILE *infile = NULL;
|
||||
|
|
1
third_party/awk/main.c
vendored
1
third_party/awk/main.c
vendored
|
@ -38,7 +38,6 @@
|
|||
#include "libc/sysv/consts/sicode.h"
|
||||
#include "libc/sysv/consts/sig.h"
|
||||
#include "third_party/awk/awk.h"
|
||||
// clang-format off
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Copyright (C) Lucent Technologies 1997\\n\
|
||||
|
|
1
third_party/awk/maketab.c
vendored
1
third_party/awk/maketab.c
vendored
|
@ -31,7 +31,6 @@
|
|||
#include "libc/str/str.h"
|
||||
#include "third_party/awk/awk.h"
|
||||
#include "third_party/awk/awkgram.tab.h"
|
||||
// clang-format off
|
||||
|
||||
/*
|
||||
* this program makes the table to link function names
|
||||
|
|
1
third_party/awk/parse.c
vendored
1
third_party/awk/parse.c
vendored
|
@ -30,7 +30,6 @@
|
|||
#include "libc/str/str.h"
|
||||
#include "third_party/awk/awk.h"
|
||||
#include "third_party/awk/awkgram.tab.h"
|
||||
// clang-format off
|
||||
|
||||
Node *nodealloc(int n)
|
||||
{
|
||||
|
|
1
third_party/awk/proctab.c
vendored
1
third_party/awk/proctab.c
vendored
|
@ -27,7 +27,6 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "third_party/awk/awk.h"
|
||||
#include "third_party/awk/awkgram.tab.h"
|
||||
// clang-format off
|
||||
|
||||
static const char * const printname[95] = {
|
||||
"FIRSTTOKEN", /* 258 */
|
||||
|
|
1
third_party/awk/run.c
vendored
1
third_party/awk/run.c
vendored
|
@ -39,7 +39,6 @@
|
|||
#include "third_party/awk/awk.h"
|
||||
#include "third_party/awk/awkgram.tab.h"
|
||||
#include "third_party/libcxx/math.h"
|
||||
// clang-format off
|
||||
|
||||
static void stdinit(void);
|
||||
static void flush_all(void);
|
||||
|
|
1
third_party/awk/tran.c
vendored
1
third_party/awk/tran.c
vendored
|
@ -31,7 +31,6 @@
|
|||
#include "libc/mem/mem.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/awk/awk.h"
|
||||
// clang-format off
|
||||
|
||||
#define FULLTAB 2 /* rehash when table gets this x full */
|
||||
#define GROWTAB 4 /* grow table by this factor */
|
||||
|
|
1
third_party/bzip2/blocksort.c
vendored
1
third_party/bzip2/blocksort.c
vendored
|
@ -1,4 +1,3 @@
|
|||
/* clang-format off */
|
||||
|
||||
/*-------------------------------------------------------------*/
|
||||
/*--- Block sorting machinery ---*/
|
||||
|
|
1
third_party/bzip2/bzip2.c
vendored
1
third_party/bzip2/bzip2.c
vendored
|
@ -15,7 +15,6 @@
|
|||
#include "libc/time/struct/utimbuf.h"
|
||||
#include "libc/time/time.h"
|
||||
#include "third_party/bzip2/bzlib.h"
|
||||
/* clang-format off */
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
/*--- A block-sorting, lossless compressor bzip2.c ---*/
|
||||
|
|
1
third_party/bzip2/bzip2recover.c
vendored
1
third_party/bzip2/bzip2recover.c
vendored
|
@ -5,7 +5,6 @@
|
|||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/stdio/stdio.h"
|
||||
#include "libc/str/str.h"
|
||||
/* clang-format off */
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
/*--- Block recoverer program for bzip2 ---*/
|
||||
|
|
1
third_party/bzip2/bzlib.c
vendored
1
third_party/bzip2/bzlib.c
vendored
|
@ -1,4 +1,3 @@
|
|||
/* clang-format off */
|
||||
|
||||
/*-------------------------------------------------------------*/
|
||||
/*--- Library top-level functions. ---*/
|
||||
|
|
2
third_party/bzip2/bzlib.h
vendored
2
third_party/bzip2/bzlib.h
vendored
|
@ -23,7 +23,6 @@
|
|||
|
||||
#define BZ_MAX_UNUSED 5000
|
||||
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
typedef struct {
|
||||
|
@ -87,5 +86,4 @@ void BZ2_bzclose(BZFILE *);
|
|||
const char *BZ2_bzerror(BZFILE *, int *);
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* _BZLIB_H */
|
||||
|
|
1
third_party/bzip2/bzlib_private.inc
vendored
1
third_party/bzip2/bzlib_private.inc
vendored
|
@ -2,7 +2,6 @@
|
|||
|
||||
#define BZ_NO_STDIO
|
||||
|
||||
/* clang-format off */
|
||||
|
||||
/*-------------------------------------------------------------*/
|
||||
/*--- Private header file for the library. ---*/
|
||||
|
|
1
third_party/bzip2/compress.c
vendored
1
third_party/bzip2/compress.c
vendored
|
@ -1,4 +1,3 @@
|
|||
/* clang-format off */
|
||||
|
||||
/*-------------------------------------------------------------*/
|
||||
/*--- Compression machinery (not incl block sorting) ---*/
|
||||
|
|
1
third_party/bzip2/decompress.c
vendored
1
third_party/bzip2/decompress.c
vendored
|
@ -1,4 +1,3 @@
|
|||
/* clang-format off */
|
||||
|
||||
/*-------------------------------------------------------------*/
|
||||
/*--- Decompression machinery ---*/
|
||||
|
|
1
third_party/bzip2/huffman.c
vendored
1
third_party/bzip2/huffman.c
vendored
|
@ -1,4 +1,3 @@
|
|||
/* clang-format off */
|
||||
|
||||
/*-------------------------------------------------------------*/
|
||||
/*--- Huffman coding low-level stuff ---*/
|
||||
|
|
1
third_party/bzip2/randtable.c
vendored
1
third_party/bzip2/randtable.c
vendored
|
@ -1,4 +1,3 @@
|
|||
/* clang-format off */
|
||||
|
||||
/*-------------------------------------------------------------*/
|
||||
/*--- Table for randomising repetitive blocks ---*/
|
||||
|
|
1
third_party/bzip2/spewG.c
vendored
1
third_party/bzip2/spewG.c
vendored
|
@ -1,6 +1,5 @@
|
|||
#include "libc/stdio/rand.h"
|
||||
#include "libc/stdio/stdio.h"
|
||||
/* clang-format off */
|
||||
|
||||
/* spew out a thoroughly gigantic file designed so that bzip2
|
||||
can compress it reasonably rapidly. This is to help test
|
||||
|
|
2
third_party/chibicc/as.c
vendored
2
third_party/chibicc/as.c
vendored
|
@ -20,7 +20,6 @@
|
|||
#include "libc/calls/struct/stat.h"
|
||||
#include "libc/elf/def.h"
|
||||
#include "libc/fmt/conv.h"
|
||||
#include "libc/intrin/bits.h"
|
||||
#include "libc/intrin/bsr.h"
|
||||
#include "libc/intrin/popcnt.h"
|
||||
#include "libc/log/check.h"
|
||||
|
@ -38,6 +37,7 @@
|
|||
#include "libc/x/xasprintf.h"
|
||||
#include "third_party/chibicc/file.h"
|
||||
#include "third_party/gdtoa/gdtoa.h"
|
||||
#include "libc/serialize.h"
|
||||
#include "tool/build/lib/elfwriter.h"
|
||||
|
||||
#define OSZ 0x66
|
||||
|
|
2
third_party/chibicc/chibicc.h
vendored
2
third_party/chibicc/chibicc.h
vendored
|
@ -24,7 +24,6 @@
|
|||
#include "libc/x/x.h"
|
||||
#include "third_party/gdtoa/gdtoa.h"
|
||||
#include "tool/build/lib/javadown.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wswitch"
|
||||
|
@ -664,5 +663,4 @@ void Assembler(int, char **);
|
|||
void output_bindings_python(const char *, Obj *, Token *);
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_THIRD_PARTY_CHIBICC_CHIBICC_H_ */
|
||||
|
|
1
third_party/chibicc/dox2.c
vendored
1
third_party/chibicc/dox2.c
vendored
|
@ -16,7 +16,6 @@
|
|||
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
||||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/intrin/bits.h"
|
||||
#include "libc/intrin/bsr.h"
|
||||
#include "libc/mem/alg.h"
|
||||
#include "libc/sysv/consts/map.h"
|
||||
|
|
2
third_party/chibicc/file.h
vendored
2
third_party/chibicc/file.h
vendored
|
@ -1,6 +1,5 @@
|
|||
#ifndef COSMOPOLITAN_THIRD_PARTY_CHIBICC_FILE_H_
|
||||
#define COSMOPOLITAN_THIRD_PARTY_CHIBICC_FILE_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
char *skip_bom(char *);
|
||||
|
@ -9,5 +8,4 @@ void remove_backslash_newline(char *);
|
|||
void canonicalize_newline(char *);
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_THIRD_PARTY_CHIBICC_FILE_H_ */
|
||||
|
|
2
third_party/chibicc/kw.h
vendored
2
third_party/chibicc/kw.h
vendored
|
@ -121,11 +121,9 @@
|
|||
#define KW___ATOMIC_COMPARE_EXCHANGE_N 137
|
||||
#define KW___ATOMIC_EXCHANGE_N 138
|
||||
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
unsigned char GetKw(const char *, size_t);
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_THIRD_PARTY_CHIBICC_KW_H_ */
|
||||
|
|
1
third_party/chibicc/kw.inc
vendored
1
third_party/chibicc/kw.inc
vendored
|
@ -1,7 +1,6 @@
|
|||
/* ANSI-C code produced by gperf version 3.1 */
|
||||
/* Command-line: gperf kw.gperf */
|
||||
/* Computed positions: -k'1,4,11,14,17,$' */
|
||||
// clang-format off
|
||||
|
||||
#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
|
||||
&& ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
|
||||
|
|
2
third_party/chibicc/pybind.c
vendored
2
third_party/chibicc/pybind.c
vendored
|
@ -18,7 +18,7 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/fmt/conv.h"
|
||||
#include "libc/fmt/libgen.h"
|
||||
#include "libc/intrin/bits.h"
|
||||
#include "libc/serialize.h"
|
||||
#include "libc/log/libfatal.internal.h"
|
||||
#include "libc/mem/gc.h"
|
||||
#include "libc/mem/mem.h"
|
||||
|
|
5
third_party/chibicc/test/macro_test.c
vendored
5
third_party/chibicc/test/macro_test.c
vendored
|
@ -1,6 +1,5 @@
|
|||
#include "third_party/chibicc/test/include1.h"
|
||||
#include "third_party/chibicc/test/test.h"
|
||||
/* clang-format off */
|
||||
char *main_filename1 = __FILE__;
|
||||
int main_line1 = __LINE__;
|
||||
#define LINE() __LINE__
|
||||
|
@ -341,8 +340,8 @@ int main() {
|
|||
ASSERT(1, __STDC__);
|
||||
|
||||
ASSERT(0, strcmp(main_filename1, "third_party/chibicc/test/macro_test.c"));
|
||||
ASSERT(5, main_line1);
|
||||
ASSERT(7, main_line2);
|
||||
ASSERT(4, main_line1);
|
||||
ASSERT(6, main_line2);
|
||||
ASSERT(0, strcmp(include1_filename, "third_party/chibicc/test/include1.h"));
|
||||
ASSERT(4, include1_line);
|
||||
|
||||
|
|
1
third_party/compiler_rt/absvdi2.c
vendored
1
third_party/compiler_rt/absvdi2.c
vendored
|
@ -1,4 +1,3 @@
|
|||
/* clang-format off */
|
||||
/*===-- absvdi2.c - Implement __absvdi2 -----------------------------------===
|
||||
*
|
||||
* The LLVM Compiler Infrastructure
|
||||
|
|
1
third_party/compiler_rt/absvsi2.c
vendored
1
third_party/compiler_rt/absvsi2.c
vendored
|
@ -1,4 +1,3 @@
|
|||
/* clang-format off */
|
||||
/* ===-- absvsi2.c - Implement __absvsi2 -----------------------------------===
|
||||
*
|
||||
* The LLVM Compiler Infrastructure
|
||||
|
|
1
third_party/compiler_rt/absvti2.c
vendored
1
third_party/compiler_rt/absvti2.c
vendored
|
@ -1,4 +1,3 @@
|
|||
/* clang-format off */
|
||||
/* ===-- absvti2.c - Implement __absvdi2 -----------------------------------===
|
||||
*
|
||||
* The LLVM Compiler Infrastructure
|
||||
|
|
1
third_party/compiler_rt/adddf3.c
vendored
1
third_party/compiler_rt/adddf3.c
vendored
|
@ -1,4 +1,3 @@
|
|||
/* clang-format off */
|
||||
//===-- lib/adddf3.c - Double-precision addition ------------------*- C -*-===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
|
|
1
third_party/compiler_rt/addsf3.c
vendored
1
third_party/compiler_rt/addsf3.c
vendored
|
@ -1,4 +1,3 @@
|
|||
/* clang-format off */
|
||||
//===-- lib/addsf3.c - Single-precision addition ------------------*- C -*-===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
|
|
1
third_party/compiler_rt/addtf3.c
vendored
1
third_party/compiler_rt/addtf3.c
vendored
|
@ -1,4 +1,3 @@
|
|||
/* clang-format off */
|
||||
//===-- lib/addtf3.c - Quad-precision addition --------------------*- C -*-===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
|
|
1
third_party/compiler_rt/ashldi3.c
vendored
1
third_party/compiler_rt/ashldi3.c
vendored
|
@ -1,4 +1,3 @@
|
|||
/* clang-format off */
|
||||
/* ====-- ashldi3.c - Implement __ashldi3 -----------------------------------===
|
||||
*
|
||||
* The LLVM Compiler Infrastructure
|
||||
|
|
1
third_party/compiler_rt/ashrdi3.c
vendored
1
third_party/compiler_rt/ashrdi3.c
vendored
|
@ -1,4 +1,3 @@
|
|||
/* clang-format off */
|
||||
/*===-- ashrdi3.c - Implement __ashrdi3 -----------------------------------===
|
||||
*
|
||||
* The LLVM Compiler Infrastructure
|
||||
|
|
1
third_party/compiler_rt/ashrti3.c
vendored
1
third_party/compiler_rt/ashrti3.c
vendored
|
@ -1,4 +1,3 @@
|
|||
/* clang-format off */
|
||||
/* ===-- ashrti3.c - Implement __ashrti3 -----------------------------------===
|
||||
*
|
||||
* The LLVM Compiler Infrastructure
|
||||
|
|
1
third_party/compiler_rt/assembly.h
vendored
1
third_party/compiler_rt/assembly.h
vendored
|
@ -1,4 +1,3 @@
|
|||
/* clang-format off */
|
||||
/* ===-- assembly.h - compiler-rt assembler support macros -----------------===
|
||||
*
|
||||
* The LLVM Compiler Infrastructure
|
||||
|
|
1
third_party/compiler_rt/bswapdi2.c
vendored
1
third_party/compiler_rt/bswapdi2.c
vendored
|
@ -1,4 +1,3 @@
|
|||
/* clang-format off */
|
||||
/* ===-- bswapdi2.c - Implement __bswapdi2 ---------------------------------===
|
||||
*
|
||||
* The LLVM Compiler Infrastructure
|
||||
|
|
1
third_party/compiler_rt/bswapsi2.c
vendored
1
third_party/compiler_rt/bswapsi2.c
vendored
|
@ -1,4 +1,3 @@
|
|||
/* clang-format off */
|
||||
/* ===-- bswapsi2.c - Implement __bswapsi2 ---------------------------------===
|
||||
*
|
||||
* The LLVM Compiler Infrastructure
|
||||
|
|
1
third_party/compiler_rt/clzdi2.c
vendored
1
third_party/compiler_rt/clzdi2.c
vendored
|
@ -1,4 +1,3 @@
|
|||
/* clang-format off */
|
||||
/* ===-- clzdi2.c - Implement __clzdi2 -------------------------------------===
|
||||
*
|
||||
* The LLVM Compiler Infrastructure
|
||||
|
|
1
third_party/compiler_rt/clzsi2.c
vendored
1
third_party/compiler_rt/clzsi2.c
vendored
|
@ -1,4 +1,3 @@
|
|||
/* clang-format off */
|
||||
/* ===-- clzsi2.c - Implement __clzsi2 -------------------------------------===
|
||||
*
|
||||
* The LLVM Compiler Infrastructure
|
||||
|
|
1
third_party/compiler_rt/clzti2.c
vendored
1
third_party/compiler_rt/clzti2.c
vendored
|
@ -1,4 +1,3 @@
|
|||
/* clang-format off */
|
||||
/* ===-- clzti2.c - Implement __clzti2 -------------------------------------===
|
||||
*
|
||||
* The LLVM Compiler Infrastructure
|
||||
|
|
1
third_party/compiler_rt/cmpdi2.c
vendored
1
third_party/compiler_rt/cmpdi2.c
vendored
|
@ -1,4 +1,3 @@
|
|||
/* clang-format off */
|
||||
/* ===-- cmpdi2.c - Implement __cmpdi2 -------------------------------------===
|
||||
*
|
||||
* The LLVM Compiler Infrastructure
|
||||
|
|
1
third_party/compiler_rt/cmpti2.c
vendored
1
third_party/compiler_rt/cmpti2.c
vendored
|
@ -1,4 +1,3 @@
|
|||
/* clang-format off */
|
||||
/* ===-- cmpti2.c - Implement __cmpti2 -------------------------------------===
|
||||
*
|
||||
* The LLVM Compiler Infrastructure
|
||||
|
|
1
third_party/compiler_rt/comparedf2.c
vendored
1
third_party/compiler_rt/comparedf2.c
vendored
|
@ -1,4 +1,3 @@
|
|||
/* clang-format off */
|
||||
//===-- lib/comparedf2.c - Double-precision comparisons -----------*- C -*-===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
|
|
1
third_party/compiler_rt/comparesf2.c
vendored
1
third_party/compiler_rt/comparesf2.c
vendored
|
@ -1,4 +1,3 @@
|
|||
/* clang-format off */
|
||||
//===-- lib/comparesf2.c - Single-precision comparisons -----------*- C -*-===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
|
|
1
third_party/compiler_rt/ctzdi2.c
vendored
1
third_party/compiler_rt/ctzdi2.c
vendored
|
@ -1,4 +1,3 @@
|
|||
/* clang-format off */
|
||||
/* ===-- ctzdi2.c - Implement __ctzdi2 -------------------------------------===
|
||||
*
|
||||
* The LLVM Compiler Infrastructure
|
||||
|
|
1
third_party/compiler_rt/ctzsi2.c
vendored
1
third_party/compiler_rt/ctzsi2.c
vendored
|
@ -1,4 +1,3 @@
|
|||
/* clang-format off */
|
||||
/* ===-- ctzsi2.c - Implement __ctzsi2 -------------------------------------===
|
||||
*
|
||||
* The LLVM Compiler Infrastructure
|
||||
|
|
1
third_party/compiler_rt/ctzti2.c
vendored
1
third_party/compiler_rt/ctzti2.c
vendored
|
@ -1,4 +1,3 @@
|
|||
/* clang-format off */
|
||||
/* ===-- ctzti2.c - Implement __ctzti2 -------------------------------------===
|
||||
*
|
||||
* The LLVM Compiler Infrastructure
|
||||
|
|
1
third_party/compiler_rt/divdc3.c
vendored
1
third_party/compiler_rt/divdc3.c
vendored
|
@ -1,4 +1,3 @@
|
|||
/* clang-format off */
|
||||
/* ===-- divdc3.c - Implement __divdc3 -------------------------------------===
|
||||
*
|
||||
* The LLVM Compiler Infrastructure
|
||||
|
|
1
third_party/compiler_rt/divdf3.c
vendored
1
third_party/compiler_rt/divdf3.c
vendored
|
@ -1,4 +1,3 @@
|
|||
/* clang-format off */
|
||||
//===-- lib/divdf3.c - Double-precision division ------------------*- C -*-===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
|
|
1
third_party/compiler_rt/divdi3.c
vendored
1
third_party/compiler_rt/divdi3.c
vendored
|
@ -1,4 +1,3 @@
|
|||
/* clang-format off */
|
||||
/* ===-- divdi3.c - Implement __divdi3 -------------------------------------===
|
||||
*
|
||||
* The LLVM Compiler Infrastructure
|
||||
|
|
1
third_party/compiler_rt/divmoddi4.c
vendored
1
third_party/compiler_rt/divmoddi4.c
vendored
|
@ -1,4 +1,3 @@
|
|||
/* clang-format off */
|
||||
/*===-- divmoddi4.c - Implement __divmoddi4 --------------------------------===
|
||||
*
|
||||
* The LLVM Compiler Infrastructure
|
||||
|
|
1
third_party/compiler_rt/divmodsi4.c
vendored
1
third_party/compiler_rt/divmodsi4.c
vendored
|
@ -1,4 +1,3 @@
|
|||
/* clang-format off */
|
||||
/*===-- divmodsi4.c - Implement __divmodsi4 --------------------------------===
|
||||
*
|
||||
* The LLVM Compiler Infrastructure
|
||||
|
|
1
third_party/compiler_rt/divsc3.c
vendored
1
third_party/compiler_rt/divsc3.c
vendored
|
@ -1,4 +1,3 @@
|
|||
/* clang-format off */
|
||||
/*===-- divsc3.c - Implement __divsc3 -------------------------------------===
|
||||
*
|
||||
* The LLVM Compiler Infrastructure
|
||||
|
|
1
third_party/compiler_rt/divsf3.c
vendored
1
third_party/compiler_rt/divsf3.c
vendored
|
@ -1,4 +1,3 @@
|
|||
/* clang-format off */
|
||||
//===-- lib/divsf3.c - Single-precision division ------------------*- C -*-===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
|
|
1
third_party/compiler_rt/divsi3.c
vendored
1
third_party/compiler_rt/divsi3.c
vendored
|
@ -1,4 +1,3 @@
|
|||
/* clang-format off */
|
||||
/* ===-- divsi3.c - Implement __divsi3 -------------------------------------===
|
||||
*
|
||||
* The LLVM Compiler Infrastructure
|
||||
|
|
1
third_party/compiler_rt/divtc3.c
vendored
1
third_party/compiler_rt/divtc3.c
vendored
|
@ -1,4 +1,3 @@
|
|||
/* clang-format off */
|
||||
/*===-- divtc3.c - Implement __divtc3 -------------------------------------===
|
||||
*
|
||||
* The LLVM Compiler Infrastructure
|
||||
|
|
1
third_party/compiler_rt/divtf3.c
vendored
1
third_party/compiler_rt/divtf3.c
vendored
|
@ -1,4 +1,3 @@
|
|||
/* clang-format off */
|
||||
//===-- lib/divtf3.c - Quad-precision division --------------------*- C -*-===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
|
|
1
third_party/compiler_rt/divxc3.c
vendored
1
third_party/compiler_rt/divxc3.c
vendored
|
@ -1,4 +1,3 @@
|
|||
/* clang-format off */
|
||||
/* ===-- divxc3.c - Implement __divxc3 -------------------------------------===
|
||||
*
|
||||
* The LLVM Compiler Infrastructure
|
||||
|
|
1
third_party/compiler_rt/extenddftf2.c
vendored
1
third_party/compiler_rt/extenddftf2.c
vendored
|
@ -1,4 +1,3 @@
|
|||
/* clang-format off */
|
||||
//===-- lib/extenddftf2.c - double -> quad conversion -------------*- C -*-===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
|
|
1
third_party/compiler_rt/extendhfsf2.c
vendored
1
third_party/compiler_rt/extendhfsf2.c
vendored
|
@ -1,4 +1,3 @@
|
|||
/* clang-format off */
|
||||
//===-- lib/extendhfsf2.c - half -> single conversion -------------*- C -*-===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
|
|
1
third_party/compiler_rt/extendsfdf2.c
vendored
1
third_party/compiler_rt/extendsfdf2.c
vendored
|
@ -1,4 +1,3 @@
|
|||
/* clang-format off */
|
||||
//===-- lib/extendsfdf2.c - single -> double conversion -----------*- C -*-===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
|
|
1
third_party/compiler_rt/extendsftf2.c
vendored
1
third_party/compiler_rt/extendsftf2.c
vendored
|
@ -1,4 +1,3 @@
|
|||
/* clang-format off */
|
||||
//===-- lib/extendsftf2.c - single -> quad conversion -------------*- C -*-===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
|
|
1
third_party/compiler_rt/ffsdi2.c
vendored
1
third_party/compiler_rt/ffsdi2.c
vendored
|
@ -1,4 +1,3 @@
|
|||
/* clang-format off */
|
||||
/* ===-- ffsdi2.c - Implement __ffsdi2 -------------------------------------===
|
||||
*
|
||||
* The LLVM Compiler Infrastructure
|
||||
|
|
1
third_party/compiler_rt/ffssi2.c
vendored
1
third_party/compiler_rt/ffssi2.c
vendored
|
@ -1,4 +1,3 @@
|
|||
/* clang-format off */
|
||||
/* ===-- ffssi2.c - Implement __ffssi2 -------------------------------------===
|
||||
*
|
||||
* The LLVM Compiler Infrastructure
|
||||
|
|
1
third_party/compiler_rt/ffsti2.c
vendored
1
third_party/compiler_rt/ffsti2.c
vendored
|
@ -1,4 +1,3 @@
|
|||
/* clang-format off */
|
||||
/* ===-- ffsti2.c - Implement __ffsti2 -------------------------------------===
|
||||
*
|
||||
* The LLVM Compiler Infrastructure
|
||||
|
|
1
third_party/compiler_rt/fixdfdi.c
vendored
1
third_party/compiler_rt/fixdfdi.c
vendored
|
@ -1,4 +1,3 @@
|
|||
/* clang-format off */
|
||||
/* ===-- fixdfdi.c - Implement __fixdfdi -----------------------------------===
|
||||
*
|
||||
* The LLVM Compiler Infrastructure
|
||||
|
|
1
third_party/compiler_rt/fixdfsi.c
vendored
1
third_party/compiler_rt/fixdfsi.c
vendored
|
@ -1,4 +1,3 @@
|
|||
/* clang-format off */
|
||||
/* ===-- fixdfsi.c - Implement __fixdfsi -----------------------------------===
|
||||
*
|
||||
* The LLVM Compiler Infrastructure
|
||||
|
|
1
third_party/compiler_rt/fixdfti.c
vendored
1
third_party/compiler_rt/fixdfti.c
vendored
|
@ -1,4 +1,3 @@
|
|||
/* clang-format off */
|
||||
/* ===-- fixdfti.c - Implement __fixdfti -----------------------------------===
|
||||
*
|
||||
* The LLVM Compiler Infrastructure
|
||||
|
|
1
third_party/compiler_rt/fixsfdi.c
vendored
1
third_party/compiler_rt/fixsfdi.c
vendored
|
@ -1,4 +1,3 @@
|
|||
/* clang-format off */
|
||||
/* ===-- fixsfdi.c - Implement __fixsfdi -----------------------------------===
|
||||
*
|
||||
* The LLVM Compiler Infrastructure
|
||||
|
|
1
third_party/compiler_rt/fixsfsi.c
vendored
1
third_party/compiler_rt/fixsfsi.c
vendored
|
@ -1,4 +1,3 @@
|
|||
/* clang-format off */
|
||||
/* ===-- fixsfsi.c - Implement __fixsfsi -----------------------------------===
|
||||
*
|
||||
* The LLVM Compiler Infrastructure
|
||||
|
|
1
third_party/compiler_rt/fixsfti.c
vendored
1
third_party/compiler_rt/fixsfti.c
vendored
|
@ -1,4 +1,3 @@
|
|||
/* clang-format off */
|
||||
/* ===-- fixsfti.c - Implement __fixsfti -----------------------------------===
|
||||
*
|
||||
* The LLVM Compiler Infrastructure
|
||||
|
|
1
third_party/compiler_rt/fixtfdi.c
vendored
1
third_party/compiler_rt/fixtfdi.c
vendored
|
@ -1,4 +1,3 @@
|
|||
/* clang-format off */
|
||||
/* ===-- fixtfdi.c - Implement __fixtfdi -----------------------------------===
|
||||
*
|
||||
* The LLVM Compiler Infrastructure
|
||||
|
|
1
third_party/compiler_rt/fixtfsi.c
vendored
1
third_party/compiler_rt/fixtfsi.c
vendored
|
@ -1,4 +1,3 @@
|
|||
/* clang-format off */
|
||||
/* ===-- fixtfsi.c - Implement __fixtfsi -----------------------------------===
|
||||
*
|
||||
* The LLVM Compiler Infrastructure
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue