mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-11 21:49:12 +00:00
Release Cosmopolitan v3.3
This change upgrades to GCC 12.3 and GNU binutils 2.42. The GNU linker appears to have changed things so that only a single de-duplicated str table is present in the binary, and it gets placed wherever the linker wants, regardless of what the linker script says. To cope with that we need to stop using .ident to embed licenses. As such, this change does significant work to revamp how third party licenses are defined in the codebase, using `.section .notice,"aR",@progbits`. This new GCC 12.3 toolchain has support for GNU indirect functions. It lets us support __target_clones__ for the first time. This is used for optimizing the performance of libc string functions such as strlen and friends so far on x86, by ensuring AVX systems favor a second codepath that uses VEX encoding. It shaves some latency off certain operations. It's a useful feature to have for scientific computing for the reasons explained by the test/libcxx/openmp_test.cc example which compiles for fifteen different microarchitectures. Thanks to the upgrades, it's now also possible to use newer instruction sets, such as AVX512FP16, VNNI. Cosmo now uses the %gs register on x86 by default for TLS. Doing it is helpful for any program that links `cosmo_dlopen()`. Such programs had to recompile their binaries at startup to change the TLS instructions. That's not great, since it means every page in the executable needs to be faulted. The work of rewriting TLS-related x86 opcodes, is moved to fixupobj.com instead. This is great news for MacOS x86 users, since we previously needed to morph the binary every time for that platform but now that's no longer necessary. The only platforms where we need fixup of TLS x86 opcodes at runtime are now Windows, OpenBSD, and NetBSD. On Windows we morph TLS to point deeper into the TIB, based on a TlsAlloc assignment, and on OpenBSD/NetBSD we morph %gs back into %fs since the kernels do not allow us to specify a value for the %gs register. OpenBSD users are now required to use APE Loader to run Cosmo binaries and assimilation is no longer possible. OpenBSD kernel needs to change to allow programs to specify a value for the %gs register, or it needs to stop marking executable pages loaded by the kernel as mimmutable(). This release fixes __constructor__, .ctor, .init_array, and lastly the .preinit_array so they behave the exact same way as glibc. We no longer use hex constants to define math.h symbols like M_PI.
This commit is contained in:
parent
d3ff48c63f
commit
957c61cbbf
736 changed files with 13726 additions and 9445 deletions
6
third_party/musl/crypt.c
vendored
6
third_party/musl/crypt.c
vendored
|
@ -27,11 +27,7 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "third_party/musl/crypt.h"
|
||||
#include "third_party/musl/crypt.internal.h"
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Musl libc (MIT License)\\n\
|
||||
Copyright 2005-2014 Rich Felker, et. al.\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
__static_yoink("musl_libc_notice");
|
||||
|
||||
/**
|
||||
* Encrypts password the old fashioned way.
|
||||
|
|
6
third_party/musl/crypt_blowfish.c
vendored
6
third_party/musl/crypt_blowfish.c
vendored
|
@ -32,11 +32,7 @@
|
|||
#include "libc/mem/gc.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/musl/crypt.internal.h"
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Musl libc (MIT License)\\n\
|
||||
Copyright 2005-2014 Rich Felker, et. al.\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
__static_yoink("musl_libc_notice");
|
||||
|
||||
/* Modified by Rich Felker in for inclusion in musl libc, based on
|
||||
* Solar Designer's second size-optimized version sent to the musl
|
||||
|
|
6
third_party/musl/crypt_des.c
vendored
6
third_party/musl/crypt_des.c
vendored
|
@ -31,14 +31,10 @@
|
|||
#include "libc/str/str.h"
|
||||
#include "third_party/musl/crypt.internal.h"
|
||||
#include "third_party/musl/crypt_des.internal.h"
|
||||
__static_yoink("musl_libc_notice");
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wstringop-overflow"
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Musl libc (MIT License)\\n\
|
||||
Copyright 2005-2014 Rich Felker, et. al.\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
|
||||
/*
|
||||
* This version has been further modified by Rich Felker, primary author
|
||||
* and maintainer of musl libc, to remove table generation code and
|
||||
|
|
6
third_party/musl/crypt_md5.c
vendored
6
third_party/musl/crypt_md5.c
vendored
|
@ -30,14 +30,10 @@
|
|||
#include "libc/literal.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/musl/crypt.internal.h"
|
||||
__static_yoink("musl_libc_notice");
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wmissing-braces"
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Musl libc (MIT License)\\n\
|
||||
Copyright 2005-2014 Rich Felker, et. al.\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
|
||||
/*
|
||||
* md5 crypt implementation
|
||||
*
|
||||
|
|
6
third_party/musl/crypt_r.c
vendored
6
third_party/musl/crypt_r.c
vendored
|
@ -27,11 +27,7 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "third_party/musl/crypt.h"
|
||||
#include "third_party/musl/crypt.internal.h"
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Musl libc (MIT License)\\n\
|
||||
Copyright 2005-2014 Rich Felker, et. al.\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
__static_yoink("musl_libc_notice");
|
||||
|
||||
/**
|
||||
* Encrypts password the old fashioned way.
|
||||
|
|
6
third_party/musl/crypt_sha256.c
vendored
6
third_party/musl/crypt_sha256.c
vendored
|
@ -40,14 +40,10 @@
|
|||
#include "libc/sysv/consts/exit.h"
|
||||
#include "third_party/gdtoa/gdtoa.h"
|
||||
#include "third_party/musl/crypt.internal.h"
|
||||
__static_yoink("musl_libc_notice");
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wmissing-braces"
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Musl libc (MIT License)\\n\
|
||||
Copyright 2005-2014 Rich Felker, et. al.\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
|
||||
/*
|
||||
* public domain sha256 crypt implementation
|
||||
*
|
||||
|
|
6
third_party/musl/crypt_sha512.c
vendored
6
third_party/musl/crypt_sha512.c
vendored
|
@ -40,14 +40,10 @@
|
|||
#include "libc/sysv/consts/exit.h"
|
||||
#include "third_party/gdtoa/gdtoa.h"
|
||||
#include "third_party/musl/crypt.internal.h"
|
||||
__static_yoink("musl_libc_notice");
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wmissing-braces"
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Musl libc (MIT License)\\n\
|
||||
Copyright 2005-2014 Rich Felker, et. al.\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
|
||||
/*
|
||||
* public domain sha512 crypt implementation
|
||||
*
|
||||
|
|
6
third_party/musl/encrypt.c
vendored
6
third_party/musl/encrypt.c
vendored
|
@ -41,11 +41,7 @@
|
|||
#include "libc/sysv/consts/ok.h"
|
||||
#include "third_party/gdtoa/gdtoa.h"
|
||||
#include "third_party/musl/crypt_des.internal.h"
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Musl libc (MIT License)\\n\
|
||||
Copyright 2005-2014 Rich Felker, et. al.\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
__static_yoink("musl_libc_notice");
|
||||
|
||||
static struct expanded_key __encrypt_key;
|
||||
|
||||
|
|
6
third_party/musl/fnmatch.c
vendored
6
third_party/musl/fnmatch.c
vendored
|
@ -28,6 +28,7 @@
|
|||
#include "libc/limits.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/musl/fnmatch.h"
|
||||
__static_yoink("musl_libc_notice");
|
||||
|
||||
/*
|
||||
* An implementation of what I call the "Sea of Stars" algorithm for
|
||||
|
@ -44,11 +45,6 @@
|
|||
* - Rich Felker, April 2012
|
||||
*/
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Musl libc (MIT License)\\n\
|
||||
Copyright 2005-2014 Rich Felker, et. al.\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
|
||||
#define END 0
|
||||
#define UNMATCHABLE -2
|
||||
#define BRACKET -3
|
||||
|
|
6
third_party/musl/forkpty.c
vendored
6
third_party/musl/forkpty.c
vendored
|
@ -35,11 +35,7 @@
|
|||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/errno.h"
|
||||
#include "libc/calls/termios.h"
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Musl libc (MIT License)\\n\
|
||||
Copyright 2005-2014 Rich Felker, et. al.\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
__static_yoink("musl_libc_notice");
|
||||
|
||||
int forkpty(int *pm, char *name, const struct termios *tio, const struct winsize *ws)
|
||||
{
|
||||
|
|
6
third_party/musl/freeaddrinfo.c
vendored
6
third_party/musl/freeaddrinfo.c
vendored
|
@ -29,11 +29,7 @@
|
|||
#include "libc/mem/mem.h"
|
||||
#include "third_party/musl/lookup.internal.h"
|
||||
#include "third_party/musl/netdb.h"
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Musl libc (MIT License)\\n\
|
||||
Copyright 2005-2014 Rich Felker, et. al.\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
__static_yoink("musl_libc_notice");
|
||||
|
||||
void freeaddrinfo(struct addrinfo *p)
|
||||
{
|
||||
|
|
6
third_party/musl/gai_strerror.c
vendored
6
third_party/musl/gai_strerror.c
vendored
|
@ -26,11 +26,7 @@
|
|||
│ │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "third_party/musl/netdb.h"
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Musl libc (MIT License)\\n\
|
||||
Copyright 2005-2014 Rich Felker, et. al.\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
__static_yoink("musl_libc_notice");
|
||||
|
||||
static const char msgs[] =
|
||||
"Invalid flags\0"
|
||||
|
|
6
third_party/musl/getaddrinfo.c
vendored
6
third_party/musl/getaddrinfo.c
vendored
|
@ -40,11 +40,7 @@
|
|||
#include "third_party/musl/lookup.internal.h"
|
||||
#include "libc/intrin/atomic.h"
|
||||
#include "third_party/musl/netdb.h"
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Musl libc (MIT License)\\n\
|
||||
Copyright 2005-2014 Rich Felker, et. al.\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
__static_yoink("musl_libc_notice");
|
||||
|
||||
int getaddrinfo(const char *host,
|
||||
const char *serv,
|
||||
|
|
6
third_party/musl/gethostbyaddr_r.c
vendored
6
third_party/musl/gethostbyaddr_r.c
vendored
|
@ -32,11 +32,7 @@
|
|||
#include "libc/str/str.h"
|
||||
#include "libc/sysv/consts/af.h"
|
||||
#include "third_party/musl/netdb.h"
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Musl libc (MIT License)\\n\
|
||||
Copyright 2005-2014 Rich Felker, et. al.\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
__static_yoink("musl_libc_notice");
|
||||
|
||||
errno_t gethostbyaddr_r(const void *a, socklen_t l, int af,
|
||||
struct hostent *h, char *buf, size_t buflen,
|
||||
|
|
6
third_party/musl/gethostbyname2_r.c
vendored
6
third_party/musl/gethostbyname2_r.c
vendored
|
@ -30,11 +30,7 @@
|
|||
#include "libc/sysv/consts/af.h"
|
||||
#include "third_party/musl/lookup.internal.h"
|
||||
#include "third_party/musl/netdb.h"
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Musl libc (MIT License)\\n\
|
||||
Copyright 2005-2014 Rich Felker, et. al.\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
__static_yoink("musl_libc_notice");
|
||||
|
||||
errno_t gethostbyname2_r(const char *name, int af,
|
||||
struct hostent *h, char *buf, size_t buflen,
|
||||
|
|
6
third_party/musl/getnameinfo.c
vendored
6
third_party/musl/getnameinfo.c
vendored
|
@ -37,11 +37,7 @@
|
|||
#include "third_party/musl/lookup.internal.h"
|
||||
#include "third_party/musl/netdb.h"
|
||||
#include "third_party/musl/resolv.internal.h"
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Musl libc (MIT License)\\n\
|
||||
Copyright 2005-2014 Rich Felker, et. al.\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
__static_yoink("musl_libc_notice");
|
||||
|
||||
#define PTR_MAX (64 + sizeof ".in-addr.arpa")
|
||||
#define RR_PTR 12
|
||||
|
|
6
third_party/musl/getservbyname_r.c
vendored
6
third_party/musl/getservbyname_r.c
vendored
|
@ -32,11 +32,7 @@
|
|||
#include "libc/sysv/consts/ipproto.h"
|
||||
#include "third_party/musl/lookup.internal.h"
|
||||
#include "third_party/musl/netdb.h"
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Musl libc (MIT License)\\n\
|
||||
Copyright 2005-2014 Rich Felker, et. al.\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
__static_yoink("musl_libc_notice");
|
||||
|
||||
#define ALIGN (sizeof(struct { char a; char *b; }) - sizeof(char *))
|
||||
|
||||
|
|
6
third_party/musl/getservbyport_r.c
vendored
6
third_party/musl/getservbyport_r.c
vendored
|
@ -31,11 +31,7 @@
|
|||
#include "libc/str/str.h"
|
||||
#include "libc/sysv/consts/af.h"
|
||||
#include "third_party/musl/netdb.h"
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Musl libc (MIT License)\\n\
|
||||
Copyright 2005-2014 Rich Felker, et. al.\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
__static_yoink("musl_libc_notice");
|
||||
|
||||
errno_t getservbyport_r(int port, const char *prots,
|
||||
struct servent *se, char *buf, size_t buflen, struct servent **res)
|
||||
|
|
6
third_party/musl/getspnam_r.c
vendored
6
third_party/musl/getspnam_r.c
vendored
|
@ -31,11 +31,7 @@
|
|||
#include <ctype.h>
|
||||
#include <pthread.h>
|
||||
#include "pwf.internal.h"
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Musl libc (MIT License)\\n\
|
||||
Copyright 2005-2014 Rich Felker, et. al.\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
__static_yoink("musl_libc_notice");
|
||||
|
||||
/* This implementation support Openwall-style TCB passwords in place of
|
||||
* traditional shadow, if the appropriate directories and files exist.
|
||||
|
|
6
third_party/musl/glob.c
vendored
6
third_party/musl/glob.c
vendored
|
@ -36,14 +36,10 @@
|
|||
#include "libc/sysv/consts/dt.h"
|
||||
#include "libc/sysv/consts/s.h"
|
||||
#include "third_party/musl/fnmatch.h"
|
||||
__static_yoink("musl_libc_notice");
|
||||
|
||||
#define MAXPATH 1024
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Musl libc (MIT License)\\n\
|
||||
Copyright 2005-2014 Rich Felker, et. al.\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
|
||||
struct GlobList {
|
||||
struct GlobList *next;
|
||||
char name[];
|
||||
|
|
6
third_party/musl/grp.c
vendored
6
third_party/musl/grp.c
vendored
|
@ -34,11 +34,7 @@
|
|||
#include "libc/sysv/consts/limits.h"
|
||||
#include "libc/thread/thread.h"
|
||||
#include "third_party/musl/passwd.h"
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Musl libc (MIT License)\\n\
|
||||
Copyright 2005-2014 Rich Felker, et. al.\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
__static_yoink("musl_libc_notice");
|
||||
|
||||
static unsigned atou(char **s) {
|
||||
unsigned x;
|
||||
|
|
6
third_party/musl/hsearch.c
vendored
6
third_party/musl/hsearch.c
vendored
|
@ -28,11 +28,7 @@
|
|||
#include "libc/mem/mem.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/musl/search.h"
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Musl libc (MIT License)\\n\
|
||||
Copyright 2005-2020 Rich Felker, et. al.\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
__static_yoink("musl_libc_notice");
|
||||
|
||||
/*
|
||||
open addressing hash table with 2^n table size
|
||||
|
|
6
third_party/musl/insque.c
vendored
6
third_party/musl/insque.c
vendored
|
@ -26,11 +26,7 @@
|
|||
│ │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "third_party/musl/search.h"
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Musl libc (MIT License)\\n\
|
||||
Copyright 2005-2020 Rich Felker, et. al.\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
__static_yoink("musl_libc_notice");
|
||||
|
||||
struct node {
|
||||
struct node *next;
|
||||
|
|
6
third_party/musl/lockf.c
vendored
6
third_party/musl/lockf.c
vendored
|
@ -32,11 +32,7 @@
|
|||
#include "libc/errno.h"
|
||||
#include "libc/sysv/consts/f.h"
|
||||
#include "libc/sysv/errfuns.h"
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Musl libc (MIT License)\\n\
|
||||
Copyright 2005-2014 Rich Felker, et. al.\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
__static_yoink("musl_libc_notice");
|
||||
|
||||
/**
|
||||
* Locks file.
|
||||
|
|
6
third_party/musl/lookup_ipliteral.c
vendored
6
third_party/musl/lookup_ipliteral.c
vendored
|
@ -32,11 +32,7 @@
|
|||
#include "libc/limits.h"
|
||||
#include "libc/sock/sock.h"
|
||||
#include "third_party/musl/lookup.internal.h"
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Musl libc (MIT License)\\n\
|
||||
Copyright 2005-2014 Rich Felker, et. al.\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
__static_yoink("musl_libc_notice");
|
||||
|
||||
int __lookup_ipliteral(struct address buf[static 1], const char *name, int family)
|
||||
{
|
||||
|
|
6
third_party/musl/lookup_name.c
vendored
6
third_party/musl/lookup_name.c
vendored
|
@ -40,11 +40,7 @@
|
|||
#include "third_party/musl/lookup.internal.h"
|
||||
#include "third_party/musl/netdb.h"
|
||||
#include "third_party/musl/resolv.internal.h"
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Musl libc (MIT License)\\n\
|
||||
Copyright 2005-2014 Rich Felker, et. al.\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
__static_yoink("musl_libc_notice");
|
||||
|
||||
static int is_valid_hostname(const char *host)
|
||||
{
|
||||
|
|
6
third_party/musl/lookup_serv.c
vendored
6
third_party/musl/lookup_serv.c
vendored
|
@ -33,11 +33,7 @@
|
|||
#include "libc/errno.h"
|
||||
#include "libc/calls/sysdir.internal.h"
|
||||
#include "third_party/musl/lookup.internal.h"
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Musl libc (MIT License)\\n\
|
||||
Copyright 2005-2014 Rich Felker, et. al.\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
__static_yoink("musl_libc_notice");
|
||||
|
||||
int __lookup_serv(struct service buf[static MAXSERVS],
|
||||
const char *name,
|
||||
|
|
6
third_party/musl/lsearch.c
vendored
6
third_party/musl/lsearch.c
vendored
|
@ -28,11 +28,7 @@
|
|||
#include "libc/mem/mem.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/musl/search.h"
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Musl libc (MIT License)\\n\
|
||||
Copyright 2005-2020 Rich Felker, et. al.\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
__static_yoink("musl_libc_notice");
|
||||
|
||||
|
||||
void *lsearch(const void *key, void *base, size_t *nelp, size_t width,
|
||||
|
|
6
third_party/musl/mntent.c
vendored
6
third_party/musl/mntent.c
vendored
|
@ -31,11 +31,7 @@
|
|||
#include "libc/stdio/stdio.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/musl/mntent.h"
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Musl libc (MIT License)\\n\
|
||||
Copyright 2005-2014 Rich Felker, et. al.\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
__static_yoink("musl_libc_notice");
|
||||
|
||||
static char *internal_buf;
|
||||
static size_t internal_bufsize;
|
||||
|
|
6
third_party/musl/ns_parse.c
vendored
6
third_party/musl/ns_parse.c
vendored
|
@ -28,11 +28,7 @@
|
|||
#include "libc/errno.h"
|
||||
#include "third_party/musl/resolv.h"
|
||||
#include "third_party/musl/nameser.h"
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Musl libc (MIT License)\\n\
|
||||
Copyright 2005-2014 Rich Felker, et. al.\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
__static_yoink("musl_libc_notice");
|
||||
|
||||
const struct _ns_flagdata _ns_flagdata[16] = {
|
||||
{ 0x8000, 15 },
|
||||
|
|
6
third_party/musl/proto.c
vendored
6
third_party/musl/proto.c
vendored
|
@ -27,11 +27,7 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/musl/netdb.h"
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Musl libc (MIT License)\\n\
|
||||
Copyright 2005-2014 Rich Felker, et. al.\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
__static_yoink("musl_libc_notice");
|
||||
|
||||
/* do we really need all these?? */
|
||||
|
||||
|
|
6
third_party/musl/pwd.c
vendored
6
third_party/musl/pwd.c
vendored
|
@ -38,11 +38,7 @@
|
|||
#include "libc/str/str.h"
|
||||
#include "libc/thread/thread.h"
|
||||
#include "third_party/musl/passwd.h"
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Musl libc (MIT License)\\n\
|
||||
Copyright 2005-2014 Rich Felker, et. al.\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
__static_yoink("musl_libc_notice");
|
||||
|
||||
#ifdef FTRACE
|
||||
// if the default mode debugging tools are enabled, and we're linking
|
||||
|
|
6
third_party/musl/rand48.c
vendored
6
third_party/musl/rand48.c
vendored
|
@ -27,11 +27,7 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "third_party/musl/rand48.h"
|
||||
#include "libc/str/str.h"
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Musl libc (MIT License)\\n\
|
||||
Copyright 2005-2014 Rich Felker, et. al.\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
__static_yoink("musl_libc_notice");
|
||||
|
||||
static unsigned short __seed48[7] = { 0, 0, 0, 0xe66d, 0xdeec, 0x5, 0xb };
|
||||
|
||||
|
|
6
third_party/musl/res_mkquery.c
vendored
6
third_party/musl/res_mkquery.c
vendored
|
@ -29,11 +29,7 @@
|
|||
#include "libc/sysv/consts/clock.h"
|
||||
#include "libc/stdio/rand.h"
|
||||
#include "third_party/musl/resolv.internal.h"
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Musl libc (MIT License)\\n\
|
||||
Copyright 2005-2014 Rich Felker, et. al.\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
__static_yoink("musl_libc_notice");
|
||||
|
||||
int __res_mkquery(int op, const char *dname, int class, int type,
|
||||
const unsigned char *data, int datalen,
|
||||
|
|
6
third_party/musl/res_msend.c
vendored
6
third_party/musl/res_msend.c
vendored
|
@ -45,11 +45,7 @@
|
|||
#include "libc/sysv/consts/tcp.h"
|
||||
#include "libc/thread/thread.h"
|
||||
#include "lookup.internal.h"
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Musl libc (MIT License)\\n\
|
||||
Copyright 2005-2014 Rich Felker, et. al.\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
__static_yoink("musl_libc_notice");
|
||||
|
||||
static void cleanup(void *p)
|
||||
{
|
||||
|
|
6
third_party/musl/res_query.c
vendored
6
third_party/musl/res_query.c
vendored
|
@ -28,11 +28,7 @@
|
|||
#include "third_party/musl/resolv.h"
|
||||
#include "third_party/musl/netdb.h"
|
||||
#include "third_party/musl/resolv.internal.h"
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Musl libc (MIT License)\\n\
|
||||
Copyright 2005-2014 Rich Felker, et. al.\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
__static_yoink("musl_libc_notice");
|
||||
|
||||
int res_query(const char *name, int class, int type, unsigned char *dest, int len)
|
||||
{
|
||||
|
|
6
third_party/musl/res_querydomain.c
vendored
6
third_party/musl/res_querydomain.c
vendored
|
@ -27,11 +27,7 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/musl/resolv.h"
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Musl libc (MIT License)\\n\
|
||||
Copyright 2005-2014 Rich Felker, et. al.\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
__static_yoink("musl_libc_notice");
|
||||
|
||||
int res_querydomain(const char *name, const char *domain, int class, int type, unsigned char *dest, int len)
|
||||
{
|
||||
|
|
6
third_party/musl/res_send.c
vendored
6
third_party/musl/res_send.c
vendored
|
@ -27,11 +27,7 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/musl/resolv.internal.h"
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Musl libc (MIT License)\\n\
|
||||
Copyright 2005-2014 Rich Felker, et. al.\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
__static_yoink("musl_libc_notice");
|
||||
|
||||
int __res_send(const unsigned char *msg, int msglen, unsigned char *answer, int anslen)
|
||||
{
|
||||
|
|
6
third_party/musl/resolvconf.c
vendored
6
third_party/musl/resolvconf.c
vendored
|
@ -38,11 +38,7 @@
|
|||
#include "libc/sysv/consts/af.h"
|
||||
#include "libc/sock/sock.h"
|
||||
#include "third_party/musl/lookup.internal.h"
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Musl libc (MIT License)\\n\
|
||||
Copyright 2005-2014 Rich Felker, et. al.\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
__static_yoink("musl_libc_notice");
|
||||
|
||||
// TODO(jart): ipv6 nameservers on windows
|
||||
// TODO(jart): can we polyfill `search` on windows
|
||||
|
|
6
third_party/musl/strfmon.c
vendored
6
third_party/musl/strfmon.c
vendored
|
@ -30,11 +30,7 @@
|
|||
#include "libc/str/locale.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "libc/thread/tls.h"
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Musl libc (MIT License)\\n\
|
||||
Copyright 2005-2014 Rich Felker, et. al.\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
__static_yoink("musl_libc_notice");
|
||||
|
||||
static ssize_t vstrfmon_l(char *s, size_t n, locale_t loc, const char *fmt, va_list ap)
|
||||
{
|
||||
|
|
6
third_party/musl/tdelete.c
vendored
6
third_party/musl/tdelete.c
vendored
|
@ -27,11 +27,7 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/mem/mem.h"
|
||||
#include "third_party/musl/tsearch.internal.h"
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Musl libc (MIT License)\\n\
|
||||
Copyright 2005-2020 Rich Felker, et. al.\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
__static_yoink("musl_libc_notice");
|
||||
|
||||
|
||||
void *tdelete(const void *restrict key, void **restrict rootp,
|
||||
|
|
6
third_party/musl/tdestroy.c
vendored
6
third_party/musl/tdestroy.c
vendored
|
@ -27,11 +27,7 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/mem/mem.h"
|
||||
#include "third_party/musl/tsearch.internal.h"
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Musl libc (MIT License)\\n\
|
||||
Copyright 2005-2020 Rich Felker, et. al.\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
__static_yoink("musl_libc_notice");
|
||||
|
||||
void tdestroy(void *root, void (*freekey)(void *))
|
||||
{
|
||||
|
|
6
third_party/musl/tempnam.c
vendored
6
third_party/musl/tempnam.c
vendored
|
@ -37,14 +37,10 @@
|
|||
#include "libc/sysv/consts/at.h"
|
||||
#include "libc/sysv/consts/clock.h"
|
||||
#include "libc/time/time.h"
|
||||
__static_yoink("musl_libc_notice");
|
||||
|
||||
#define MAXTRIES 100
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Musl libc (MIT License)\\n\
|
||||
Copyright 2005-2014 Rich Felker, et. al.\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
|
||||
static char *
|
||||
__randname(char *template)
|
||||
{
|
||||
|
|
6
third_party/musl/tfind.c
vendored
6
third_party/musl/tfind.c
vendored
|
@ -26,11 +26,7 @@
|
|||
│ │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "third_party/musl/tsearch.internal.h"
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Musl libc (MIT License)\\n\
|
||||
Copyright 2005-2020 Rich Felker, et. al.\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
__static_yoink("musl_libc_notice");
|
||||
|
||||
void *tfind(const void *key, void *const *rootp,
|
||||
int(*cmp)(const void *, const void *))
|
||||
|
|
6
third_party/musl/tsearch.c
vendored
6
third_party/musl/tsearch.c
vendored
|
@ -28,11 +28,7 @@
|
|||
#include "libc/mem/mem.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/musl/tsearch.internal.h"
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Musl libc (MIT License)\\n\
|
||||
Copyright 2005-2020 Rich Felker, et. al.\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
__static_yoink("musl_libc_notice");
|
||||
|
||||
static inline int height(struct node *n) { return n ? n->h : 0; }
|
||||
|
||||
|
|
6
third_party/musl/twalk.c
vendored
6
third_party/musl/twalk.c
vendored
|
@ -26,11 +26,7 @@
|
|||
│ │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "third_party/musl/tsearch.internal.h"
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Musl libc (MIT License)\\n\
|
||||
Copyright 2005-2020 Rich Felker, et. al.\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
__static_yoink("musl_libc_notice");
|
||||
|
||||
|
||||
static void walk(const struct node *r, void (*action)(const void *, VISIT, int), int d)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue