mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-14 06:59:10 +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/gdtoa/dmisc.c
vendored
1
third_party/gdtoa/dmisc.c
vendored
|
@ -30,7 +30,6 @@
|
|||
│ │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "third_party/gdtoa/gdtoa.internal.h"
|
||||
/* clang-format off */
|
||||
|
||||
void
|
||||
freedtoa(char *s)
|
||||
|
|
1
third_party/gdtoa/dtoa.c
vendored
1
third_party/gdtoa/dtoa.c
vendored
|
@ -31,7 +31,6 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/runtime/fenv.h"
|
||||
#include "third_party/gdtoa/gdtoa.internal.h"
|
||||
/* clang-format off */
|
||||
|
||||
/* dtoa for IEEE arithmetic (dmg): convert double to ASCII string.
|
||||
*
|
||||
|
|
1
third_party/gdtoa/g_Qfmt_p.c
vendored
1
third_party/gdtoa/g_Qfmt_p.c
vendored
|
@ -32,7 +32,6 @@
|
|||
#include "libc/str/str.h"
|
||||
#include "third_party/gdtoa/gdtoa.h"
|
||||
#include "third_party/gdtoa/gdtoa.internal.h"
|
||||
// clang-format off
|
||||
|
||||
/**
|
||||
* Converts quadruple-precision floating-point number to string.
|
||||
|
|
1
third_party/gdtoa/g__fmt.c
vendored
1
third_party/gdtoa/g__fmt.c
vendored
|
@ -30,7 +30,6 @@
|
|||
│ │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "third_party/gdtoa/gdtoa.internal.h"
|
||||
/* clang-format off */
|
||||
|
||||
#define dlen 0
|
||||
#define HEXDIG "0123456789abcdef"
|
||||
|
|
1
third_party/gdtoa/g_ddfmt.c
vendored
1
third_party/gdtoa/g_ddfmt.c
vendored
|
@ -31,7 +31,6 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/runtime/fenv.h"
|
||||
#include "third_party/gdtoa/gdtoa.internal.h"
|
||||
/* clang-format off */
|
||||
|
||||
char *
|
||||
g_ddfmt(char *buf, double *dd0, int ndig, size_t bufsize)
|
||||
|
|
1
third_party/gdtoa/g_ddfmt_p.c
vendored
1
third_party/gdtoa/g_ddfmt_p.c
vendored
|
@ -32,7 +32,6 @@
|
|||
#include "libc/runtime/fenv.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/gdtoa/gdtoa.internal.h"
|
||||
/* clang-format off */
|
||||
|
||||
extern ULong __gdtoa_NanDflt_d[2];
|
||||
|
||||
|
|
1
third_party/gdtoa/g_dfmt.c
vendored
1
third_party/gdtoa/g_dfmt.c
vendored
|
@ -30,7 +30,6 @@
|
|||
│ │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "third_party/gdtoa/gdtoa.internal.h"
|
||||
/* clang-format off */
|
||||
|
||||
char*
|
||||
g_dfmt(char *buf, double *d, int ndig, size_t bufsize)
|
||||
|
|
1
third_party/gdtoa/g_dfmt_p.c
vendored
1
third_party/gdtoa/g_dfmt_p.c
vendored
|
@ -30,7 +30,6 @@
|
|||
│ │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "third_party/gdtoa/gdtoa.internal.h"
|
||||
/* clang-format off */
|
||||
|
||||
extern ULong __gdtoa_NanDflt_d[2];
|
||||
|
||||
|
|
1
third_party/gdtoa/g_ffmt.c
vendored
1
third_party/gdtoa/g_ffmt.c
vendored
|
@ -30,7 +30,6 @@
|
|||
│ │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "third_party/gdtoa/gdtoa.internal.h"
|
||||
/* clang-format off */
|
||||
|
||||
char*
|
||||
g_ffmt(char *buf, float *f, int ndig, size_t bufsize)
|
||||
|
|
1
third_party/gdtoa/g_ffmt_p.c
vendored
1
third_party/gdtoa/g_ffmt_p.c
vendored
|
@ -30,7 +30,6 @@
|
|||
│ │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "third_party/gdtoa/gdtoa.internal.h"
|
||||
/* clang-format off */
|
||||
|
||||
extern ULong __gdtoa_NanDflt_f[1];
|
||||
|
||||
|
|
1
third_party/gdtoa/g_xfmt.c
vendored
1
third_party/gdtoa/g_xfmt.c
vendored
|
@ -30,7 +30,6 @@
|
|||
│ │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "third_party/gdtoa/gdtoa.internal.h"
|
||||
/* clang-format off */
|
||||
|
||||
char*
|
||||
g_xfmt(char *buf, void *V, int ndig, size_t bufsize)
|
||||
|
|
1
third_party/gdtoa/g_xfmt_p.c
vendored
1
third_party/gdtoa/g_xfmt_p.c
vendored
|
@ -30,7 +30,6 @@
|
|||
│ │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "third_party/gdtoa/gdtoa.internal.h"
|
||||
/* clang-format off */
|
||||
|
||||
extern UShort __gdtoa_NanDflt_ldus[5];
|
||||
|
||||
|
|
1
third_party/gdtoa/gdtoa.c
vendored
1
third_party/gdtoa/gdtoa.c
vendored
|
@ -30,7 +30,6 @@
|
|||
│ │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "third_party/gdtoa/gdtoa.internal.h"
|
||||
/* clang-format off */
|
||||
|
||||
static Bigint *
|
||||
bitstob(ULong *bits, int nbits, int *bbits, ThInfo **PTI)
|
||||
|
|
2
third_party/gdtoa/gdtoa.h
vendored
2
third_party/gdtoa/gdtoa.h
vendored
|
@ -1,6 +1,5 @@
|
|||
#ifndef COSMOPOLITAN_THIRD_PARTY_GDTOA_GDTOA_H_
|
||||
#define COSMOPOLITAN_THIRD_PARTY_GDTOA_GDTOA_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
#define dtoa __dtoa
|
||||
|
@ -135,5 +134,4 @@ int strtopx(const char *, char **, void *);
|
|||
int strtopxL(const char *, char **, void *);
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_THIRD_PARTY_GDTOA_GDTOA_H_ */
|
||||
|
|
1
third_party/gdtoa/gdtoa_fltrnds.inc
vendored
1
third_party/gdtoa/gdtoa_fltrnds.inc
vendored
|
@ -1,4 +1,3 @@
|
|||
/* clang-format off */
|
||||
|
||||
FPI fpi1;
|
||||
int Rounding;
|
||||
|
|
1
third_party/gdtoa/gethex.c
vendored
1
third_party/gdtoa/gethex.c
vendored
|
@ -31,7 +31,6 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/errno.h"
|
||||
#include "third_party/gdtoa/gdtoa.internal.h"
|
||||
/* clang-format off */
|
||||
|
||||
int
|
||||
__gdtoa_gethex(const char **sp, const FPI *fpi,
|
||||
|
|
1
third_party/gdtoa/gmisc.c
vendored
1
third_party/gdtoa/gmisc.c
vendored
|
@ -30,7 +30,6 @@
|
|||
│ │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "third_party/gdtoa/gdtoa.internal.h"
|
||||
/* clang-format off */
|
||||
|
||||
void
|
||||
__gdtoa_rshift(Bigint *b, int k)
|
||||
|
|
1
third_party/gdtoa/hexnan.c
vendored
1
third_party/gdtoa/hexnan.c
vendored
|
@ -30,7 +30,6 @@
|
|||
│ │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "third_party/gdtoa/gdtoa.internal.h"
|
||||
/* clang-format off */
|
||||
|
||||
static void
|
||||
L_shift(ULong *x, ULong *x1, int i)
|
||||
|
|
1
third_party/gdtoa/misc.c
vendored
1
third_party/gdtoa/misc.c
vendored
|
@ -35,7 +35,6 @@
|
|||
#include "libc/thread/thread.h"
|
||||
#include "libc/thread/tls.h"
|
||||
#include "third_party/gdtoa/gdtoa.internal.h"
|
||||
/* clang-format off */
|
||||
|
||||
static ThInfo TI0;
|
||||
static pthread_mutex_t __gdtoa_lock_obj;
|
||||
|
|
1
third_party/gdtoa/smisc.c
vendored
1
third_party/gdtoa/smisc.c
vendored
|
@ -30,7 +30,6 @@
|
|||
│ │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "third_party/gdtoa/gdtoa.internal.h"
|
||||
/* clang-format off */
|
||||
|
||||
Bigint *
|
||||
__gdtoa_s2b(const char *s, int nd0, int nd, ULong y9, int dplen, ThInfo **PTI)
|
||||
|
|
1
third_party/gdtoa/strtoId.c
vendored
1
third_party/gdtoa/strtoId.c
vendored
|
@ -30,7 +30,6 @@
|
|||
│ │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "third_party/gdtoa/gdtoa.internal.h"
|
||||
/* clang-format off */
|
||||
|
||||
int
|
||||
strtoId(const char *s, char **sp, double *f0, double *f1)
|
||||
|
|
1
third_party/gdtoa/strtoIdd.c
vendored
1
third_party/gdtoa/strtoIdd.c
vendored
|
@ -30,7 +30,6 @@
|
|||
│ │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "third_party/gdtoa/gdtoa.internal.h"
|
||||
/* clang-format off */
|
||||
|
||||
int
|
||||
strtoIdd(const char *s, char **sp, double *f0, double *f1)
|
||||
|
|
1
third_party/gdtoa/strtoIf.c
vendored
1
third_party/gdtoa/strtoIf.c
vendored
|
@ -30,7 +30,6 @@
|
|||
│ │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "third_party/gdtoa/gdtoa.internal.h"
|
||||
/* clang-format off */
|
||||
|
||||
int
|
||||
strtoIf(const char *s, char **sp, float *f0, float *f1)
|
||||
|
|
1
third_party/gdtoa/strtoIg.c
vendored
1
third_party/gdtoa/strtoIg.c
vendored
|
@ -30,7 +30,6 @@
|
|||
│ │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "third_party/gdtoa/gdtoa.internal.h"
|
||||
/* clang-format off */
|
||||
|
||||
int
|
||||
__gdtoa_strtoIg(const char *s00, char **se, const FPI *fpi, Long *exp, Bigint **B, int *rvp)
|
||||
|
|
1
third_party/gdtoa/strtoIx.c
vendored
1
third_party/gdtoa/strtoIx.c
vendored
|
@ -30,7 +30,6 @@
|
|||
│ │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "third_party/gdtoa/gdtoa.internal.h"
|
||||
/* clang-format off */
|
||||
|
||||
int
|
||||
strtoIx(const char *s, char **sp, void *a, void *b)
|
||||
|
|
1
third_party/gdtoa/strtod.c
vendored
1
third_party/gdtoa/strtod.c
vendored
|
@ -33,7 +33,6 @@
|
|||
#include "libc/fmt/conv.h"
|
||||
#include "libc/runtime/fenv.h"
|
||||
#include "third_party/gdtoa/gdtoa.internal.h"
|
||||
/* clang-format off */
|
||||
|
||||
#define Avoid_Underflow
|
||||
#define dplen 1
|
||||
|
|
1
third_party/gdtoa/strtodI.c
vendored
1
third_party/gdtoa/strtodI.c
vendored
|
@ -30,7 +30,6 @@
|
|||
│ │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "third_party/gdtoa/gdtoa.internal.h"
|
||||
/* clang-format off */
|
||||
|
||||
static double
|
||||
__gdtoa_ulpdown(U *d)
|
||||
|
|
1
third_party/gdtoa/strtodg.c
vendored
1
third_party/gdtoa/strtodg.c
vendored
|
@ -31,7 +31,6 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/errno.h"
|
||||
#include "third_party/gdtoa/gdtoa.internal.h"
|
||||
/* clang-format off */
|
||||
|
||||
static const int
|
||||
fivesbits[] = { 0, 3, 5, 7, 10, 12, 14, 17, 19, 21,
|
||||
|
|
1
third_party/gdtoa/strtof.c
vendored
1
third_party/gdtoa/strtof.c
vendored
|
@ -32,7 +32,6 @@
|
|||
#include "libc/fmt/conv.h"
|
||||
#include "third_party/gdtoa/gdtoa.h"
|
||||
#include "third_party/gdtoa/gdtoa.internal.h"
|
||||
/* clang-format off */
|
||||
|
||||
float
|
||||
strtof(const char *s, char **sp)
|
||||
|
|
1
third_party/gdtoa/strtopd.c
vendored
1
third_party/gdtoa/strtopd.c
vendored
|
@ -30,7 +30,6 @@
|
|||
│ │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "third_party/gdtoa/gdtoa.internal.h"
|
||||
/* clang-format off */
|
||||
|
||||
int
|
||||
strtopd(const char *s, char **sp, double *d)
|
||||
|
|
1
third_party/gdtoa/strtopdd.c
vendored
1
third_party/gdtoa/strtopdd.c
vendored
|
@ -30,7 +30,6 @@
|
|||
│ │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "third_party/gdtoa/gdtoa.internal.h"
|
||||
/* clang-format off */
|
||||
|
||||
int
|
||||
strtopdd(const char *s, char **sp, double *dd)
|
||||
|
|
1
third_party/gdtoa/strtopf.c
vendored
1
third_party/gdtoa/strtopf.c
vendored
|
@ -30,7 +30,6 @@
|
|||
│ │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "third_party/gdtoa/gdtoa.internal.h"
|
||||
/* clang-format off */
|
||||
|
||||
int
|
||||
strtopf(const char *s, char **sp, float *f)
|
||||
|
|
1
third_party/gdtoa/strtopx.c
vendored
1
third_party/gdtoa/strtopx.c
vendored
|
@ -30,7 +30,6 @@
|
|||
│ │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "third_party/gdtoa/gdtoa.internal.h"
|
||||
/* clang-format off */
|
||||
|
||||
extern UShort __gdtoa_NanDflt_ldus[5];
|
||||
|
||||
|
|
1
third_party/gdtoa/strtord.c
vendored
1
third_party/gdtoa/strtord.c
vendored
|
@ -30,7 +30,6 @@
|
|||
│ │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "third_party/gdtoa/gdtoa.internal.h"
|
||||
/* clang-format off */
|
||||
|
||||
extern ULong __gdtoa_NanDflt_d[2];
|
||||
|
||||
|
|
1
third_party/gdtoa/strtordd.c
vendored
1
third_party/gdtoa/strtordd.c
vendored
|
@ -30,7 +30,6 @@
|
|||
│ │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "third_party/gdtoa/gdtoa.internal.h"
|
||||
/* clang-format off */
|
||||
|
||||
extern ULong __gdtoa_NanDflt_d[2];
|
||||
|
||||
|
|
1
third_party/gdtoa/strtorf.c
vendored
1
third_party/gdtoa/strtorf.c
vendored
|
@ -30,7 +30,6 @@
|
|||
│ │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "third_party/gdtoa/gdtoa.internal.h"
|
||||
/* clang-format off */
|
||||
|
||||
extern ULong __gdtoa_NanDflt_f[1];
|
||||
|
||||
|
|
1
third_party/gdtoa/strtorx.c
vendored
1
third_party/gdtoa/strtorx.c
vendored
|
@ -30,7 +30,6 @@
|
|||
│ │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "third_party/gdtoa/gdtoa.internal.h"
|
||||
/* clang-format off */
|
||||
|
||||
extern UShort __gdtoa_NanDflt_ldus[5];
|
||||
|
||||
|
|
1
third_party/gdtoa/sum.c
vendored
1
third_party/gdtoa/sum.c
vendored
|
@ -30,7 +30,6 @@
|
|||
│ │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "third_party/gdtoa/gdtoa.internal.h"
|
||||
/* clang-format off */
|
||||
|
||||
Bigint *
|
||||
__gdtoa_sum(Bigint *a, Bigint *b, ThInfo **PTI)
|
||||
|
|
1
third_party/gdtoa/ulp.c
vendored
1
third_party/gdtoa/ulp.c
vendored
|
@ -30,7 +30,6 @@
|
|||
│ │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "third_party/gdtoa/gdtoa.internal.h"
|
||||
/* clang-format off */
|
||||
|
||||
double
|
||||
__gdtoa_ulp(U *x)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue