mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-27 23:08: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,7 +2,6 @@
|
|||
#define COSMOPOLITAN_LIBC_TESTLIB_ASPECT_INTERNAL_H_
|
||||
#include "libc/intrin/dll.h"
|
||||
#include "libc/testlib/testlib.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
#define TESTASPECT_CONTAINER(e) DLL_CONTAINER(struct TestAspect, elem, e)
|
||||
|
@ -17,5 +16,4 @@ struct TestAspect {
|
|||
extern struct Dll *testlib_aspects;
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_TESTLIB_ASPECT_INTERNAL_H_ */
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_BENCH_H_
|
||||
#define COSMOPOLITAN_LIBC_BENCH_H_
|
||||
#include "libc/nexgen32e/bench.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
/**
|
||||
|
@ -45,5 +44,4 @@ COSMOPOLITAN_C_START_
|
|||
#endif /* BENCHLOOP */
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_BENCH_H_ */
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_TESTLIB_BLOCKTRONICS_H_
|
||||
#define COSMOPOLITAN_LIBC_TESTLIB_BLOCKTRONICS_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
extern size_t kBlocktronicsSize;
|
||||
|
@ -8,5 +7,4 @@ extern char kBlocktronics[];
|
|||
extern uint8_t kBlocktronicsZip[];
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_TESTLIB_BLOCKTRONICS_H_ */
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
#include "libc/nexgen32e/x86feature.h"
|
||||
#include "libc/testlib/bench.h"
|
||||
#include "libc/testlib/testlib.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
#ifndef EZBENCH_COUNT
|
||||
|
@ -196,5 +195,4 @@ void __testlib_ezbenchreport_n(const char *, char, size_t, double);
|
|||
#endif
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_TESTLIB_EZBENCH_H_ */
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_TESTLIB_FASTRANDOMSTRING_H_
|
||||
#define COSMOPOLITAN_LIBC_TESTLIB_FASTRANDOMSTRING_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
static inline const char *FastRandomString(void) {
|
||||
static unsigned long t;
|
||||
|
@ -12,5 +11,4 @@ static inline const char *FastRandomString(void) {
|
|||
return u.b;
|
||||
}
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_TESTLIB_FASTRANDOMSTRING_H_ */
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/intrin/atomic.h"
|
||||
#include "libc/intrin/bits.h"
|
||||
#include "libc/serialize.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "libc/str/utf16.h"
|
||||
#include "libc/testlib/testlib.h"
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_TESTLIB_HYPERION_H_
|
||||
#define COSMOPOLITAN_LIBC_TESTLIB_HYPERION_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
extern size_t kHyperionSize;
|
||||
|
@ -12,5 +11,4 @@ extern char kMoby[];
|
|||
extern uint8_t kMobyZip[];
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_TESTLIB_HYPERION_H_ */
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_TESTLIB_MOBY_H_
|
||||
#define COSMOPOLITAN_LIBC_TESTLIB_MOBY_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
extern size_t kMobySize;
|
||||
|
@ -8,5 +7,4 @@ extern char kMoby[];
|
|||
extern uint8_t kMobyZip[];
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_TESTLIB_MOBY_H_ */
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
#include "libc/macros.internal.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/testlib/testlib.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
/**
|
||||
|
@ -79,5 +78,4 @@ void testlib_waitforexit(const char *, int, const char *, int, int);
|
|||
void testlib_waitforterm(const char *, int, const char *, int, int);
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_TESTLIB_SUBPROCESS_H_ */
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_TESTLIB_H_
|
||||
#define COSMOPOLITAN_LIBC_TESTLIB_H_
|
||||
#include "libc/stdbool.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
/*───────────────────────────────────────────────────────────────────────────│─╗
|
||||
│ cosmopolitan § testing library ─╬─│┼
|
||||
|
@ -661,5 +660,4 @@ forceinline void assertLongDoubleEquals(FILIFU_ARGS long double want,
|
|||
}
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_TESTLIB_H_ */
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_TESTLIB_VIEWABLES_H_
|
||||
#define COSMOPOLITAN_LIBC_TESTLIB_VIEWABLES_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
extern size_t kViewablesSize;
|
||||
|
@ -8,5 +7,4 @@ extern char kViewables[];
|
|||
extern uint8_t kViewablesZip[];
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_TESTLIB_VIEWABLES_H_ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue