Clean up some code

- Use good ELF technique in cosmo_dlopen()
- Make strerror() conform more to other libc impls
- Introduce __clear_cache() and use it in cosmo_dlopen()
- Remove libc/fmt/fmt.h header (trying to kill off LIBC_FMT)
This commit is contained in:
Justine Tunney 2023-11-16 16:34:53 -08:00
parent 7010a8081e
commit 68c7c9c1e0
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
244 changed files with 378 additions and 588 deletions

View file

@ -16,7 +16,6 @@
*/
#include "third_party/argon2/encoding.h"
#include "libc/fmt/fmt.h"
#include "libc/limits.h"
#include "libc/stdio/stdio.h"
#include "libc/str/str.h"

View file

@ -23,13 +23,9 @@ THIS SOFTWARE.
****************************************************************/
%{
#include "libc/calls/calls.h"
#include "libc/fmt/fmt.h"
#include "libc/stdio/stdio.h"
#include "libc/temp.h"
#include "libc/mem/alg.h"
#include "libc/str/str.h"
#include "third_party/awk/awk.h"
#include <stdio.h>
#include <string.h>
#include "awk.h"
void checkdup(Node *list, Cell *item);
int yywrap(void) { return(1); }

View file

@ -27,7 +27,6 @@
*/
#include "libc/calls/calls.h"
#include "libc/fmt/conv.h"
#include "libc/fmt/fmt.h"
#include "libc/mem/mem.h"
#include "libc/runtime/runtime.h"
#include "libc/stdio/stdio.h"

View file

@ -29,7 +29,6 @@
#include "libc/calls/calls.h"
#include "libc/errno.h"
#include "libc/fmt/conv.h"
#include "libc/fmt/fmt.h"
#include "libc/limits.h"
#include "libc/math.h"
#include "libc/mem/mem.h"

View file

@ -25,7 +25,6 @@
THIS SOFTWARE.
*/
#include "libc/fmt/fmt.h"
#include "libc/mem/mem.h"
#include "libc/runtime/runtime.h"
#include "libc/stdio/stdio.h"
@ -126,13 +125,9 @@ int main(int argc, char *argv[])
char buf[200], name[200], def[200];
enum { TOK_UNKNOWN, TOK_ENUM, TOK_DEFINE } tokentype = TOK_UNKNOWN;
printf("#include \"libc/calls/calls.h\"\n");
printf("#include \"libc/fmt/fmt.h\"\n");
printf("#include \"libc/stdio/lock.h\"\n");
printf("#include \"libc/stdio/stdio.h\"\n");
printf("#include \"libc/stdio/temp.h\"\n");
printf("#include \"third_party/awk/awk.h\"\n");
printf("#include \"third_party/awk/awkgram.tab.h\"\n\n");
printf("#include <stdio.h>\n");
printf("#include \"awk.h\"\n");
printf("#include \"awkgram.tab.h\"\n\n");
if (argc != 2) {
fprintf(stderr, "usage: maketab YTAB_H\n");

View file

@ -25,7 +25,6 @@
THIS SOFTWARE.
*/
#include "libc/fmt/fmt.h"
#include "third_party/awk/awk.h"
#include "third_party/awk/awkgram.tab.h"
// clang-format off

View file

@ -30,7 +30,6 @@
#include "libc/calls/weirdtypes.h"
#include "libc/errno.h"
#include "libc/fmt/conv.h"
#include "libc/fmt/fmt.h"
#include "libc/mem/mem.h"
#include "libc/runtime/runtime.h"
#include "libc/str/str.h"

View file

@ -27,7 +27,6 @@
*/
#define DEBUG
#include "libc/fmt/conv.h"
#include "libc/fmt/fmt.h"
#include "libc/math.h"
#include "libc/mem/mem.h"
#include "libc/str/str.h"

View file

@ -1,6 +1,5 @@
#include "libc/calls/calls.h"
#include "libc/errno.h"
#include "libc/fmt/fmt.h"
#include "libc/log/log.h"
#include "libc/mem/mem.h"
#include "libc/runtime/runtime.h"

View file

@ -6,7 +6,6 @@
#include "libc/calls/weirdtypes.h"
#include "libc/errno.h"
#include "libc/fmt/conv.h"
#include "libc/fmt/fmt.h"
#include "libc/fmt/itoa.h"
#include "libc/intrin/popcnt.h"
#include "libc/limits.h"

View file

@ -1,4 +1,3 @@
#include "libc/fmt/fmt.h"
#include "libc/runtime/runtime.h"
#include "libc/stdio/stdio.h"
#include "libc/str/str.h"

148
third_party/compiler_rt/clear_cache.c vendored Normal file
View file

@ -0,0 +1,148 @@
//===-- clear_cache.c - Implement __clear_cache ---------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#include <assert.h>
#include <stddef.h>
#include "int_lib.h"
#if __APPLE__
#include <libkern/OSCacheControl.h>
#endif
#if defined(_WIN32)
// Forward declare Win32 APIs since the GCC mode driver does not handle the
// newer SDKs as well as needed.
uint32_t FlushInstructionCache(uintptr_t hProcess, void *lpBaseAddress,
uintptr_t dwSize);
uintptr_t GetCurrentProcess(void);
#endif
#if defined(__FreeBSD__) && defined(__arm__)
// clang-format off
#include <sys/types.h>
#include <machine/sysarch.h>
// clang-format on
#endif
#if defined(__NetBSD__) && defined(__arm__)
#include <machine/sysarch.h>
#endif
#if defined(__OpenBSD__) && defined(__mips__)
// clang-format off
#include <sys/types.h>
#include <machine/sysarch.h>
// clang-format on
#endif
#if defined(__linux__) && defined(__mips__)
#include <sys/cachectl.h>
#include <sys/syscall.h>
#include <unistd.h>
#endif
// The compiler generates calls to __clear_cache() when creating
// trampoline functions on the stack for use with nested functions.
// It is expected to invalidate the instruction cache for the
// specified range.
void __clear_cache(void *start, void *end) {
#if __i386__ || __x86_64__ || defined(_M_IX86) || defined(_M_X64)
// Intel processors have a unified instruction and data cache
// so there is nothing to do
#elif defined(_WIN32) && (defined(__arm__) || defined(__aarch64__))
FlushInstructionCache(GetCurrentProcess(), start, end - start);
#elif defined(__arm__) && !defined(__APPLE__)
#if defined(__FreeBSD__) || defined(__NetBSD__)
struct arm_sync_icache_args arg;
arg.addr = (uintptr_t)start;
arg.len = (uintptr_t)end - (uintptr_t)start;
sysarch(ARM_SYNC_ICACHE, &arg);
#elif defined(__linux__)
// We used to include asm/unistd.h for the __ARM_NR_cacheflush define, but
// it also brought many other unused defines, as well as a dependency on
// kernel headers to be installed.
//
// This value is stable at least since Linux 3.13 and should remain so for
// compatibility reasons, warranting it's re-definition here.
#define __ARM_NR_cacheflush 0x0f0002
register int start_reg __asm("r0") = (int)(intptr_t)start;
const register int end_reg __asm("r1") = (int)(intptr_t)end;
const register int flags __asm("r2") = 0;
const register int syscall_nr __asm("r7") = __ARM_NR_cacheflush;
__asm __volatile("svc 0x0"
: "=r"(start_reg)
: "r"(syscall_nr), "r"(start_reg), "r"(end_reg), "r"(flags));
assert(start_reg == 0 && "Cache flush syscall failed.");
#else
compilerrt_abort();
#endif
#elif defined(__linux__) && defined(__mips__)
const uintptr_t start_int = (uintptr_t)start;
const uintptr_t end_int = (uintptr_t)end;
syscall(__NR_cacheflush, start, (end_int - start_int), BCACHE);
#elif defined(__mips__) && defined(__OpenBSD__)
cacheflush(start, (uintptr_t)end - (uintptr_t)start, BCACHE);
#elif defined(__aarch64__) && !defined(__APPLE__)
uint64_t xstart = (uint64_t)(uintptr_t)start;
uint64_t xend = (uint64_t)(uintptr_t)end;
uint64_t addr;
// Get Cache Type Info
uint64_t ctr_el0;
__asm __volatile("mrs %0, ctr_el0" : "=r"(ctr_el0));
// dc & ic instructions must use 64bit registers so we don't use
// uintptr_t in case this runs in an IPL32 environment.
const size_t dcache_line_size = 4 << ((ctr_el0 >> 16) & 15);
for (addr = xstart & ~(dcache_line_size - 1); addr < xend;
addr += dcache_line_size)
__asm __volatile("dc cvau, %0" ::"r"(addr));
__asm __volatile("dsb ish");
const size_t icache_line_size = 4 << ((ctr_el0 >> 0) & 15);
for (addr = xstart & ~(icache_line_size - 1); addr < xend;
addr += icache_line_size)
__asm __volatile("ic ivau, %0" ::"r"(addr));
__asm __volatile("isb sy");
#elif defined(__powerpc64__)
const size_t line_size = 32;
const size_t len = (uintptr_t)end - (uintptr_t)start;
const uintptr_t mask = ~(line_size - 1);
const uintptr_t start_line = ((uintptr_t)start) & mask;
const uintptr_t end_line = ((uintptr_t)start + len + line_size - 1) & mask;
for (uintptr_t line = start_line; line < end_line; line += line_size)
__asm__ volatile("dcbf 0, %0" : : "r"(line));
__asm__ volatile("sync");
for (uintptr_t line = start_line; line < end_line; line += line_size)
__asm__ volatile("icbi 0, %0" : : "r"(line));
__asm__ volatile("isync");
#elif defined(__sparc__)
const size_t dword_size = 8;
const size_t len = (uintptr_t)end - (uintptr_t)start;
const uintptr_t mask = ~(dword_size - 1);
const uintptr_t start_dword = ((uintptr_t)start) & mask;
const uintptr_t end_dword = ((uintptr_t)start + len + dword_size - 1) & mask;
for (uintptr_t dword = start_dword; dword < end_dword; dword += dword_size)
__asm__ volatile("flush %0" : : "r"(dword));
#else
#if __APPLE__
// On Darwin, sys_icache_invalidate() provides this functionality
sys_icache_invalidate(start, end - start);
#else
compilerrt_abort();
#endif
#endif
}

View file

@ -20,7 +20,6 @@
#include "libc/calls/calls.h"
#include "libc/stdio/dprintf.h"
#include "libc/calls/weirdtypes.h"
#include "libc/fmt/fmt.h"
#include "libc/stdio/stdio.h"
#include "libc/temp.h"
#include "third_party/musl/tempnam.h"

View file

@ -21,7 +21,6 @@
#include "libc/calls/calls.h"
#include "libc/stdio/dprintf.h"
#include "libc/calls/weirdtypes.h"
#include "libc/fmt/fmt.h"
#include "libc/stdio/stdio.h"
#include "libc/temp.h"
#include "third_party/musl/tempnam.h"

View file

@ -20,7 +20,6 @@
#include "libc/calls/calls.h"
#include "libc/stdio/dprintf.h"
#include "libc/calls/weirdtypes.h"
#include "libc/fmt/fmt.h"
#include "libc/stdio/stdio.h"
#include "libc/temp.h"
#include "third_party/musl/tempnam.h"

View file

@ -27,7 +27,6 @@
#include "libc/calls/calls.h"
#include "libc/stdio/dprintf.h"
#include "libc/calls/weirdtypes.h"
#include "libc/fmt/fmt.h"
#include "libc/stdio/stdio.h"
#include "libc/temp.h"
#include "third_party/musl/tempnam.h"

View file

@ -26,7 +26,6 @@
#include "libc/calls/calls.h"
#include "libc/stdio/dprintf.h"
#include "libc/calls/weirdtypes.h"
#include "libc/fmt/fmt.h"
#include "libc/stdio/stdio.h"
#include "libc/temp.h"
#include "third_party/musl/tempnam.h"

View file

@ -20,7 +20,6 @@
#include "libc/calls/calls.h"
#include "libc/stdio/dprintf.h"
#include "libc/calls/weirdtypes.h"
#include "libc/fmt/fmt.h"
#include "libc/stdio/stdio.h"
#include "libc/temp.h"
#include "third_party/musl/tempnam.h"

View file

@ -36,7 +36,6 @@
#include "libc/calls/calls.h"
#include "libc/stdio/dprintf.h"
#include "libc/calls/weirdtypes.h"
#include "libc/fmt/fmt.h"
#include "libc/stdio/stdio.h"
#include "libc/temp.h"
#include "third_party/musl/tempnam.h"

View file

@ -26,7 +26,6 @@
#include "libc/calls/calls.h"
#include "libc/stdio/dprintf.h"
#include "libc/calls/weirdtypes.h"
#include "libc/fmt/fmt.h"
#include "libc/stdio/stdio.h"
#include "libc/temp.h"
#include "third_party/musl/tempnam.h"

View file

@ -39,7 +39,6 @@
#include "libc/calls/calls.h"
#include "libc/stdio/dprintf.h"
#include "libc/calls/weirdtypes.h"
#include "libc/fmt/fmt.h"
#include "libc/stdio/stdio.h"
#include "libc/temp.h"
#include "third_party/musl/tempnam.h"

View file

@ -22,7 +22,6 @@
#include "libc/calls/calls.h"
#include "libc/stdio/dprintf.h"
#include "libc/calls/weirdtypes.h"
#include "libc/fmt/fmt.h"
#include "libc/stdio/stdio.h"
#include "libc/temp.h"
#include "third_party/musl/tempnam.h"

View file

@ -23,7 +23,6 @@
#include "libc/calls/calls.h"
#include "libc/stdio/dprintf.h"
#include "libc/calls/weirdtypes.h"
#include "libc/fmt/fmt.h"
#include "libc/stdio/stdio.h"
#include "libc/temp.h"
#include "third_party/musl/tempnam.h"

View file

@ -25,7 +25,6 @@
#include "libc/calls/calls.h"
#include "libc/stdio/dprintf.h"
#include "libc/calls/weirdtypes.h"
#include "libc/fmt/fmt.h"
#include "libc/stdio/stdio.h"
#include "libc/temp.h"
#include "third_party/musl/tempnam.h"

View file

@ -37,7 +37,6 @@
#include "libc/calls/struct/termios.h"
#include "libc/calls/struct/winsize.h"
#include "libc/calls/termios.h"
#include "libc/fmt/fmt.h"
#include "libc/stdio/stdio.h"
#include "libc/str/str.h"
#include "libc/sysv/consts/fileno.h"

View file

@ -37,7 +37,6 @@
#include "libc/calls/calls.h"
#include "libc/calls/struct/stat.h"
#include "libc/calls/weirdtypes.h"
#include "libc/fmt/fmt.h"
#include "libc/limits.h"
#include "libc/mem/mem.h"
#include "libc/nt/struct/msg.h"

View file

@ -35,7 +35,6 @@
*/
#include "libc/calls/calls.h"
#include "libc/calls/struct/stat.h"
#include "libc/fmt/fmt.h"
#include "libc/paths.h"
#include "libc/stdio/stdio.h"
#include "libc/str/str.h"

View file

@ -30,7 +30,6 @@
#include "libc/atomic.h"
#include "libc/calls/calls.h"
#include "libc/calls/struct/timespec.h"
#include "libc/fmt/fmt.h"
#include "libc/intrin/atomic.h"
#include "libc/inttypes.h"
#include "libc/literal.h"

View file

@ -3,7 +3,6 @@
#define LLAMA_UTIL_H
#include "libc/calls/struct/rlimit.h"
#include "libc/dce.h"
#include "libc/fmt/fmt.h"
#include "libc/runtime/sysconf.h"
#include "libc/str/str.h"
#include "libc/sysv/consts/madv.h"

View file

@ -31,7 +31,6 @@
#include "libc/calls/struct/sched_param.h"
#include "libc/calls/struct/sigaction.h"
#include "libc/calls/struct/stat.h"
#include "libc/fmt/fmt.h"
#include "libc/intrin/bits.h"
#include "libc/log/log.h"
#include "libc/macros.internal.h"

View file

@ -68,7 +68,6 @@
#include "libc/calls/calls.h"
#include "libc/stdio/dprintf.h"
#include "libc/calls/weirdtypes.h"
#include "libc/fmt/fmt.h"
#include "libc/stdio/stdio.h"
#include "libc/temp.h"
#include "third_party/musl/tempnam.h"

View file

@ -36,7 +36,6 @@
#include "libc/calls/calls.h"
#include "libc/stdio/dprintf.h"
#include "libc/calls/weirdtypes.h"
#include "libc/fmt/fmt.h"
#include "libc/stdio/stdio.h"
#include "libc/temp.h"
#include "third_party/musl/tempnam.h" /* for size_t */

View file

@ -34,7 +34,6 @@
#include "libc/calls/calls.h"
#include "libc/stdio/dprintf.h"
#include "libc/calls/weirdtypes.h"
#include "libc/fmt/fmt.h"
#include "libc/stdio/stdio.h"
#include "libc/temp.h"
#include "third_party/musl/tempnam.h"
@ -1145,7 +1144,6 @@ void sds_free(void *ptr) { s_free(ptr); }
#include "libc/calls/calls.h"
#include "libc/stdio/dprintf.h"
#include "libc/calls/weirdtypes.h"
#include "libc/fmt/fmt.h"
#include "libc/stdio/stdio.h"
#include "libc/temp.h"
#include "third_party/musl/tempnam.h"

View file

@ -15,7 +15,6 @@
#include "third_party/libcxx/stdlib.h"
#include "libc/str/unicode.h"
#include "libc/fmt/fmt.h"
#include "libc/str/locale.h"
#include "third_party/libcxx/memory"
#include "third_party/libcxx/__locale"

View file

@ -102,10 +102,8 @@ void perror(const char* s);
#pragma GCC system_header
#endif
#include "libc/fmt/fmt.h"
#include "libc/calls/calls.h"
#include "libc/temp.h"
#include "libc/fmt/fmt.h"
#include "libc/stdio/stdio.h"
#ifdef __cplusplus

View file

@ -43,7 +43,6 @@
#include "libc/dns/dns.h"
#include "libc/errno.h"
#include "libc/fmt/conv.h"
#include "libc/fmt/fmt.h"
#include "libc/fmt/itoa.h"
#include "libc/fmt/magnumstrs.internal.h"
#include "libc/intrin/atomic.h"
@ -53,6 +52,7 @@
#include "libc/log/log.h"
#include "libc/macros.internal.h"
#include "libc/mem/mem.h"
#include "libc/nt/process.h"
#include "libc/nt/runtime.h"
#include "libc/nt/synchronization.h"
#include "libc/runtime/clktck.h"
@ -2628,7 +2628,8 @@ static int LuaUnixErrnoToString(lua_State *L) {
struct UnixErrno *e;
e = GetUnixErrno(L);
if (e->call) {
strerror_wr(e->errno_, e->winerr, msg, sizeof(msg));
if (IsWindows()) SetLastError(e->winerr);
strerror_r(e->errno_, msg, sizeof(msg));
lua_pushfstring(L, "%s() failed: %s", e->call, msg);
} else {
lua_pushstring(L, _strerrno(e->errno_));

View file

@ -38,7 +38,6 @@ extern "C" {
#include "libc/calls/calls.h"
#include "libc/time/time.h"
#include "libc/errno.h"
#include "libc/fmt/fmt.h"
#include "libc/time/struct/utimbuf.h"
#include "libc/calls/struct/stat.h"
#include "libc/calls/struct/dirent.h"

View file

@ -23,8 +23,6 @@
#include "third_party/make/config.h"
#include "third_party/make/error.h"
#include "libc/stdio/stdio.h"
#include "libc/fmt/fmt.h"
#include "libc/fmt/fmt.h"
#include "libc/str/str.h"
#include "libc/runtime/runtime.h"
#include "third_party/make/stdio.h"

View file

@ -35,7 +35,6 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
#include "libc/elf/struct/ehdr.h"
#include "libc/elf/struct/phdr.h"
#include "libc/fmt/conv.h"
#include "libc/fmt/fmt.h"
#include "libc/fmt/itoa.h"
#include "libc/fmt/libgen.h"
#include "libc/intrin/bits.h"

View file

@ -26,7 +26,6 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
#include "libc/calls/weirdtypes.h"
#include "libc/errno.h"
#include "libc/fmt/conv.h"
#include "libc/fmt/fmt.h"
#include "libc/limits.h"
#include "libc/log/log.h"
#include "libc/macros.internal.h"
@ -35,7 +34,6 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
#include "libc/mem/mem.h"
#include "libc/runtime/stack.h"
#include "libc/stdio/stdio.h"
#include "libc/temp.h"
#include "libc/str/locale.h"
#include "libc/str/str.h"
#include "libc/sysv/consts/f.h"
@ -48,6 +46,7 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
#include "libc/sysv/consts/sa.h"
#include "libc/sysv/consts/sicode.h"
#include "libc/sysv/consts/w.h"
#include "libc/temp.h"
#include "libc/time/struct/tm.h"
#include "libc/time/time.h"
#include "third_party/gdtoa/gdtoa.h"

View file

@ -22,7 +22,6 @@
#include "libc/calls/weirdtypes.h"
#include "libc/errno.h"
#include "libc/fmt/conv.h"
#include "libc/fmt/fmt.h"
#include "libc/intrin/bits.h"
#include "libc/inttypes.h"
#include "libc/limits.h"

View file

@ -16,7 +16,6 @@
limitations under the License.
*/
#include "third_party/mbedtls/error.h"
#include "libc/fmt/fmt.h"
#include "libc/str/str.h"
#include "third_party/mbedtls/aes.h"
#include "third_party/mbedtls/asn1.h"

View file

@ -15,7 +15,6 @@
See the License for the specific language governing permissions and
limitations under the License.
*/
#include "libc/fmt/fmt.h"
#include "libc/str/str.h"
#include "third_party/mbedtls/common.h"
#include "third_party/mbedtls/error.h"

View file

@ -2,7 +2,6 @@
#define COSMOPOLITAN_THIRD_PARTY_MBEDTLS_PLATFORM_H_
#include "libc/assert.h"
#include "libc/calls/calls.h"
#include "libc/fmt/fmt.h"
#include "libc/intrin/likely.h"
#include "libc/mem/mem.h"
#include "libc/runtime/runtime.h"

View file

@ -22,7 +22,6 @@
#include "libc/dce.h"
#include "libc/errno.h"
#include "libc/fmt/conv.h"
#include "libc/fmt/fmt.h"
#include "libc/intrin/bits.h"
#include "libc/intrin/describebacktrace.internal.h"
#include "libc/intrin/safemacros.internal.h"

View file

@ -15,7 +15,6 @@
See the License for the specific language governing permissions and
limitations under the License.
*/
#include "libc/fmt/fmt.h"
#include "libc/mem/mem.h"
#include "libc/stdio/stdio.h"
#include "libc/time/struct/tm.h"

View file

@ -18,7 +18,6 @@
#include "libc/calls/calls.h"
#include "libc/calls/struct/dirent.h"
#include "libc/calls/struct/stat.h"
#include "libc/fmt/fmt.h"
#include "libc/intrin/bits.h"
#include "libc/limits.h"
#include "libc/log/log.h"

View file

@ -28,7 +28,6 @@
#include "libc/mem/alg.h"
#include "libc/calls/calls.h"
#include "libc/fmt/conv.h"
#include "libc/fmt/fmt.h"
#include "libc/limits.h"
#include "libc/literal.h"
#include "libc/mem/mem.h"

View file

@ -28,7 +28,6 @@
#include "libc/mem/alg.h"
#include "libc/calls/calls.h"
#include "libc/fmt/conv.h"
#include "libc/fmt/fmt.h"
#include "libc/limits.h"
#include "libc/literal.h"
#include "libc/mem/mem.h"

View file

@ -27,7 +27,6 @@
*/
#include "libc/calls/calls.h"
#include "libc/errno.h"
#include "libc/fmt/fmt.h"
#include "libc/limits.h"
#include "libc/stdio/stdio.h"
#include "libc/str/str.h"

View file

@ -2921,7 +2921,7 @@ Invalid file name:
>>> print(normalize(err)) # doctest: +ELLIPSIS
Traceback (most recent call last):
...
FileNotFoundError: [Errno 2] ENOENT...
FileNotFoundError: [Errno 2] No such file or directory...
Invalid doctest option:

View file

@ -6,7 +6,6 @@
*/
#include "libc/assert.h"
#include "libc/calls/weirdtypes.h"
#include "libc/fmt/fmt.h"
#include "libc/math.h"
#include "libc/time/struct/tm.h"
#include "third_party/python/Include/abstract.h"

View file

@ -27,7 +27,6 @@
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "libc/fmt/fmt.h"
#include "third_party/python/Include/abstract.h"
#include "third_party/python/Include/boolobject.h"
#include "third_party/python/Include/complexobject.h"

View file

@ -28,7 +28,6 @@
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "libc/errno.h"
#include "libc/fmt/fmt.h"
#include "libc/str/locale.h"
#include "libc/str/unicode.h"
#include "third_party/python/Modules/_decimal/libmpdec/bits.h"

View file

@ -9,7 +9,6 @@
#include "libc/calls/calls.h"
#include "libc/calls/weirdtypes.h"
#include "libc/errno.h"
#include "libc/fmt/fmt.h"
#include "libc/limits.h"
#include "libc/math.h"
#include "libc/mem/mem.h"

View file

@ -5,7 +5,6 @@
https://docs.python.org/3/license.html │
*/
#include "third_party/python/Include/pyexpat.h"
#include "libc/fmt/fmt.h"
#include "third_party/python/Include/abstract.h"
#include "third_party/python/Include/boolobject.h"
#include "third_party/python/Include/bytearrayobject.h"

View file

@ -6,7 +6,6 @@
*/
#define PY_SSIZE_T_CLEAN
#include "third_party/python/Modules/unicodedata.h"
#include "libc/fmt/fmt.h"
#include "libc/nexgen32e/kompressor.h"
#include "third_party/python/Include/floatobject.h"
#include "third_party/python/Include/import.h"

View file

@ -4,7 +4,6 @@
Python 3
https://docs.python.org/3/license.html │
*/
#include "libc/fmt/fmt.h"
#include "third_party/python/Include/pyctype.h"
#include "third_party/python/Include/pyerrors.h"
#include "third_party/python/Include/pymacro.h"

View file

@ -6,7 +6,6 @@
*/
#define PY_SSIZE_T_CLEAN
#include "libc/assert.h"
#include "libc/fmt/fmt.h"
#include "third_party/python/Include/abstract.h"
#include "third_party/python/Include/boolobject.h"
#include "third_party/python/Include/bytearrayobject.h"

View file

@ -7,7 +7,6 @@
#include "libc/assert.h"
#include "libc/calls/calls.h"
#include "libc/dce.h"
#include "libc/fmt/fmt.h"
#include "libc/intrin/asan.internal.h"
#include "libc/intrin/bits.h"
#include "libc/mem/mem.h"

View file

@ -6,7 +6,6 @@
*/
#include "libc/assert.h"
#include "libc/intrin/likely.h"
#include "libc/fmt/fmt.h"
#include "libc/log/countbranch.h"
#include "third_party/python/Include/abstract.h"
#include "third_party/python/Include/boolobject.h"

View file

@ -8,7 +8,6 @@
#include "third_party/python/Include/unicodeobject.h"
#include "libc/assert.h"
#include "libc/errno.h"
#include "libc/fmt/fmt.h"
#include "libc/intrin/likely.h"
#include "libc/intrin/weaken.h"
#include "libc/log/countbranch.h"

View file

@ -7,7 +7,6 @@
#include "third_party/python/Include/ast.h"
#include "libc/assert.h"
#include "libc/errno.h"
#include "libc/fmt/fmt.h"
#include "third_party/python/Include/Python-ast.h"
#include "third_party/python/Include/abstract.h"
#include "third_party/python/Include/boolobject.h"

View file

@ -5,7 +5,6 @@
https://docs.python.org/3/license.html │
*/
#include "libc/assert.h"
#include "libc/fmt/fmt.h"
#include "third_party/python/Include/pyerrors.h"
/* clang-format off */

View file

@ -6,7 +6,6 @@
*/
#include "libc/assert.h"
#include "libc/errno.h"
#include "libc/fmt/fmt.h"
#include "libc/str/locale.h"
#include "third_party/python/Include/dtoa.h"
#include "third_party/python/Include/object.h"

View file

@ -23,7 +23,6 @@
* THE SOFTWARE.
*/
#include "libc/assert.h"
#include "libc/fmt/fmt.h"
#include "libc/str/str.h"
#include "third_party/quickjs/internal.h"
#include "third_party/quickjs/libregexp.h"

View file

@ -22,7 +22,6 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include "libc/fmt/fmt.h"
#include "libc/mem/mem.h"
#include "libc/str/str.h"
#include "third_party/quickjs/cutils.h"

View file

@ -24,7 +24,6 @@
*/
#include "libc/calls/struct/timeval.h"
#include "libc/calls/weirdtypes.h"
#include "libc/fmt/fmt.h"
#include "libc/time/struct/tm.h"
#include "libc/time/time.h"
#include "third_party/quickjs/internal.h"

View file

@ -22,7 +22,6 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include "libc/fmt/fmt.h"
#include "libc/mem/mem.h"
#include "libc/str/str.h"
#include "third_party/quickjs/internal.h"

View file

@ -22,7 +22,6 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include "libc/fmt/fmt.h"
#include "third_party/quickjs/internal.h"
#include "third_party/quickjs/leb128.h"
#include "third_party/quickjs/libregexp.h"

View file

@ -23,7 +23,6 @@
* THE SOFTWARE.
*/
#include "libc/assert.h"
#include "libc/fmt/fmt.h"
#include "libc/str/str.h"
#include "third_party/quickjs/internal.h"
#include "third_party/quickjs/libregexp.h"

View file

@ -23,7 +23,6 @@
*/
#include "libc/assert.h"
#include "libc/intrin/likely.h"
#include "libc/fmt/fmt.h"
#include "libc/limits.h"
#include "libc/mem/alloca.h"
#include "libc/runtime/runtime.h"

View file

@ -23,7 +23,6 @@
* THE SOFTWARE.
*/
#include "libc/assert.h"
#include "libc/fmt/fmt.h"
#include "libc/runtime/runtime.h"
#include "libc/str/str.h"
#include "third_party/quickjs/internal.h"

View file

@ -25,7 +25,6 @@
#include "libc/calls/calls.h"
#include "libc/dce.h"
#include "libc/fmt/conv.h"
#include "libc/fmt/fmt.h"
#include "libc/log/log.h"
#include "libc/mem/gc.h"
#include "libc/mem/mem.h"

View file

@ -33,7 +33,6 @@
#include "libc/calls/termios.h"
#include "libc/errno.h"
#include "libc/fmt/conv.h"
#include "libc/fmt/fmt.h"
#include "libc/limits.h"
#include "libc/mem/mem.h"
#include "libc/nt/synchronization.h"

View file

@ -27,8 +27,6 @@
#include "third_party/quickjs/list.h"
#include "third_party/quickjs/quickjs.h"
#include "libc/assert.h"
#include "libc/fmt/fmt.h"
#include "libc/fmt/fmt.h"
#include "libc/inttypes.h"
#include "libc/mem/alloca.h"
#include "third_party/gdtoa/gdtoa.h"

View file

@ -26,7 +26,6 @@
#include "libc/calls/struct/stat.h"
#include "libc/calls/weirdtypes.h"
#include "libc/fmt/conv.h"
#include "libc/fmt/fmt.h"
#include "libc/log/log.h"
#include "libc/mem/alg.h"
#include "libc/mem/mem.h"

View file

@ -25,7 +25,6 @@
#include "libc/str/str.h"
#include "libc/assert.h"
#include "libc/fmt/conv.h"
#include "libc/fmt/fmt.h"
#include "libc/runtime/fenv.h"
#include "third_party/gdtoa/gdtoa.h"
#include "third_party/quickjs/internal.h"

View file

@ -24,7 +24,6 @@
*/
#include "libc/assert.h"
#include "libc/fmt/conv.h"
#include "libc/fmt/fmt.h"
#include "libc/log/log.h"
#include "libc/mem/alg.h"
#include "libc/mem/mem.h"

View file

@ -62,7 +62,6 @@
#include "libc/sysv/consts/_posix.h"
#include "third_party/regex/regex.h"
#include "libc/calls/calls.h"
#include "libc/fmt/fmt.h"
#include "libc/stdio/stdio.h"
#include "libc/temp.h"
#include "libc/mem/alg.h"

View file

@ -35,7 +35,6 @@
#include "libc/calls/calls.h"
#include "libc/calls/struct/stat.h"
#include "libc/errno.h"
#include "libc/fmt/fmt.h"
#include "libc/fmt/libgen.h"
#include "libc/log/bsd.h"
#include "libc/runtime/runtime.h"

View file

@ -117,7 +117,6 @@ typedef unsigned short int u16;
#include "libc/assert.h"
#include "libc/errno.h"
#include "libc/fmt/fmt.h"
#include "libc/fmt/conv.h"
#include "libc/mem/mem.h"
#include "libc/str/str.h"

View file

@ -122,7 +122,6 @@
#include "dsp/core/core.h"
#include "libc/assert.h"
#include "libc/fmt/conv.h"
#include "libc/fmt/fmt.h"
#include "libc/limits.h"
#include "libc/macros.internal.h"
#include "libc/math.h"

View file

@ -11,7 +11,6 @@
#include "third_party/tidy/message.h"
#include "third_party/tidy/tmbstr.h"
#include "libc/assert.h"
#include "libc/fmt/fmt.h"
#include "third_party/tidy/utf8.h"
#if __GNUC__ >= 11 /* [jart] this one looks legit */

View file

@ -13,7 +13,6 @@
#include "third_party/tidy/entities.h"
#include "third_party/tidy/tidy-int.h"
#include "libc/assert.h"
#include "libc/fmt/fmt.h"
#include "third_party/tidy/tmbstr.h"
struct _entity;

View file

@ -41,7 +41,6 @@
#include "third_party/tidy/utf8.h"
#include "third_party/tidy/streamio.h"
#include "libc/assert.h"
#include "libc/fmt/fmt.h"
#include "third_party/tidy/sprtf.h"
#if defined(ENABLE_DEBUG_LOG)

View file

@ -23,7 +23,6 @@
#include "third_party/tidy/tidy.h"
#include "third_party/tidy/tidybuffio.h"
#include "libc/assert.h"
#include "libc/fmt/fmt.h"
#include "libc/mem/alg.h"
#include "libc/str/str.h"
#include "libc/runtime/runtime.h"

View file

@ -8,7 +8,6 @@
#include "third_party/tidy/forward.h"
#include "third_party/tidy/tmbstr.h"
#include "libc/fmt/fmt.h"
#include "third_party/tidy/lexer.h"
/* like strdup but using an allocator */

View file

@ -30,7 +30,6 @@
#include "libc/errno.h"
#include "third_party/unzip/unzpriv.h"
#include "libc/calls/calls.h"
#include "libc/fmt/fmt.h"
#include "third_party/zip/crypt.h"
#include "libc/mem/mem.h"
#include "libc/runtime/runtime.h"

View file

@ -91,7 +91,6 @@
#include "libc/nt/winsock.h" /* DeviceIoControl, HANDLE, FSCTL_SET_SPARSE */
#include "libc/calls/calls.h"
#include "libc/calls/weirdtypes.h"
#include "libc/fmt/fmt.h"
#include "libc/stdio/dprintf.h"
#include "libc/stdio/stdio.h"
#include "libc/temp.h"

View file

@ -30,7 +30,6 @@
#include "third_party/xxhash/cli/xsum_config.h"
#include "libc/calls/calls.h"
#include "libc/calls/weirdtypes.h"
#include "libc/fmt/fmt.h"
#include "libc/stdio/dprintf.h"
#include "libc/stdio/stdio.h"
#include "libc/temp.h"

View file

@ -56,7 +56,6 @@
#if defined(DEBUG) && (DEBUG >= 1)
#include "libc/calls/calls.h"
#include "libc/calls/weirdtypes.h"
#include "libc/fmt/fmt.h"
#include "libc/stdio/dprintf.h"
#include "libc/stdio/stdio.h"
#include "libc/temp.h"

View file

@ -45,7 +45,6 @@
#include "third_party/musl/rand48.h" /* rand */
#include "libc/calls/calls.h"
#include "libc/calls/weirdtypes.h"
#include "libc/fmt/fmt.h"
#include "libc/stdio/dprintf.h"
#include "libc/stdio/stdio.h"
#include "libc/temp.h"

View file

@ -29,7 +29,6 @@
#include "libc/calls/calls.h"
#include "libc/calls/weirdtypes.h"
#include "libc/fmt/fmt.h"
#include "libc/stdio/dprintf.h"
#include "libc/stdio/stdio.h"
#include "libc/temp.h"

View file

@ -38,7 +38,6 @@
#include "third_party/musl/rand48.h" /* abort */
#include "libc/calls/calls.h"
#include "libc/calls/weirdtypes.h"
#include "libc/fmt/fmt.h"
#include "libc/stdio/dprintf.h"
#include "libc/stdio/stdio.h"
#include "libc/temp.h"
@ -125,7 +124,6 @@ PTime UTIL_getSpanTimeNano(UTIL_time_t clockStart, UTIL_time_t clockEnd)
#include "third_party/musl/rand48.h" /* abort */
#include "libc/calls/calls.h"
#include "libc/calls/weirdtypes.h"
#include "libc/fmt/fmt.h"
#include "libc/stdio/dprintf.h"
#include "libc/stdio/stdio.h"
#include "libc/temp.h"

View file

@ -65,7 +65,6 @@
#include "libc/str/str.h" /* memset */
#include "libc/calls/calls.h"
#include "libc/calls/weirdtypes.h"
#include "libc/fmt/fmt.h"
#include "libc/stdio/dprintf.h"
#include "libc/stdio/stdio.h"
#include "libc/temp.h"

View file

@ -63,7 +63,6 @@ extern "C" {
#include "libc/nt/winsock.h"
#include "libc/calls/calls.h"
#include "libc/calls/weirdtypes.h"
#include "libc/fmt/fmt.h"
#include "libc/stdio/dprintf.h"
#include "libc/stdio/stdio.h"
#include "libc/temp.h"

View file

@ -42,7 +42,6 @@
#define _CRT_SECURE_NO_WARNINGS /* Silence warnings on MSVC */
#include "libc/calls/calls.h"
#include "libc/calls/weirdtypes.h"
#include "libc/fmt/fmt.h"
#include "libc/stdio/dprintf.h"
#include "libc/stdio/stdio.h"
#include "libc/temp.h"

View file

@ -28,7 +28,6 @@
#include "libc/calls/calls.h"
#include "libc/calls/weirdtypes.h"
#include "libc/fmt/fmt.h"
#include "libc/stdio/dprintf.h"
#include "libc/stdio/stdio.h"
#include "libc/temp.h"

View file

@ -200,7 +200,6 @@ extern "C" {
/* debug logging */
#include "libc/calls/calls.h"
#include "libc/calls/weirdtypes.h"
#include "libc/fmt/fmt.h"
#include "libc/stdio/dprintf.h"
#include "libc/stdio/stdio.h"
#include "libc/temp.h"

Some files were not shown because too many files have changed in this diff Show more