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

@ -1,2 +0,0 @@
DisableFormat: true
SortIncludes: Never

View file

@ -49,7 +49,6 @@
#include "libc/assert.h"
#include "libc/str/str.h"
#include "third_party/sqlite3/sqlite3ext.h"
// clang-format off
SQLITE_EXTENSION_INIT1

View file

@ -19,7 +19,6 @@
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif
/* clang-format off */
/*
** The header string that appears at the beginning of every

View file

@ -28,7 +28,6 @@
#pragma GCC diagnostic ignored "-Wmisleading-indentation"
#endif
/* clang-format off */
#ifndef SQLITE_OMIT_SHARED_CACHE
/*

View file

@ -36,7 +36,6 @@
#include "libc/assert.h"
#include "libc/str/str.h"
#include "third_party/sqlite3/sqlite3ext.h"
// clang-format off
SQLITE_EXTENSION_INIT1

View file

@ -1,4 +1,3 @@
// clang-format off
/* DO NOT EDIT!
** This file is automatically generated by the script in the canonical
** SQLite source tree at tool/mkctimec.tcl.

View file

@ -74,7 +74,6 @@
#include "libc/assert.h"
#include "libc/str/str.h"
#include "third_party/sqlite3/sqlite3ext.h"
// clang-format off
SQLITE_EXTENSION_INIT1

View file

@ -18,7 +18,6 @@
#include "libc/mem/mem.h"
#include "libc/str/str.h"
#include "third_party/sqlite3/sqlite3ext.h"
// clang-format off
SQLITE_EXTENSION_INIT1

View file

@ -2,7 +2,6 @@
#define COSMOPOLITAN_THIRD_PARTY_SQLITE3_EXTENSIONS_H_
#include "libc/stdio/stdio.h"
#include "third_party/sqlite3/sqlite3.h"
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
int sqlite3MemTraceActivate(FILE *);
@ -21,5 +20,4 @@ int sqlite3_uint_init(sqlite3 *, char **, const sqlite3_api_routines *);
int sqlite3_zipfile_init(sqlite3 *, char **, const sqlite3_api_routines *);
COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#endif /* COSMOPOLITAN_THIRD_PARTY_SQLITE3_EXTENSIONS_H_ */

View file

@ -87,7 +87,6 @@
#include "libc/sysv/consts/s.h"
#include "libc/time/time.h"
#include "third_party/sqlite3/sqlite3ext.h"
// clang-format off
SQLITE_EXTENSION_INIT1

View file

@ -1,4 +1,3 @@
// clang-format off
#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS5)

View file

@ -20,7 +20,6 @@
#include "libc/math.h"
#endif
#include "third_party/sqlite3/vdbeInt.inc"
/* clang-format off */
/*
** Return the collating function associated with a function.

View file

@ -17,7 +17,6 @@
** access to all of the R-Tree internals.
*/
#include "libc/fmt/conv.h"
/* clang-format off */
/* Enable -DGEOPOLY_ENABLE_DEBUG for debugging facilities */
#ifdef GEOPOLY_ENABLE_DEBUG

View file

@ -88,7 +88,6 @@
#include "libc/assert.h"
#include "libc/str/str.h"
#include "third_party/sqlite3/sqlite3ext.h"
// clang-format off
SQLITE_EXTENSION_INIT1

View file

@ -24,7 +24,6 @@
#ifndef SQLITE_OMIT_JSON
#include "libc/fmt/conv.h"
#include "third_party/sqlite3/sqliteInt.h"
// clang-format off
/*
** Growing our own isspace() routine this way is twice as fast as

View file

@ -1,4 +1,3 @@
// clang-format off
/*
** 2001 September 15
**

View file

@ -25,7 +25,6 @@
#include "libc/stdio/stdio.h"
#include "libc/str/str.h"
#include "third_party/sqlite3/sqlite3.h"
// clang-format off
/* The original memory allocation routines */
static sqlite3_mem_methods memtraceBase;

View file

@ -1,6 +1,5 @@
#ifndef COSMOPOLITAN_THIRD_PARTY_SQLITE3_MUTEX_INTERNAL_H_
#define COSMOPOLITAN_THIRD_PARTY_SQLITE3_MUTEX_INTERNAL_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
#if !SQLITE_THREADSAFE
@ -37,5 +36,4 @@ int sqlite3_mutex_held(sqlite3_mutex*);
#endif /* defined(SQLITE_MUTEX_OMIT) */
COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#endif /* COSMOPOLITAN_THIRD_PARTY_SQLITE3_MUTEX_INTERNAL_H_ */

View file

@ -1,4 +1,3 @@
// clang-format off
/*
** 2004 May 22
**

View file

@ -84,7 +84,6 @@
#include "libc/assert.h"
#include "third_party/sqlite3/sqlite3.h"
#include "third_party/sqlite3/sqliteInt.h"
/* clang-format off */
typedef struct PCache1 PCache1;
typedef struct PgHdr1 PgHdr1;

View file

@ -1,4 +1,3 @@
// clang-format off
/*
** 2001 September 15
**

View file

@ -71,7 +71,6 @@
#include "libc/assert.h"
#include "libc/str/str.h"
#include "third_party/sqlite3/sqlite3ext.h"
// clang-format off
SQLITE_EXTENSION_INIT1

View file

@ -29,7 +29,6 @@
#include "libc/assert.h"
#include "libc/str/str.h"
#include "third_party/sqlite3/sqlite3ext.h"
// clang-format off
SQLITE_EXTENSION_INIT1

View file

@ -1,4 +1,3 @@
/* clang-format off */
/* DO NOT EDIT!
** This file is automatically generated by the script in the canonical
** SQLite source tree at tool/mkshellc.tcl. That script combines source

View file

@ -17,7 +17,6 @@
#include "libc/assert.h"
#include "third_party/sqlite3/sqlite3ext.h"
#include "third_party/zlib/zlib.h"
// clang-format off
SQLITE_EXTENSION_INIT1

View file

@ -15,7 +15,6 @@
#include "libc/stdio/stdio.h"
#include "libc/str/str.h"
#include "third_party/sqlite3/sqlite3expert.h"
// clang-format off
#ifndef SQLITE_OMIT_VIRTUALTABLE

View file

@ -1,7 +1,6 @@
#ifndef COSMOPOLITAN_THIRD_PARTY_SQLITE3_SQLITE3EXPERT_H_
#define COSMOPOLITAN_THIRD_PARTY_SQLITE3_SQLITE3EXPERT_H_
#include "third_party/sqlite3/sqlite3.h"
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
typedef struct sqlite3expert sqlite3expert;
@ -155,5 +154,4 @@ const char *sqlite3_expert_report(sqlite3expert *, int iStmt, int eReport);
void sqlite3_expert_destroy(sqlite3expert *);
COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#endif /* COSMOPOLITAN_THIRD_PARTY_SQLITE3_SQLITE3EXPERT_H_ */

View file

@ -1,4 +1,3 @@
// clang-format off
/*
** 2014 August 30
**

View file

@ -1,4 +1,3 @@
/* clang-format off */
#if defined(SQLITE_ENABLE_SESSION) && defined(SQLITE_ENABLE_PREUPDATE_HOOK)
#include "third_party/sqlite3/sqlite3session.h"

View file

@ -1,4 +1,3 @@
// clang-format off
/*
** 2001 September 15
**

View file

@ -30,7 +30,6 @@
#include "libc/assert.h"
#include "libc/str/str.h"
#include "third_party/sqlite3/sqlite3ext.h"
// clang-format off
SQLITE_EXTENSION_INIT1

View file

@ -32,7 +32,6 @@
#include "third_party/sqlite3/sqlite3.h"
#include "third_party/sqlite3/sqlite3ext.h"
#include "third_party/zlib/zlib.h"
// clang-format off
typedef sqlite3_int64 i64;
typedef sqlite3_uint64 u64;