mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-19 09:00:31 +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
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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue