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:
Justine Tunney 2023-11-28 14:24:28 -08:00
parent 96f979dfc5
commit fa20edc44d
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
3057 changed files with 410 additions and 4398 deletions

View file

@ -47,7 +47,6 @@
#include "third_party/python/Include/yoink.h"
#include "third_party/python/Modules/_decimal/docstrings.h"
#include "third_party/python/Modules/_decimal/libmpdec/mpdecimal.h"
/* clang-format off */
PYTHON_PROVIDE("_decimal");
PYTHON_PROVIDE("_decimal.BasicContext");

View file

@ -1,6 +1,5 @@
#ifndef DOCSTRINGS_H
#define DOCSTRINGS_H
/* clang-format off */
#include "third_party/python/Include/pymacro.h"

View file

@ -31,7 +31,6 @@
#include "third_party/python/Modules/_decimal/libmpdec/constants.h"
#include "third_party/python/Modules/_decimal/libmpdec/mpdecimal.h"
#include "third_party/python/Modules/_decimal/libmpdec/typearith.h"
/* clang-format off */
asm(".ident\t\"\\n\\n\
libmpdec (BSD-2)\\n\

View file

@ -2,7 +2,6 @@
#define BASEARITH_H
#include "third_party/python/Modules/_decimal/libmpdec/mpdecimal.h"
#include "third_party/python/Modules/_decimal/libmpdec/typearith.h"
/* clang-format off */
/* Internal header file: all symbols have local scope in the DSO */

View file

@ -1,7 +1,6 @@
#ifndef BITS_H
#define BITS_H
#include "third_party/python/Modules/_decimal/libmpdec/mpdecimal.h"
/* clang-format off */
/*
* Check if 𝑛 is a power of 2.

View file

@ -29,7 +29,6 @@
*/
#include "third_party/python/Modules/_decimal/libmpdec/constants.h"
#include "third_party/python/Modules/_decimal/libmpdec/mpdecimal.h"
/* clang-format off */
asm(".ident\t\"\\n\\n\
libmpdec (BSD-2)\\n\

View file

@ -1,7 +1,6 @@
#ifndef CONSTANTS_H
#define CONSTANTS_H
#include "third_party/python/Modules/_decimal/libmpdec/mpdecimal.h"
/* clang-format off */
#define MULMOD(a, b) x64_mulmod(a, b, umod)
#define MULMOD2C(a0, a1, w) x64_mulmod2c(a0, a1, w, umod)

View file

@ -30,7 +30,6 @@
#include "libc/calls/calls.h"
#include "libc/sysv/consts/sig.h"
#include "third_party/python/Modules/_decimal/libmpdec/mpdecimal.h"
/* clang-format off */
asm(".ident\t\"\\n\\n\
libmpdec (BSD-2)\\n\

View file

@ -36,7 +36,6 @@
#include "third_party/python/Modules/_decimal/libmpdec/numbertheory.h"
#include "third_party/python/Modules/_decimal/libmpdec/sixstep.h"
#include "third_party/python/Modules/_decimal/libmpdec/umodarith.h"
/* clang-format off */
asm(".ident\t\"\\n\\n\
libmpdec (BSD-2)\\n\

View file

@ -31,7 +31,6 @@
#include "third_party/python/Modules/_decimal/libmpdec/mpdecimal.h"
#include "third_party/python/Modules/_decimal/libmpdec/numbertheory.h"
#include "third_party/python/Modules/_decimal/libmpdec/umodarith.h"
/* clang-format off */
asm(".ident\t\"\\n\\n\
libmpdec (BSD-2)\\n\

View file

@ -1,7 +1,6 @@
#ifndef CRT_H
#define CRT_H
#include "third_party/python/Modules/_decimal/libmpdec/mpdecimal.h"
/* clang-format off */
/* Internal header file: all symbols have local scope in the DSO */

View file

@ -32,7 +32,6 @@
#include "third_party/python/Modules/_decimal/libmpdec/mpdecimal.h"
#include "third_party/python/Modules/_decimal/libmpdec/numbertheory.h"
#include "third_party/python/Modules/_decimal/libmpdec/umodarith.h"
/* clang-format off */
asm(".ident\t\"\\n\\n\
libmpdec (BSD-2)\\n\

View file

@ -33,7 +33,6 @@
#include "third_party/python/Modules/_decimal/libmpdec/fnt.h"
#include "third_party/python/Modules/_decimal/libmpdec/mpdecimal.h"
#include "third_party/python/Modules/_decimal/libmpdec/numbertheory.h"
/* clang-format off */
asm(".ident\t\"\\n\\n\
libmpdec (BSD-2)\\n\

View file

@ -33,7 +33,6 @@
#include "third_party/python/Modules/_decimal/libmpdec/sixstep.h"
#include "third_party/python/Modules/_decimal/libmpdec/transpose.h"
#include "third_party/python/Modules/_decimal/libmpdec/umodarith.h"
/* clang-format off */
asm(".ident\t\"\\n\\n\
libmpdec (BSD-2)\\n\

View file

@ -35,7 +35,6 @@
#include "third_party/python/Modules/_decimal/libmpdec/io.h"
#include "third_party/python/Modules/_decimal/libmpdec/mpdecimal.h"
#include "third_party/python/Modules/_decimal/libmpdec/typearith.h"
/* clang-format off */
#if __GNUC__ >= 11
#pragma GCC diagnostic ignored "-Wmisleading-indentation"

View file

@ -1,7 +1,6 @@
#ifndef IO_H
#define IO_H
#include "third_party/python/Modules/_decimal/libmpdec/mpdecimal.h"
/* clang-format off */
#if SIZE_MAX == MPD_SIZE_MAX
#define mpd_strtossize _mpd_strtossize

View file

@ -31,7 +31,6 @@
#include "third_party/python/Modules/_decimal/libmpdec/mpalloc.h"
#include "third_party/python/Modules/_decimal/libmpdec/mpdecimal.h"
#include "third_party/python/Modules/_decimal/libmpdec/typearith.h"
/* clang-format off */
asm(".ident\t\"\\n\\n\
libmpdec (BSD-2)\\n\

View file

@ -36,7 +36,6 @@
#include "third_party/python/Modules/_decimal/libmpdec/mpalloc.h"
#include "third_party/python/Modules/_decimal/libmpdec/typearith.h"
#include "third_party/python/Modules/_decimal/libmpdec/umodarith.h"
/* clang-format off */
asm(".ident\t\"\\n\\n\
libmpdec (BSD-2)\\n\

View file

@ -7,7 +7,6 @@
#include "libc/stdio/stdio.h"
#include "third_party/python/pyconfig.h"
COSMOPOLITAN_C_START_
/* clang-format off */
#define MPD_VERSION "2.4.2"
#define MPD_MAJOR_VERSION 2

View file

@ -31,7 +31,6 @@
#include "third_party/python/Modules/_decimal/libmpdec/mpdecimal.h"
#include "third_party/python/Modules/_decimal/libmpdec/numbertheory.h"
#include "third_party/python/Modules/_decimal/libmpdec/umodarith.h"
/* clang-format off */
asm(".ident\t\"\\n\\n\
libmpdec (BSD-2)\\n\

View file

@ -34,7 +34,6 @@
#include "third_party/python/Modules/_decimal/libmpdec/sixstep.h"
#include "third_party/python/Modules/_decimal/libmpdec/transpose.h"
#include "third_party/python/Modules/_decimal/libmpdec/umodarith.h"
/* clang-format off */
asm(".ident\t\"\\n\\n\
libmpdec (BSD-2)\\n\

View file

@ -1,7 +1,6 @@
#ifndef SIX_STEP_H
#define SIX_STEP_H
#include "third_party/python/Modules/_decimal/libmpdec/mpdecimal.h"
/* clang-format off */
/* Internal header file: all symbols have local scope in the DSO */

View file

@ -34,7 +34,6 @@
#include "third_party/python/Modules/_decimal/libmpdec/constants.h"
#include "third_party/python/Modules/_decimal/libmpdec/mpdecimal.h"
#include "third_party/python/Modules/_decimal/libmpdec/typearith.h"
/* clang-format off */
asm(".ident\t\"\\n\\n\
libmpdec (BSD-2)\\n\

View file

@ -1,7 +1,6 @@
#ifndef TRANSPOSE_H
#define TRANSPOSE_H
#include "third_party/python/Modules/_decimal/libmpdec/mpdecimal.h"
/* clang-format off */
/* Internal header file: all symbols have local scope in the DSO */

View file

@ -2,7 +2,6 @@
#define TYPEARITH_H
#include "libc/assert.h"
#include "third_party/python/Modules/_decimal/libmpdec/mpdecimal.h"
/* clang-format off */
#if defined(__GNUC__) && defined(__x86_64__) && !defined(__STRICT_ANSI__)

View file

@ -3,7 +3,6 @@
#include "third_party/python/Modules/_decimal/libmpdec/constants.h"
#include "third_party/python/Modules/_decimal/libmpdec/mpdecimal.h"
#include "third_party/python/Modules/_decimal/libmpdec/typearith.h"
/* clang-format off */
/* Bignum: Low level routines for unsigned modular arithmetic. These are
used in the fast convolution functions for very large coefficients. */