Add dontthrow attribute to most libc functions

This will help C++ code that uses exceptions to be tinier. For example,
this change shaves away 1000 lines of assembly code from LLVM's libcxx,
which is 0.7% of all assembly instructions in the entire library.
This commit is contained in:
Justine Tunney 2024-01-09 01:26:03 -08:00
parent cb19e172da
commit eeb20775d2
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
103 changed files with 1455 additions and 1456 deletions

View file

@ -14,8 +14,8 @@
#define _ASSERT_H
COSMOPOLITAN_C_START_
void __assert_fail(const char *, const char *, int);
void unassert(const char *, const char *, int);
void __assert_fail(const char *, const char *, int) libcesque;
void unassert(const char *, const char *, int) libcesque;
#ifdef NDEBUG
#define assert(x) ((void)0)

View file

@ -72,184 +72,184 @@ COSMOPOLITAN_C_START_
typedef int sig_atomic_t;
bool32 isatty(int);
char *getcwd(char *, size_t);
char *realpath(const char *, char *) __wur;
char *ttyname(int);
int access(const char *, int) dontthrow;
int chdir(const char *);
int chmod(const char *, unsigned);
int chown(const char *, unsigned, unsigned);
int chroot(const char *);
int close(int);
int close_range(unsigned, unsigned, unsigned);
int closefrom(int);
int creat(const char *, unsigned);
int dup(int);
int dup2(int, int);
int dup3(int, int, int);
int execl(const char *, const char *, ...) nullterminated();
int execle(const char *, const char *, ...) nullterminated((1));
int execlp(const char *, const char *, ...) nullterminated();
int execv(const char *, char *const[]);
int execve(const char *, char *const[], char *const[]);
int execvp(const char *, char *const[]);
int faccessat(int, const char *, int, int);
int fchdir(int);
int fchmod(int, unsigned) dontthrow;
int fchmodat(int, const char *, unsigned, int);
int fchown(int, unsigned, unsigned);
int fchownat(int, const char *, unsigned, unsigned, int);
int fcntl(int, int, ...);
int fdatasync(int);
int fexecve(int, char *const[], char *const[]);
int flock(int, int);
int fork(void);
int fsync(int);
int ftruncate(int, int64_t);
int getdomainname(char *, size_t);
int getgroups(int, unsigned[]);
int gethostname(char *, size_t);
int getloadavg(double *, int);
bool32 isatty(int) libcesque;
char *getcwd(char *, size_t) dontthrow;
char *realpath(const char *, char *) libcesque __wur;
char *ttyname(int) libcesque;
int access(const char *, int) libcesque;
int chdir(const char *) libcesque;
int chmod(const char *, unsigned) libcesque;
int chown(const char *, unsigned, unsigned) libcesque;
int chroot(const char *) libcesque;
int close(int) libcesque;
int close_range(unsigned, unsigned, unsigned) libcesque;
int closefrom(int) libcesque;
int creat(const char *, unsigned) libcesque;
int dup(int) libcesque;
int dup2(int, int) libcesque;
int dup3(int, int, int) libcesque;
int execl(const char *, const char *, ...) nullterminated() libcesque;
int execle(const char *, const char *, ...) nullterminated((1)) libcesque;
int execlp(const char *, const char *, ...) nullterminated() libcesque;
int execv(const char *, char *const[]) libcesque;
int execve(const char *, char *const[], char *const[]) libcesque;
int execvp(const char *, char *const[]) libcesque;
int faccessat(int, const char *, int, int) libcesque;
int fchdir(int) libcesque;
int fchmod(int, unsigned) libcesque;
int fchmodat(int, const char *, unsigned, int) libcesque;
int fchown(int, unsigned, unsigned) libcesque;
int fchownat(int, const char *, unsigned, unsigned, int) libcesque;
int fcntl(int, int, ...) libcesque;
int fdatasync(int) libcesque;
int fexecve(int, char *const[], char *const[]) libcesque;
int flock(int, int) libcesque;
int fork(void) libcesque;
int fsync(int) libcesque;
int ftruncate(int, int64_t) libcesque;
int getdomainname(char *, size_t) libcesque;
int getgroups(int, unsigned[]) libcesque;
int gethostname(char *, size_t) libcesque;
int getloadavg(double *, int) libcesque;
int getpgid(int) libcesque;
int getpgrp(void) nosideeffect;
int getpid(void) nosideeffect libcesque;
int getppid(void);
int getpriority(int, unsigned);
int getpgrp(void) libcesque nosideeffect;
int getpid(void) libcesque nosideeffect;
int getppid(void) libcesque;
int getpriority(int, unsigned) libcesque;
int getsid(int) nosideeffect libcesque;
int ioctl(int, unsigned long, ...);
int issetugid(void);
int kill(int, int);
int killpg(int, int);
int lchmod(const char *, unsigned);
int lchown(const char *, unsigned, unsigned);
int link(const char *, const char *) dontthrow;
int linkat(int, const char *, int, const char *, int);
int mincore(void *, size_t, unsigned char *);
int mkdir(const char *, unsigned);
int mkdirat(int, const char *, unsigned);
int mknod(const char *, unsigned, uint64_t);
int nice(int);
int open(const char *, int, ...);
int openat(int, const char *, int, ...);
int pause(void);
int pipe(int[hasatleast 2]);
int pipe2(int[hasatleast 2], int);
int posix_fadvise(int, int64_t, int64_t, int);
int posix_madvise(void *, uint64_t, int);
int raise(int);
int reboot(int);
int remove(const char *);
int rename(const char *, const char *);
int renameat(int, const char *, int, const char *);
int rmdir(const char *);
int sched_yield(void);
int setegid(unsigned);
int seteuid(unsigned);
int setfsgid(unsigned);
int setfsuid(unsigned);
int setgid(unsigned);
int setgroups(size_t, const unsigned[]);
int setpgid(int, int);
int setpgrp(void);
int setpriority(int, unsigned, int);
int setregid(unsigned, unsigned);
int setreuid(unsigned, unsigned);
int setsid(void);
int setuid(unsigned);
int shm_open(const char *, int, unsigned);
int shm_unlink(const char *);
int sigignore(int);
int siginterrupt(int, int);
int symlink(const char *, const char *);
int symlinkat(const char *, int, const char *);
int tcgetpgrp(int);
int tcsetpgrp(int, int);
int truncate(const char *, int64_t);
int ttyname_r(int, char *, size_t);
int unlink(const char *);
int unlinkat(int, const char *, int);
int usleep(uint64_t);
int vfork(void) returnstwice;
int wait(int *);
int waitpid(int, int *, int);
int64_t clock(void);
int64_t time(int64_t *);
ssize_t copy_file_range(int, long *, int, long *, size_t, unsigned);
ssize_t lseek(int, int64_t, int);
ssize_t pread(int, void *, size_t, int64_t);
ssize_t pwrite(int, const void *, size_t, int64_t);
ssize_t read(int, void *, size_t);
ssize_t readlink(const char *, char *, size_t);
ssize_t readlinkat(int, const char *, char *, size_t);
ssize_t write(int, const void *, size_t);
unsigned alarm(unsigned);
unsigned getegid(void) nosideeffect;
unsigned geteuid(void) nosideeffect;
unsigned getgid(void) nosideeffect;
int ioctl(int, unsigned long, ...) libcesque;
int issetugid(void) libcesque;
int kill(int, int) libcesque;
int killpg(int, int) libcesque;
int lchmod(const char *, unsigned) libcesque;
int lchown(const char *, unsigned, unsigned) libcesque;
int link(const char *, const char *) libcesque;
int linkat(int, const char *, int, const char *, int) libcesque;
int mincore(void *, size_t, unsigned char *) libcesque;
int mkdir(const char *, unsigned) libcesque;
int mkdirat(int, const char *, unsigned) libcesque;
int mknod(const char *, unsigned, uint64_t) libcesque;
int nice(int) libcesque;
int open(const char *, int, ...) libcesque;
int openat(int, const char *, int, ...) libcesque;
int pause(void) libcesque;
int pipe(int[hasatleast 2]) libcesque;
int pipe2(int[hasatleast 2], int) libcesque;
int posix_fadvise(int, int64_t, int64_t, int) libcesque;
int posix_madvise(void *, uint64_t, int) libcesque;
int raise(int) libcesque;
int reboot(int) libcesque;
int remove(const char *) libcesque;
int rename(const char *, const char *) libcesque;
int renameat(int, const char *, int, const char *) libcesque;
int rmdir(const char *) libcesque;
int sched_yield(void) libcesque;
int setegid(unsigned) libcesque;
int seteuid(unsigned) libcesque;
int setfsgid(unsigned) libcesque;
int setfsuid(unsigned) libcesque;
int setgid(unsigned) libcesque;
int setgroups(size_t, const unsigned[]) libcesque;
int setpgid(int, int) libcesque;
int setpgrp(void) libcesque;
int setpriority(int, unsigned, int) libcesque;
int setregid(unsigned, unsigned) libcesque;
int setreuid(unsigned, unsigned) libcesque;
int setsid(void) libcesque;
int setuid(unsigned) libcesque;
int shm_open(const char *, int, unsigned) libcesque;
int shm_unlink(const char *) libcesque;
int sigignore(int) libcesque;
int siginterrupt(int, int) libcesque;
int symlink(const char *, const char *) libcesque;
int symlinkat(const char *, int, const char *) libcesque;
int tcgetpgrp(int) libcesque;
int tcsetpgrp(int, int) libcesque;
int truncate(const char *, int64_t) libcesque;
int ttyname_r(int, char *, size_t) libcesque;
int unlink(const char *) libcesque;
int unlinkat(int, const char *, int) libcesque;
int usleep(uint64_t) libcesque;
int vfork(void) libcesque returnstwice;
int wait(int *) libcesque;
int waitpid(int, int *, int) libcesque;
int64_t clock(void) libcesque;
int64_t time(int64_t *) libcesque;
ssize_t copy_file_range(int, long *, int, long *, size_t, unsigned) libcesque;
ssize_t lseek(int, int64_t, int) libcesque;
ssize_t pread(int, void *, size_t, int64_t) libcesque;
ssize_t pwrite(int, const void *, size_t, int64_t) libcesque;
ssize_t read(int, void *, size_t) libcesque;
ssize_t readlink(const char *, char *, size_t) libcesque;
ssize_t readlinkat(int, const char *, char *, size_t) libcesque;
ssize_t write(int, const void *, size_t) libcesque;
unsigned alarm(unsigned) libcesque;
unsigned getegid(void) libcesque nosideeffect;
unsigned geteuid(void) libcesque nosideeffect;
unsigned getgid(void) libcesque nosideeffect;
unsigned getuid(void) libcesque;
unsigned sleep(unsigned);
unsigned ualarm(unsigned, unsigned);
unsigned umask(unsigned);
void sync(void);
unsigned sleep(unsigned) libcesque;
unsigned ualarm(unsigned, unsigned) libcesque;
unsigned umask(unsigned) libcesque;
void sync(void) libcesque;
#if defined(_COSMO_SOURCE) || defined(_GNU_SOURCE)
int syncfs(int);
int prctl(int, ...);
int syncfs(int) libcesque;
int prctl(int, ...) libcesque;
int gettid(void) libcesque;
int setresgid(unsigned, unsigned, unsigned);
int setresuid(unsigned, unsigned, unsigned);
int getresgid(unsigned *, unsigned *, unsigned *);
int getresuid(unsigned *, unsigned *, unsigned *);
char *get_current_dir_name(void) __wur;
ssize_t splice(int, int64_t *, int, int64_t *, size_t, unsigned);
int memfd_create(const char *, unsigned int);
int execvpe(const char *, char *const[], char *const[]);
int euidaccess(const char *, int);
int eaccess(const char *, int);
int madvise(void *, uint64_t, int);
int setresgid(unsigned, unsigned, unsigned) libcesque;
int setresuid(unsigned, unsigned, unsigned) libcesque;
int getresgid(unsigned *, unsigned *, unsigned *) libcesque;
int getresuid(unsigned *, unsigned *, unsigned *) libcesque;
char *get_current_dir_name(void) libcesque __wur;
ssize_t splice(int, int64_t *, int, int64_t *, size_t, unsigned) libcesque;
int memfd_create(const char *, unsigned int) libcesque;
int execvpe(const char *, char *const[], char *const[]) libcesque;
int euidaccess(const char *, int) libcesque;
int eaccess(const char *, int) libcesque;
int madvise(void *, uint64_t, int) libcesque;
#endif
#ifdef _COSMO_SOURCE
bool32 fdexists(int);
bool32 fileexists(const char *);
bool32 ischardev(int);
bool32 isdirectory(const char *);
bool32 isexecutable(const char *);
bool32 isregularfile(const char *);
bool32 issymlink(const char *);
char *commandv(const char *, char *, size_t);
int __getcwd(char *, size_t);
bool32 fdexists(int) libcesque;
bool32 fileexists(const char *) libcesque;
bool32 ischardev(int) libcesque;
bool32 isdirectory(const char *) libcesque;
bool32 isexecutable(const char *) libcesque;
bool32 isregularfile(const char *) libcesque;
bool32 issymlink(const char *) libcesque;
char *commandv(const char *, char *, size_t) libcesque;
int __getcwd(char *, size_t) libcesque;
int clone(void *, void *, size_t, int, void *, void *, void *, void *);
int fadvise(int, uint64_t, uint64_t, int);
int makedirs(const char *, unsigned);
int pivot_root(const char *, const char *);
int pledge(const char *, const char *);
int seccomp(unsigned, unsigned, void *);
int sys_iopl(int);
int sys_ioprio_get(int, int);
int sys_ioprio_set(int, int, int);
int sys_mlock(const void *, size_t);
int sys_mlock2(const void *, size_t, int);
int sys_mlockall(int);
int sys_munlock(const void *, size_t);
int sys_munlockall(void);
int sys_personality(uint64_t);
int sys_ptrace(int, ...);
int fadvise(int, uint64_t, uint64_t, int) libcesque;
int makedirs(const char *, unsigned) libcesque;
int pivot_root(const char *, const char *) libcesque;
int pledge(const char *, const char *) libcesque;
int seccomp(unsigned, unsigned, void *) libcesque;
int sys_iopl(int) libcesque;
int sys_ioprio_get(int, int) libcesque;
int sys_ioprio_set(int, int, int) libcesque;
int sys_mlock(const void *, size_t) libcesque;
int sys_mlock2(const void *, size_t, int) libcesque;
int sys_mlockall(int) libcesque;
int sys_munlock(const void *, size_t) libcesque;
int sys_munlockall(void) libcesque;
int sys_personality(uint64_t) libcesque;
int sys_ptrace(int, ...) libcesque;
int sys_sysctl(const int *, unsigned, void *, size_t *, void *, size_t);
int tmpfd(void);
int touch(const char *, unsigned);
int unveil(const char *, const char *);
long ptrace(int, ...);
ssize_t copyfd(int, int, size_t);
ssize_t readansi(int, char *, size_t);
ssize_t tinyprint(int, const char *, ...) nullterminated();
void shm_path_np(const char *, char[hasatleast 78]);
int tmpfd(void) libcesque;
int touch(const char *, unsigned) libcesque;
int unveil(const char *, const char *) libcesque;
long ptrace(int, ...) libcesque;
ssize_t copyfd(int, int, size_t) libcesque;
ssize_t readansi(int, char *, size_t) libcesque;
ssize_t tinyprint(int, const char *, ...) libcesque nullterminated();
void shm_path_np(const char *, char[hasatleast 78]) libcesque;
#endif /* _COSMO_SOURCE */
int __wifstopped(int) pureconst;
int __wifcontinued(int) pureconst;
int __wifsignaled(int) pureconst;
int __wifstopped(int) libcesque pureconst;
int __wifcontinued(int) libcesque pureconst;
int __wifsignaled(int) libcesque pureconst;
#if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE)
#define lseek64 lseek

View file

@ -66,4 +66,4 @@ int fadvise(int fd, uint64_t offset, uint64_t len, int advice) {
return rc;
}
__strong_reference(fadvise, fadvise64);
__weak_reference(fadvise, fadvise64);

View file

@ -60,4 +60,4 @@ int fstat(int fd, struct stat *st) {
return rc;
}
__strong_reference(fstat, fstat64);
__weak_reference(fstat, fstat64);

View file

@ -102,4 +102,4 @@ int fstatat(int dirfd, const char *path, struct stat *st, int flags) {
return rc;
}
__strong_reference(fstatat, fstatat64);
__weak_reference(fstatat, fstatat64);

View file

@ -87,4 +87,4 @@ int ftruncate(int fd, int64_t length) {
return rc;
}
__strong_reference(ftruncate, ftruncate64);
__weak_reference(ftruncate, ftruncate64);

View file

@ -12,7 +12,7 @@
COSMOPOLITAN_C_START_
int ftok(const char *, int);
int ftok(const char *, int) libcesque;
COSMOPOLITAN_C_END_
#endif /* COSMOPOLITAN_LIBC_CALLS_IPC_H_ */

View file

@ -93,4 +93,4 @@ int64_t lseek(int fd, int64_t offset, int whence) {
return rc;
}
__strong_reference(lseek, lseek64);
__weak_reference(lseek, lseek64);

View file

@ -27,4 +27,4 @@ int lstat(const char *pathname, struct stat *st) {
return fstatat(AT_FDCWD, pathname, st, AT_SYMLINK_NOFOLLOW);
}
__strong_reference(lstat, lstat64);
__weak_reference(lstat, lstat64);

View file

@ -1,9 +1,9 @@
#ifndef COSMOPOLITAN_LIBC_CALLS_MAKEDEV_H_
#define COSMOPOLITAN_LIBC_CALLS_MAKEDEV_H_
uint64_t makedev(uint32_t, uint32_t);
uint32_t major(uint64_t);
uint32_t minor(uint64_t);
uint64_t makedev(uint32_t, uint32_t) libcesque;
uint32_t major(uint64_t) libcesque;
uint32_t minor(uint64_t) libcesque;
#define major(x) major(x)
#define minor(x) minor(x)

View file

@ -40,4 +40,4 @@ int mkostemp(char *template, unsigned flags) {
return openatemp(AT_FDCWD, template, 0, flags, 0);
}
__strong_reference(mkostemp, mkostemp64);
__weak_reference(mkostemp, mkostemp64);

View file

@ -41,4 +41,4 @@ int mkostemps(char *template, int suffixlen, unsigned flags) {
return openatemp(AT_FDCWD, template, suffixlen, flags, 0);
}
__strong_reference(mkostemps, mkostemps64);
__weak_reference(mkostemps, mkostemps64);

View file

@ -40,4 +40,4 @@ int mkstemp(char *template) {
return openatemp(AT_FDCWD, template, 0, 0, 0);
}
__strong_reference(mkstemp, mkstemp64);
__weak_reference(mkstemp, mkstemp64);

View file

@ -42,4 +42,4 @@ int mkstemps(char *template, int suffixlen) {
return openatemp(AT_FDCWD, template, suffixlen, 0, 0);
}
__strong_reference(mkstemps, mkstemps64);
__weak_reference(mkstemps, mkstemps64);

View file

@ -43,4 +43,4 @@ int open(const char *file, int flags, ...) {
return openat(AT_FDCWD, file, flags, mode);
}
__strong_reference(open, open64);
__weak_reference(open, open64);

View file

@ -241,4 +241,4 @@ int openat(int dirfd, const char *path, int flags, ...) {
return rc;
}
__strong_reference(openat, openat64);
__weak_reference(openat, openat64);

View file

@ -85,4 +85,4 @@ ssize_t pread(int fd, void *buf, size_t size, int64_t offset) {
return rc;
}
__strong_reference(pread, pread64);
__weak_reference(pread, pread64);

View file

@ -85,4 +85,4 @@ ssize_t pwrite(int fd, const void *buf, size_t size, int64_t offset) {
return rc;
}
__strong_reference(pwrite, pwrite64);
__weak_reference(pwrite, pwrite64);

View file

@ -34,4 +34,4 @@ int stat(const char *path, struct stat *st) {
return fstatat(AT_FDCWD, path, st, 0);
}
__strong_reference(stat, stat64);
__weak_reference(stat, stat64);

View file

@ -36,4 +36,4 @@ int statvfs(const char *path, struct statvfs *sv) {
}
}
__strong_reference(statvfs, statvfs64);
__weak_reference(statvfs, statvfs64);

View file

@ -9,33 +9,33 @@ typedef struct cpu_set_t {
uint64_t __bits[16];
} cpu_set_t;
int sched_getcpu(void);
int sched_getaffinity(int, size_t, cpu_set_t *);
int sched_setaffinity(int, size_t, const cpu_set_t *);
int sched_getcpu(void) libcesque;
int sched_getaffinity(int, size_t, cpu_set_t *) libcesque;
int sched_setaffinity(int, size_t, const cpu_set_t *) libcesque;
#define CPU_SET(i, s) ((s)->__bits[(i) / 64] |= 1ull << ((i) % 64))
#define CPU_CLR(i, s) ((s)->__bits[(i) / 64] &= ~(1ull << ((i) % 64)))
#define CPU_ISSET(i, s) (!!((s)->__bits[(i) / 64] & (1ull << ((i) % 64))))
void CPU_ZERO(cpu_set_t *);
void CPU_ZERO(cpu_set_t *) libcesque;
#define CPU_ZERO(x) CPU_ZERO(x)
int CPU_COUNT(cpu_set_t *);
int CPU_COUNT(cpu_set_t *) libcesque;
#define CPU_COUNT(x) CPU_COUNT(x)
int CPU_EQUAL(cpu_set_t *, cpu_set_t *);
int CPU_EQUAL(cpu_set_t *, cpu_set_t *) libcesque;
#define CPU_EQUAL(x, y) CPU_EQUAL(x, y)
void CPU_AND(cpu_set_t *, cpu_set_t *, cpu_set_t *);
void CPU_AND(cpu_set_t *, cpu_set_t *, cpu_set_t *) libcesque;
#define CPU_AND(x, y, z) CPU_AND(x, y, z)
void CPU_OR(cpu_set_t *, cpu_set_t *, cpu_set_t *);
void CPU_OR(cpu_set_t *, cpu_set_t *, cpu_set_t *) libcesque;
#define CPU_OR(x, y, z) CPU_OR(x, y, z)
void CPU_XOR(cpu_set_t *, cpu_set_t *, cpu_set_t *);
void CPU_XOR(cpu_set_t *, cpu_set_t *, cpu_set_t *) libcesque;
#define CPU_XOR(x, y, z) CPU_XOR(x, y, z)
int CPU_COUNT_S(size_t, const cpu_set_t *);
int CPU_COUNT_S(size_t, const cpu_set_t *) libcesque;
#define CPU_COUNT_S(x, y) CPU_COUNT_S(x, y)
#define CPU_ALLOC_SIZE(n) \

View file

@ -13,19 +13,19 @@ struct dirent { /* linux getdents64 abi */
struct dirstream;
typedef struct dirstream DIR;
DIR *fdopendir(int) __wur;
DIR *opendir(const char *) __wur;
int closedir(DIR *);
int dirfd(DIR *);
long telldir(DIR *);
struct dirent *readdir(DIR *);
int readdir_r(DIR *, struct dirent *, struct dirent **);
void rewinddir(DIR *);
void seekdir(DIR *, long);
int alphasort(const struct dirent **, const struct dirent **);
int versionsort(const struct dirent **, const struct dirent **);
DIR *fdopendir(int) libcesque __wur;
DIR *opendir(const char *) libcesque __wur;
int closedir(DIR *) libcesque;
int dirfd(DIR *) libcesque;
long telldir(DIR *) libcesque;
struct dirent *readdir(DIR *) libcesque;
int readdir_r(DIR *, struct dirent *, struct dirent **) libcesque;
void rewinddir(DIR *) libcesque;
void seekdir(DIR *, long) libcesque;
int alphasort(const struct dirent **, const struct dirent **) libcesque;
int versionsort(const struct dirent **, const struct dirent **) libcesque;
int scandir(const char *, struct dirent ***, int (*)(const struct dirent *),
int (*)(const struct dirent **, const struct dirent **));
int (*)(const struct dirent **, const struct dirent **)) libcesque;
COSMOPOLITAN_C_END_
#endif /* COSMOPOLITAN_LIBC_CALLS_STRUCT_DIRENT_H_ */

View file

@ -7,11 +7,11 @@ struct iovec {
size_t iov_len;
};
ssize_t preadv(int, struct iovec *, int, int64_t);
ssize_t pwritev(int, const struct iovec *, int, int64_t);
ssize_t readv(int, const struct iovec *, int);
ssize_t vmsplice(int, const struct iovec *, int64_t, uint32_t);
ssize_t writev(int, const struct iovec *, int);
ssize_t preadv(int, struct iovec *, int, int64_t) libcesque;
ssize_t pwritev(int, const struct iovec *, int, int64_t) libcesque;
ssize_t readv(int, const struct iovec *, int) libcesque;
ssize_t vmsplice(int, const struct iovec *, int64_t, uint32_t) libcesque;
ssize_t writev(int, const struct iovec *, int) libcesque;
COSMOPOLITAN_C_END_
#endif /* COSMOPOLITAN_LIBC_CALLS_STRUCT_IOVEC_H_ */

View file

@ -7,8 +7,8 @@ struct rlimit {
uint64_t rlim_max; /* maximum limit in bytes */
};
int getrlimit(int, struct rlimit *);
int setrlimit(int, const struct rlimit *);
int getrlimit(int, struct rlimit *) libcesque;
int setrlimit(int, const struct rlimit *) libcesque;
COSMOPOLITAN_C_END_
#endif /* COSMOPOLITAN_LIBC_CALLS_STRUCT_RLIMIT_H_ */

View file

@ -22,10 +22,10 @@ struct rusage {
int64_t ru_nivcsw; /* involuntary context switches */
};
int getrusage(int, struct rusage *);
int wait3(int *, int, struct rusage *);
int wait4(int, int *, int, struct rusage *);
void rusage_add(struct rusage *, const struct rusage *);
int getrusage(int, struct rusage *) libcesque;
int wait3(int *, int, struct rusage *) libcesque;
int wait4(int, int *, int, struct rusage *) libcesque;
void rusage_add(struct rusage *, const struct rusage *) libcesque;
COSMOPOLITAN_C_END_
#endif /* COSMOPOLITAN_LIBC_CALLS_STRUCT_RUSAGE_H_ */

View file

@ -7,13 +7,13 @@ struct sched_param {
int32_t sched_priority;
};
int sched_get_priority_max(int);
int sched_get_priority_min(int);
int sched_getparam(int, struct sched_param *);
int sched_getscheduler(int);
int sched_rr_get_interval(int, struct timespec *);
int sched_setparam(int, const struct sched_param *);
int sched_setscheduler(int, int, const struct sched_param *);
int sched_get_priority_max(int) libcesque;
int sched_get_priority_min(int) libcesque;
int sched_getparam(int, struct sched_param *) libcesque;
int sched_getscheduler(int) libcesque;
int sched_rr_get_interval(int, struct timespec *) libcesque;
int sched_setparam(int, const struct sched_param *) libcesque;
int sched_setscheduler(int, int, const struct sched_param *) libcesque;
COSMOPOLITAN_C_END_
#endif /* COSMOPOLITAN_LIBC_CALLS_STRUCT_SCHED_PARAM_H_ */

View file

@ -17,8 +17,8 @@ struct sigaction {
sigset_t sa_mask;
};
sighandler_t signal(int, sighandler_t);
int sigaction(int, const struct sigaction *, struct sigaction *);
sighandler_t signal(int, sighandler_t) libcesque;
int sigaction(int, const struct sigaction *, struct sigaction *) libcesque;
COSMOPOLITAN_C_END_
#endif /* COSMOPOLITAN_LIBC_CALLS_STRUCT_SIGACTION_H_ */

View file

@ -10,7 +10,7 @@ struct sigaltstack {
typedef struct sigaltstack stack_t;
int sigaltstack(const struct sigaltstack *, struct sigaltstack *);
int sigaltstack(const struct sigaltstack *, struct sigaltstack *) libcesque;
COSMOPOLITAN_C_END_
#endif /* COSMOPOLITAN_LIBC_CALLS_STRUCT_SIGALTSTACK_H_ */

View file

@ -57,8 +57,8 @@ struct siginfo {
typedef struct siginfo siginfo_t;
#ifdef _COSMO_SOURCE
void __minicrash(int, siginfo_t *, void *);
char __is_stack_overflow(siginfo_t *, void *);
void __minicrash(int, siginfo_t *, void *) libcesque;
char __is_stack_overflow(siginfo_t *, void *) libcesque;
#endif
COSMOPOLITAN_C_END_

View file

@ -20,8 +20,8 @@ struct statfs { /* cosmo abi */
char f_fstypename[16];
};
int statfs(const char *, struct statfs *);
int fstatfs(int, struct statfs *);
int statfs(const char *, struct statfs *) libcesque;
int fstatfs(int, struct statfs *) libcesque;
COSMOPOLITAN_C_END_
#endif /* COSMOPOLITAN_LIBC_CALLS_STRUCT_STATFS_H_ */

View file

@ -19,7 +19,7 @@ struct sysinfo {
uint32_t mem_unit; /* ram stuff above is multiples of this */
};
int sysinfo(struct sysinfo *);
int sysinfo(struct sysinfo *) libcesque;
COSMOPOLITAN_C_END_
#endif /* COSMOPOLITAN_LIBC_CALLS_STRUCT_SYSINFO_H_ */

View file

@ -8,35 +8,38 @@ struct timespec {
int64_t tv_nsec; /* nanoseconds */
};
int clock_getres(int, struct timespec *);
int clock_gettime(int, struct timespec *);
int clock_settime(int, const struct timespec *);
int clock_getres(int, struct timespec *) libcesque;
int clock_gettime(int, struct timespec *) libcesque;
int clock_settime(int, const struct timespec *) libcesque;
int clock_nanosleep(int, int, const struct timespec *, struct timespec *);
int futimens(int, const struct timespec[2]);
int nanosleep(const struct timespec *, struct timespec *);
int utimensat(int, const char *, const struct timespec[2], int);
int timespec_getres(struct timespec *, int);
int timespec_get(struct timespec *, int);
int futimens(int, const struct timespec[2]) libcesque;
int nanosleep(const struct timespec *, struct timespec *) libcesque;
int utimensat(int, const char *, const struct timespec[2], int) libcesque;
int timespec_getres(struct timespec *, int) libcesque;
int timespec_get(struct timespec *, int) libcesque;
#ifdef _COSMO_SOURCE
/* cosmopolitan libc's non-posix timespec library
removed by default due to emacs codebase clash */
#define timespec_zero ((struct timespec){0})
#define timespec_max ((struct timespec){0x7fffffffffffffff, 999999999})
int timespec_cmp(struct timespec, struct timespec) pureconst;
int64_t timespec_tomicros(struct timespec) pureconst;
int64_t timespec_tomillis(struct timespec) pureconst;
int64_t timespec_tonanos(struct timespec) pureconst;
struct timespec timespec_add(struct timespec, struct timespec) pureconst;
struct timespec timespec_fromnanos(int64_t) pureconst;
struct timespec timespec_frommicros(int64_t) pureconst;
struct timespec timespec_frommillis(int64_t) pureconst;
struct timespec timespec_real(void);
struct timespec timespec_mono(void);
struct timespec timespec_sleep(struct timespec);
int timespec_sleep_until(struct timespec);
struct timespec timespec_sub(struct timespec, struct timespec) pureconst;
struct timespec timespec_subz(struct timespec, struct timespec) pureconst;
libcesque int timespec_cmp(struct timespec, struct timespec) pureconst;
libcesque int64_t timespec_tomicros(struct timespec) pureconst;
libcesque int64_t timespec_tomillis(struct timespec) pureconst;
libcesque int64_t timespec_tonanos(struct timespec) pureconst;
libcesque struct timespec timespec_add(struct timespec,
struct timespec) pureconst;
libcesque struct timespec timespec_fromnanos(int64_t) pureconst;
libcesque struct timespec timespec_frommicros(int64_t) pureconst;
libcesque struct timespec timespec_frommillis(int64_t) pureconst;
libcesque struct timespec timespec_real(void) libcesque;
libcesque struct timespec timespec_mono(void) libcesque;
libcesque struct timespec timespec_sleep(struct timespec) libcesque;
libcesque int timespec_sleep_until(struct timespec) libcesque;
libcesque struct timespec timespec_sub(struct timespec,
struct timespec) pureconst;
libcesque struct timespec timespec_subz(struct timespec,
struct timespec) pureconst;
int sys_futex(int *, int, int, const struct timespec *, int *);
static inline struct timespec timespec_fromseconds(int64_t __x) {
return (struct timespec){__x};

View file

@ -9,7 +9,7 @@ struct tms {
int64_t tms_cstime; /* children kernelspace time */
};
long times(struct tms *);
long times(struct tms *) libcesque;
COSMOPOLITAN_C_END_
#endif /* COSMOPOLITAN_LIBC_CALLS_STRUCT_TMS_H_ */

View file

@ -14,7 +14,7 @@ struct utsname { /* cosmo abi */
char domainname[SYS_NMLN]; /* domain name */
};
int uname(struct utsname *);
int uname(struct utsname *) libcesque;
COSMOPOLITAN_C_END_
#endif /* COSMOPOLITAN_LIBC_CALLS_STRUCT_UTSNAME_H_ */

View file

@ -8,34 +8,34 @@ COSMOPOLITAN_C_START_
cosmopolitan § teletypewriter control
*/
int tcgetattr(int, struct termios *);
int tcsetattr(int, int, const struct termios *);
int tcgetattr(int, struct termios *) libcesque;
int tcsetattr(int, int, const struct termios *) libcesque;
int openpty(int *, int *, char *, const struct termios *,
const struct winsize *) paramsnonnull((1, 2));
int forkpty(int *, char *, const struct termios *, const struct winsize *)
paramsnonnull((1, 2)) __wur;
char *ptsname(int);
errno_t ptsname_r(int, char *, size_t);
const struct winsize *) libcesque paramsnonnull((1, 2));
int forkpty(int *, char *, const struct termios *,
const struct winsize *) libcesque paramsnonnull((1, 2)) __wur;
char *ptsname(int) libcesque;
errno_t ptsname_r(int, char *, size_t) libcesque;
int grantpt(int);
int unlockpt(int);
int posix_openpt(int) __wur;
int grantpt(int) libcesque;
int unlockpt(int) libcesque;
int posix_openpt(int) libcesque __wur;
int tcdrain(int);
int tcgetsid(int);
int tcflow(int, int);
int tcflush(int, int);
int tcsetsid(int, int);
int tcsendbreak(int, int);
void cfmakeraw(struct termios *);
int cfsetspeed(struct termios *, uint32_t);
int cfsetospeed(struct termios *, uint32_t);
int cfsetispeed(struct termios *, uint32_t);
uint32_t cfgetospeed(const struct termios *);
uint32_t cfgetispeed(const struct termios *);
int tcsetwinsize(int, const struct winsize *);
int tcgetwinsize(int, struct winsize *);
int tcdrain(int) libcesque;
int tcgetsid(int) libcesque;
int tcflow(int, int) libcesque;
int tcflush(int, int) libcesque;
int tcsetsid(int, int) libcesque;
int tcsendbreak(int, int) libcesque;
void cfmakeraw(struct termios *) libcesque;
int cfsetspeed(struct termios *, uint32_t) libcesque;
int cfsetospeed(struct termios *, uint32_t) libcesque;
int cfsetispeed(struct termios *, uint32_t) libcesque;
uint32_t cfgetospeed(const struct termios *) libcesque;
uint32_t cfgetispeed(const struct termios *) libcesque;
int tcsetwinsize(int, const struct winsize *) libcesque;
int tcgetwinsize(int, struct winsize *) libcesque;
COSMOPOLITAN_C_END_
#endif /* COSMOPOLITAN_LIBC_CALLS_TERMIOS_H_ */

View file

@ -6,80 +6,80 @@ COSMOPOLITAN_C_START_
#define complex _Complex
#define imaginary _Imaginary
double cabs(complex double);
double carg(complex double);
double cimag(complex double);
double creal(complex double);
double cabs(complex double) libcesque;
double carg(complex double) libcesque;
double cimag(complex double) libcesque;
double creal(complex double) libcesque;
float cabsf(complex float);
float cargf(complex float);
float cimagf(complex float);
float crealf(complex float);
float cabsf(complex float) libcesque;
float cargf(complex float) libcesque;
float cimagf(complex float) libcesque;
float crealf(complex float) libcesque;
long double cabsl(complex long double);
long double cargl(complex long double);
long double cimagl(complex long double);
long double creall(complex long double);
long double cabsl(complex long double) libcesque;
long double cargl(complex long double) libcesque;
long double cimagl(complex long double) libcesque;
long double creall(complex long double) libcesque;
complex double cacos(complex double);
complex double cacosh(complex double);
complex double casin(complex double);
complex double casinh(complex double);
complex double catan(complex double);
complex double catanh(complex double);
complex double ccos(complex double);
complex double ccosh(complex double);
complex double cexp(complex double);
complex double cexp2(complex double);
complex double clog(complex double);
complex double conj(complex double);
complex double cpow(complex double, complex double);
complex double cproj(complex double);
complex double csin(complex double);
complex double csinh(complex double);
complex double csqrt(complex double);
complex double ctan(complex double);
complex double ctanh(complex double);
complex double cacos(complex double) libcesque;
complex double cacosh(complex double) libcesque;
complex double casin(complex double) libcesque;
complex double casinh(complex double) libcesque;
complex double catan(complex double) libcesque;
complex double catanh(complex double) libcesque;
complex double ccos(complex double) libcesque;
complex double ccosh(complex double) libcesque;
complex double cexp(complex double) libcesque;
complex double cexp2(complex double) libcesque;
complex double clog(complex double) libcesque;
complex double conj(complex double) libcesque;
complex double cpow(complex double, complex double) libcesque;
complex double cproj(complex double) libcesque;
complex double csin(complex double) libcesque;
complex double csinh(complex double) libcesque;
complex double csqrt(complex double) libcesque;
complex double ctan(complex double) libcesque;
complex double ctanh(complex double) libcesque;
complex float cacosf(complex float);
complex float cacoshf(complex float);
complex float casinf(complex float);
complex float casinhf(complex float);
complex float catanf(complex float);
complex float catanhf(complex float);
complex float ccosf(complex float);
complex float ccoshf(complex float);
complex float cexpf(complex float);
complex float cexp2f(complex float);
complex float clogf(complex float);
complex float conjf(complex float);
complex float cpowf(complex float, complex float);
complex float cprojf(complex float);
complex float csinf(complex float);
complex float csinhf(complex float);
complex float csqrtf(complex float);
complex float ctanf(complex float);
complex float ctanhf(complex float);
complex float cacosf(complex float) libcesque;
complex float cacoshf(complex float) libcesque;
complex float casinf(complex float) libcesque;
complex float casinhf(complex float) libcesque;
complex float catanf(complex float) libcesque;
complex float catanhf(complex float) libcesque;
complex float ccosf(complex float) libcesque;
complex float ccoshf(complex float) libcesque;
complex float cexpf(complex float) libcesque;
complex float cexp2f(complex float) libcesque;
complex float clogf(complex float) libcesque;
complex float conjf(complex float) libcesque;
complex float cpowf(complex float, complex float) libcesque;
complex float cprojf(complex float) libcesque;
complex float csinf(complex float) libcesque;
complex float csinhf(complex float) libcesque;
complex float csqrtf(complex float) libcesque;
complex float ctanf(complex float) libcesque;
complex float ctanhf(complex float) libcesque;
complex long double cprojl(complex long double);
complex long double csinhl(complex long double);
complex long double csinl(complex long double);
complex long double csqrtl(complex long double);
complex long double ctanhl(complex long double);
complex long double ctanl(complex long double);
complex long double cacoshl(complex long double);
complex long double cacosl(complex long double);
complex long double casinhl(complex long double);
complex long double casinl(complex long double);
complex long double catanhl(complex long double);
complex long double catanl(complex long double);
complex long double ccoshl(complex long double);
complex long double ccosl(complex long double);
complex long double cexpl(complex long double);
complex long double cexp2l(complex long double);
complex long double clogl(complex long double);
complex long double conjl(complex long double);
complex long double cpowl(complex long double, complex long double);
complex long double cprojl(complex long double) libcesque;
complex long double csinhl(complex long double) libcesque;
complex long double csinl(complex long double) libcesque;
complex long double csqrtl(complex long double) libcesque;
complex long double ctanhl(complex long double) libcesque;
complex long double ctanl(complex long double) libcesque;
complex long double cacoshl(complex long double) libcesque;
complex long double cacosl(complex long double) libcesque;
complex long double casinhl(complex long double) libcesque;
complex long double casinl(complex long double) libcesque;
complex long double catanhl(complex long double) libcesque;
complex long double catanl(complex long double) libcesque;
complex long double ccoshl(complex long double) libcesque;
complex long double ccosl(complex long double) libcesque;
complex long double cexpl(complex long double) libcesque;
complex long double cexp2l(complex long double) libcesque;
complex long double clogl(complex long double) libcesque;
complex long double conjl(complex long double) libcesque;
complex long double cpowl(complex long double, complex long double) libcesque;
#ifndef __cplusplus
#define __CIMAG(x, t) \

View file

@ -3,7 +3,7 @@
COSMOPOLITAN_C_START_
errno_t cosmo_once(_Atomic(uint32_t) *, void (*)(void));
int systemvpe(const char *, char *const[], char *const[]);
int systemvpe(const char *, char *const[], char *const[]) libcesque;
COSMOPOLITAN_C_END_
#endif /* COSMOPOLITAN_LIBC_COSMO_H_ */

View file

@ -6,7 +6,7 @@ union CxaGuardValue;
char *__cxa_demangle(const char *, char *, size_t *, int *);
int __cxa_atexit(void (*)(void *), void *, void *) paramsnonnull((1)) dontthrow;
int __cxa_guard_acquire(union CxaGuardValue *);
int __cxa_guard_acquire(union CxaGuardValue *) libcesque;
int __cxa_thread_atexit(void *, void *, void *) dontthrow;
void __cxa_finalize(void *);
void __cxa_guard_abort(union CxaGuardValue *) dontthrow;

View file

@ -11,17 +11,17 @@ COSMOPOLITAN_C_START_
#define RTLD_NEXT ((void *)-1)
#define RTLD_DEFAULT ((void *)0)
char *dlerror(void);
void *dlopen(const char *, int);
void *dlsym(void *, const char *);
int dlclose(void *);
char *dlerror(void) libcesque;
void *dlopen(const char *, int) libcesque;
void *dlsym(void *, const char *) libcesque;
int dlclose(void *) libcesque;
#ifdef _COSMO_SOURCE
char *cosmo_dlerror(void);
void *cosmo_dlopen(const char *, int);
void *cosmo_dlsym(void *, const char *);
void *cosmo_dltramp(void *);
int cosmo_dlclose(void *);
char *cosmo_dlerror(void) libcesque;
void *cosmo_dlopen(const char *, int) libcesque;
void *cosmo_dlsym(void *, const char *) libcesque;
void *cosmo_dltramp(void *) libcesque;
int cosmo_dlclose(void *) libcesque;
#endif
COSMOPOLITAN_C_END_

View file

@ -5,39 +5,38 @@ COSMOPOLITAN_C_START_
int abs(int) libcesque pureconst;
long labs(long) libcesque pureconst;
long long llabs(long long) libcesque pureconst;
intmax_t imaxabs(intmax_t)
libcesque pureconst;
libcesque intmax_t imaxabs(intmax_t) pureconst;
int atoi(const char *) paramsnonnull() libcesque;
long atol(const char *) paramsnonnull() libcesque;
long long atoll(const char *) paramsnonnull() libcesque;
unsigned long strtoul(const char *, char **, int) paramsnonnull((1));
long long strtoll(const char *, char **, int) paramsnonnull((1));
unsigned long strtoul(const char *, char **, int) libcesque paramsnonnull((1));
long long strtoll(const char *, char **, int) libcesque paramsnonnull((1));
unsigned long long strtoull(const char *, char **, int) paramsnonnull((1));
intmax_t strtoimax(const char *, char **, int) paramsnonnull((1));
uintmax_t strtoumax(const char *, char **, int) paramsnonnull((1));
intmax_t wcstoimax(const wchar_t *, wchar_t **, int);
uintmax_t wcstoumax(const wchar_t *, wchar_t **, int);
long wcstol(const wchar_t *, wchar_t **, int);
unsigned long wcstoul(const wchar_t *, wchar_t **, int);
intmax_t strtoimax(const char *, char **, int) libcesque paramsnonnull((1));
uintmax_t strtoumax(const char *, char **, int) libcesque paramsnonnull((1));
intmax_t wcstoimax(const wchar_t *, wchar_t **, int) libcesque;
uintmax_t wcstoumax(const wchar_t *, wchar_t **, int) libcesque;
long wcstol(const wchar_t *, wchar_t **, int) libcesque;
unsigned long wcstoul(const wchar_t *, wchar_t **, int) libcesque;
long strtol(const char *, char **, int) paramsnonnull((1)) libcesque;
long sizetol(const char *, long) paramsnonnull() libcesque;
char *sizefmt(char *, uint64_t, uint64_t);
long long wcstoll(const wchar_t *, wchar_t **, int);
unsigned long long wcstoull(const wchar_t *, wchar_t **, int);
int wcscoll(const wchar_t *, const wchar_t *);
size_t wcsxfrm(wchar_t *, const wchar_t *, size_t);
char *sizefmt(char *, uint64_t, uint64_t) libcesque;
long long wcstoll(const wchar_t *, wchar_t **, int) libcesque;
unsigned long long wcstoull(const wchar_t *, wchar_t **, int) libcesque;
int wcscoll(const wchar_t *, const wchar_t *) libcesque;
size_t wcsxfrm(wchar_t *, const wchar_t *, size_t) libcesque;
double atof(const char *);
float strtof(const char *, char **);
double strtod(const char *, char **);
long double strtold(const char *, char **);
float wcstof(const wchar_t *, wchar_t **);
double wcstod(const wchar_t *, wchar_t **);
long double wcstold(const wchar_t *, wchar_t **);
double atof(const char *) libcesque;
float strtof(const char *, char **) libcesque;
double strtod(const char *, char **) libcesque;
long double strtold(const char *, char **) libcesque;
float wcstof(const wchar_t *, wchar_t **) libcesque;
double wcstod(const wchar_t *, wchar_t **) libcesque;
long double wcstold(const wchar_t *, wchar_t **) libcesque;
#ifdef _COSMO_SOURCE
char *stripext(char *);
char *stripexts(char *);
char *stripext(char *) libcesque;
char *stripexts(char *) libcesque;
#endif /* _COSMO_SOURCE */
typedef struct {
@ -60,10 +59,10 @@ typedef struct {
intmax_t rem;
} imaxdiv_t;
div_t div(int, int) pureconst;
ldiv_t ldiv(long, long) pureconst;
lldiv_t lldiv(long long, long long) pureconst;
imaxdiv_t imaxdiv(intmax_t, intmax_t) pureconst;
libcesque div_t div(int, int) pureconst;
libcesque ldiv_t ldiv(long, long) pureconst;
libcesque lldiv_t lldiv(long long, long long) pureconst;
libcesque imaxdiv_t imaxdiv(intmax_t, intmax_t) pureconst;
#if __STDC_VERSION__ + 0 >= 199901L
#define div(num, den) ((div_t){(num) / (den), (num) % (den)})

View file

@ -22,24 +22,24 @@ COSMOPOLITAN_C_START_
#define uint64toarray_fixed16 __uint64toarray_fixed16
#define uint64toarray_radix8 __uint64toarray_radix8
unsigned LengthInt64(int64_t) pureconst;
unsigned LengthUint64(uint64_t) pureconst;
unsigned LengthInt64Thousands(int64_t) pureconst;
unsigned LengthUint64Thousands(uint64_t) pureconst;
char *FormatInt32(char[hasatleast 12], int32_t);
char *FormatUint32(char[hasatleast 12], uint32_t);
char *FormatInt64(char[hasatleast 21], int64_t);
char *FormatUint64(char[hasatleast 21], uint64_t);
char *FormatInt64Thousands(char[hasatleast 27], int64_t);
char *FormatUint64Thousands(char[hasatleast 27], uint64_t);
char *FormatOctal32(char[hasatleast 13], uint32_t, bool32);
char *FormatOctal64(char[hasatleast 24], uint64_t, bool32);
char *FormatBinary64(char[hasatleast 67], uint64_t, char);
char *FormatHex64(char[hasatleast 19], uint64_t, char);
char *FormatFlex64(char[hasatleast 24], int64_t, char);
size_t uint64toarray_radix16(uint64_t, char[hasatleast 17]);
size_t uint64toarray_fixed16(uint64_t, char[hasatleast 17], uint8_t);
size_t uint64toarray_radix8(uint64_t, char[hasatleast 24]);
libcesque unsigned LengthInt64(int64_t) pureconst;
libcesque unsigned LengthUint64(uint64_t) pureconst;
libcesque unsigned LengthInt64Thousands(int64_t) pureconst;
libcesque unsigned LengthUint64Thousands(uint64_t) pureconst;
libcesque char *FormatInt32(char[hasatleast 12], int32_t);
libcesque char *FormatUint32(char[hasatleast 12], uint32_t);
libcesque char *FormatInt64(char[hasatleast 21], int64_t);
libcesque char *FormatUint64(char[hasatleast 21], uint64_t);
libcesque char *FormatInt64Thousands(char[hasatleast 27], int64_t);
libcesque char *FormatUint64Thousands(char[hasatleast 27], uint64_t);
libcesque char *FormatOctal32(char[hasatleast 13], uint32_t, bool32);
libcesque char *FormatOctal64(char[hasatleast 24], uint64_t, bool32);
libcesque char *FormatBinary64(char[hasatleast 67], uint64_t, char);
libcesque char *FormatHex64(char[hasatleast 19], uint64_t, char);
libcesque char *FormatFlex64(char[hasatleast 24], int64_t, char);
libcesque size_t uint64toarray_radix16(uint64_t, char[hasatleast 17]);
libcesque size_t uint64toarray_fixed16(uint64_t, char[hasatleast 17], uint8_t);
libcesque size_t uint64toarray_radix8(uint64_t, char[hasatleast 24]);
COSMOPOLITAN_C_END_
#endif /* _COSMO_SOURCE */

View file

@ -9,11 +9,11 @@ COSMOPOLITAN_C_START_
#define unzleb64 __unzleb64
#define unuleb64 __unuleb64
char *sleb64(char *, int64_t);
char *zleb64(char[hasatleast 10], int64_t);
char *uleb64(char[hasatleast 10], uint64_t);
int unzleb64(const char *, size_t, int64_t *);
int unuleb64(const char *, size_t, uint64_t *);
char *sleb64(char *, int64_t) libcesque;
char *zleb64(char[hasatleast 10], int64_t) libcesque;
char *uleb64(char[hasatleast 10], uint64_t) libcesque;
int unzleb64(const char *, size_t, int64_t *) libcesque;
int unuleb64(const char *, size_t, uint64_t *) libcesque;
COSMOPOLITAN_C_END_
#endif /* _COSMO_SOURCE */

View file

@ -2,8 +2,8 @@
#define COSMOPOLITAN_LIBC_FMT_LIBGEN_H_
COSMOPOLITAN_C_START_
char *dirname(char *);
char *basename(char *);
char *dirname(char *) libcesque;
char *basename(char *) libcesque;
COSMOPOLITAN_C_END_
#endif /* COSMOPOLITAN_LIBC_FMT_LIBGEN_H_ */

View file

@ -9,13 +9,13 @@
COSMOPOLITAN_C_START_
int64_t DosDateTimeToUnix(uint32_t, uint32_t) pureconst;
int64_t TimeSpecToWindowsTime(struct timespec) pureconst;
int64_t TimeValToWindowsTime(struct timeval) pureconst;
struct timespec WindowsDurationToTimeSpec(int64_t) pureconst;
struct timespec WindowsTimeToTimeSpec(int64_t) pureconst;
struct timeval WindowsDurationToTimeVal(int64_t) pureconst;
struct timeval WindowsTimeToTimeVal(int64_t) pureconst;
libcesque int64_t DosDateTimeToUnix(uint32_t, uint32_t) pureconst;
libcesque int64_t TimeSpecToWindowsTime(struct timespec) pureconst;
libcesque int64_t TimeValToWindowsTime(struct timeval) pureconst;
libcesque struct timespec WindowsDurationToTimeSpec(int64_t) pureconst;
libcesque struct timespec WindowsTimeToTimeSpec(int64_t) pureconst;
libcesque struct timeval WindowsDurationToTimeVal(int64_t) pureconst;
libcesque struct timeval WindowsTimeToTimeVal(int64_t) pureconst;
#define MakeFileTime(x) \
({ \

View file

@ -2,9 +2,9 @@
#define COSMOPOLITAN_LIBC_NEXGEN32E_BSF_H_
COSMOPOLITAN_C_START_
int _bsf(int) pureconst;
int _bsfl(long) pureconst;
int _bsfll(long long) pureconst;
libcesque int _bsf(int) pureconst;
libcesque int _bsfl(long) pureconst;
libcesque int _bsfll(long long) pureconst;
#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
#define _bsf(x) __builtin_ctz(x)

View file

@ -2,9 +2,9 @@
#define COSMOPOLITAN_LIBC_NEXGEN32E_BSR_H_
COSMOPOLITAN_C_START_
int _bsr(int) pureconst;
int _bsrl(long) pureconst;
int _bsrll(long long) pureconst;
libcesque int _bsr(int) pureconst;
libcesque int _bsrl(long) pureconst;
libcesque int _bsrll(long long) pureconst;
#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
#define _bsr(x) (__builtin_clz(x) ^ (sizeof(int) * 8 - 1))

View file

@ -2,9 +2,9 @@
#define COSMOPOLITAN_LIBC_BITS_BSWAP_H_
COSMOPOLITAN_C_START_
uint16_t bswap_16(uint16_t) pureconst;
uint32_t bswap_32(uint32_t) pureconst;
uint64_t bswap_64(uint64_t) pureconst;
libcesque uint16_t bswap_16(uint16_t) pureconst;
libcesque uint32_t bswap_32(uint32_t) pureconst;
libcesque uint64_t bswap_64(uint64_t) pureconst;
#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
#define bswap_16(x) __builtin_bswap16(x)

View file

@ -13,15 +13,15 @@ struct CxaAtexitBlocks {
void *arg;
void *pred;
} p[32];
} * p, root;
} *p, root;
};
extern struct CxaAtexitBlocks __cxa_blocks;
void __cxa_lock(void);
void __cxa_unlock(void);
void __cxa_thread_finalize(void);
void __cxa_printexits(FILE *, void *);
void __cxa_lock(void) libcesque;
void __cxa_unlock(void) libcesque;
void __cxa_thread_finalize(void) libcesque;
void __cxa_printexits(FILE *, void *) libcesque;
int __cxa_thread_atexit_impl(void *, void *, void *);
COSMOPOLITAN_C_END_

View file

@ -4,7 +4,7 @@
#include "libc/nexgen32e/stackframe.h"
COSMOPOLITAN_C_START_
const char *DescribeBacktrace(char[160], struct StackFrame *);
const char *DescribeBacktrace(char[160], struct StackFrame *) libcesque;
#define DescribeBacktrace(x) DescribeBacktrace(alloca(160), x)
COSMOPOLITAN_C_END_

View file

@ -9,66 +9,66 @@ struct thatispacked DescribeFlags {
};
const char *DescribeFlags(char *, size_t, const struct DescribeFlags *, size_t,
const char *, unsigned);
const char *, unsigned) libcesque;
const char *DescribeArchPrctlCode(char[12], int);
const char *DescribeCancelState(char[12], int, int *);
const char *DescribeCapability(char[32], int);
const char *DescribeClockName(char[32], int);
const char *DescribeControlKeyState(char[64], uint32_t);
const char *DescribeDirfd(char[12], int);
const char *DescribeDnotifyFlags(char[80], int);
const char *DescribeErrno(char[30], int);
const char *DescribeFcntlCmd(char[20], int);
const char *DescribeFlockType(char[12], int);
const char *DescribeFrame(char[32], int);
const char *DescribeFutexOp(char[64], int);
const char *DescribeHow(char[12], int);
const char *DescribeInOutInt64(char[23], ssize_t, int64_t *);
const char *DescribeItimer(char[12], int);
const char *DescribeMapFlags(char[64], int);
const char *DescribeMapping(char[8], int, int);
const char *DescribeNtConsoleInFlags(char[256], uint32_t);
const char *DescribeNtConsoleOutFlags(char[128], uint32_t);
const char *DescribeNtCreationDisposition(uint32_t);
const char *DescribeNtFileAccessFlags(char[512], uint32_t);
const char *DescribeNtFileFlagAttr(char[256], uint32_t);
const char *DescribeNtFileMapFlags(char[64], uint32_t);
const char *DescribeNtFileShareFlags(char[64], uint32_t);
const char *DescribeNtFiletypeFlags(char[64], uint32_t);
const char *DescribeNtLockFileFlags(char[64], uint32_t);
const char *DescribeNtMovFileInpFlags(char[256], uint32_t);
const char *DescribeNtPageFlags(char[64], uint32_t);
const char *DescribeNtPipeModeFlags(char[64], uint32_t);
const char *DescribeNtPipeOpenFlags(char[64], uint32_t);
const char *DescribeNtProcAccessFlags(char[256], uint32_t);
const char *DescribeNtStartFlags(char[128], uint32_t);
const char *DescribeNtSymlinkFlags(char[64], uint32_t);
const char *DescribeOpenFlags(char[128], int);
const char *DescribeOpenMode(char[15], int, int);
const char *DescribePersonalityFlags(char[128], int);
const char *DescribePollFlags(char[64], int);
const char *DescribePrctlOperation(int);
const char *DescribeProtFlags(char[48], int);
const char *DescribePtrace(char[12], int);
const char *DescribePtraceEvent(char[32], int);
const char *DescribeRemapFlags(char[48], int);
const char *DescribeRlimitName(char[20], int);
const char *DescribeSchedPolicy(char[48], int);
const char *DescribeSeccompOperation(int);
const char *DescribeSiCode(char[20], int, int);
const char *DescribeSleepFlags(char[16], int);
const char *DescribeSockLevel(char[12], int);
const char *DescribeSockOptname(char[32], int, int);
const char *DescribeSocketFamily(char[12], int);
const char *DescribeSocketProtocol(char[12], int);
const char *DescribeSocketType(char[64], int);
const char *DescribeStdioState(char[12], int);
const char *DescribeStringList(char[300], char *const[]);
const char *DescribeThreadCreateFlags(char[64], uint32_t);
const char *DescribeVirtualKeyCode(char[32], uint32_t);
const char *DescribeWhence(char[12], int);
const char *DescribeWhichPrio(char[12], int);
const char *DescribeArchPrctlCode(char[12], int) libcesque;
const char *DescribeCancelState(char[12], int, int *) libcesque;
const char *DescribeCapability(char[32], int) libcesque;
const char *DescribeClockName(char[32], int) libcesque;
const char *DescribeControlKeyState(char[64], uint32_t) libcesque;
const char *DescribeDirfd(char[12], int) libcesque;
const char *DescribeDnotifyFlags(char[80], int) libcesque;
const char *DescribeErrno(char[30], int) libcesque;
const char *DescribeFcntlCmd(char[20], int) libcesque;
const char *DescribeFlockType(char[12], int) libcesque;
const char *DescribeFrame(char[32], int) libcesque;
const char *DescribeFutexOp(char[64], int) libcesque;
const char *DescribeHow(char[12], int) libcesque;
const char *DescribeInOutInt64(char[23], ssize_t, int64_t *) libcesque;
const char *DescribeItimer(char[12], int) libcesque;
const char *DescribeMapFlags(char[64], int) libcesque;
const char *DescribeMapping(char[8], int, int) libcesque;
const char *DescribeNtConsoleInFlags(char[256], uint32_t) libcesque;
const char *DescribeNtConsoleOutFlags(char[128], uint32_t) libcesque;
const char *DescribeNtCreationDisposition(uint32_t) libcesque;
const char *DescribeNtFileAccessFlags(char[512], uint32_t) libcesque;
const char *DescribeNtFileFlagAttr(char[256], uint32_t) libcesque;
const char *DescribeNtFileMapFlags(char[64], uint32_t) libcesque;
const char *DescribeNtFileShareFlags(char[64], uint32_t) libcesque;
const char *DescribeNtFiletypeFlags(char[64], uint32_t) libcesque;
const char *DescribeNtLockFileFlags(char[64], uint32_t) libcesque;
const char *DescribeNtMovFileInpFlags(char[256], uint32_t) libcesque;
const char *DescribeNtPageFlags(char[64], uint32_t) libcesque;
const char *DescribeNtPipeModeFlags(char[64], uint32_t) libcesque;
const char *DescribeNtPipeOpenFlags(char[64], uint32_t) libcesque;
const char *DescribeNtProcAccessFlags(char[256], uint32_t) libcesque;
const char *DescribeNtStartFlags(char[128], uint32_t) libcesque;
const char *DescribeNtSymlinkFlags(char[64], uint32_t) libcesque;
const char *DescribeOpenFlags(char[128], int) libcesque;
const char *DescribeOpenMode(char[15], int, int) libcesque;
const char *DescribePersonalityFlags(char[128], int) libcesque;
const char *DescribePollFlags(char[64], int) libcesque;
const char *DescribePrctlOperation(int) libcesque;
const char *DescribeProtFlags(char[48], int) libcesque;
const char *DescribePtrace(char[12], int) libcesque;
const char *DescribePtraceEvent(char[32], int) libcesque;
const char *DescribeRemapFlags(char[48], int) libcesque;
const char *DescribeRlimitName(char[20], int) libcesque;
const char *DescribeSchedPolicy(char[48], int) libcesque;
const char *DescribeSeccompOperation(int) libcesque;
const char *DescribeSiCode(char[20], int, int) libcesque;
const char *DescribeSleepFlags(char[16], int) libcesque;
const char *DescribeSockLevel(char[12], int) libcesque;
const char *DescribeSockOptname(char[32], int, int) libcesque;
const char *DescribeSocketFamily(char[12], int) libcesque;
const char *DescribeSocketProtocol(char[12], int) libcesque;
const char *DescribeSocketType(char[64], int) libcesque;
const char *DescribeStdioState(char[12], int) libcesque;
const char *DescribeStringList(char[300], char *const[]) libcesque;
const char *DescribeThreadCreateFlags(char[64], uint32_t) libcesque;
const char *DescribeVirtualKeyCode(char[32], uint32_t) libcesque;
const char *DescribeWhence(char[12], int) libcesque;
const char *DescribeWhichPrio(char[12], int) libcesque;
#define DescribeArchPrctlCode(x) DescribeArchPrctlCode(alloca(12), x)
#define DescribeCancelState(x, y) DescribeCancelState(alloca(12), x, y)

View file

@ -15,8 +15,8 @@ struct DirectMap {
struct DirectMap sys_mmap(void *, size_t, int, int, int, int64_t);
struct DirectMap sys_mmap_nt(void *, size_t, int, int, int, int64_t);
struct DirectMap sys_mmap_metal(void *, size_t, int, int, int, int64_t);
int sys_munmap_metal(void *, size_t);
int __prot2nt(int, int);
int sys_munmap_metal(void *, size_t) libcesque;
int __prot2nt(int, int) libcesque;
COSMOPOLITAN_C_END_
#endif /* COSMOPOLITAN_LIBC_INTRIN_DIRECTMAP_H_ */

View file

@ -2,7 +2,7 @@
#define COSMOPOLITAN_LIBC_CALLS_EXTEND_INTERNAL_H_
COSMOPOLITAN_C_START_
void *_extend(void *, size_t, void *, int, intptr_t);
void *_extend(void *, size_t, void *, int, intptr_t) libcesque;
COSMOPOLITAN_C_END_
#endif /* COSMOPOLITAN_LIBC_CALLS_EXTEND_INTERNAL_H_ */

View file

@ -7,7 +7,7 @@ struct AuxiliaryValue {
bool isfound;
};
struct AuxiliaryValue __getauxval(unsigned long);
struct AuxiliaryValue __getauxval(unsigned long) libcesque;
COSMOPOLITAN_C_END_
#endif /* COSMOPOLITAN_LIBC_INTRIN_GETAUXVAL_H_ */

View file

@ -7,7 +7,7 @@ struct Env {
int i;
};
struct Env __getenv(char **, const char *);
struct Env __getenv(char **, const char *) libcesque;
COSMOPOLITAN_C_END_
#endif /* COSMOPOLITAN_LIBC_INTRIN_GETENV_H_ */

View file

@ -5,8 +5,8 @@ COSMOPOLITAN_C_START_
#define hilbert __hilbert
#define unhilbert __unhilbert
long hilbert(long, long, long) pureconst;
axdx_t unhilbert(long, long) pureconst;
libcesque long hilbert(long, long, long) pureconst;
libcesque axdx_t unhilbert(long, long) pureconst;
COSMOPOLITAN_C_END_
#endif /* _COSMO_SOURCE */

View file

@ -16,19 +16,19 @@
COSMOPOLITAN_C_START_
void kprintf(const char *, ...);
size_t ksnprintf(char *, size_t, const char *, ...);
void kvprintf(const char *, va_list);
size_t kvsnprintf(char *, size_t, const char *, va_list);
void kprintf(const char *, ...) libcesque;
size_t ksnprintf(char *, size_t, const char *, ...) libcesque;
void kvprintf(const char *, va_list) libcesque;
size_t kvsnprintf(char *, size_t, const char *, va_list) libcesque;
bool32 kisdangerous(const void *);
bool32 kisdangerous(const void *) libcesque;
void klog(const char *, size_t);
void _klog_serial(const char *, size_t);
long kloghandle(void);
void klog(const char *, size_t) libcesque;
void _klog_serial(const char *, size_t) libcesque;
long kloghandle(void) libcesque;
void uprintf(const char *, ...);
void uvprintf(const char *, va_list);
void uprintf(const char *, ...) libcesque;
void uvprintf(const char *, va_list) libcesque;
#ifndef TINY
#define KINFOF(FMT, ...) \

View file

@ -3,8 +3,8 @@
#include "libc/nexgen32e/x86feature.h"
COSMOPOLITAN_C_START_
size_t _countbits(const void *, size_t);
unsigned long popcnt(unsigned long) pureconst;
libcesque size_t _countbits(const void *, size_t);
libcesque unsigned long popcnt(unsigned long) pureconst;
#if defined(__GNUC__) && !defined(__STRICT_ANSI__) && defined(__x86_64__)
#define popcnt(X) \

View file

@ -3,8 +3,8 @@
#include "libc/intrin/macros.h"
COSMOPOLITAN_C_START_
void psraw(int16_t[8], const int16_t[8], unsigned char);
void psrawv(int16_t[8], const int16_t[8], const uint64_t[2]);
void psraw(int16_t[8], const int16_t[8], unsigned char) libcesque;
void psrawv(int16_t[8], const int16_t[8], const uint64_t[2]) libcesque;
#define psraw(A, B, I) INTRIN_SSEVEX_X_I_(psraw, SSE2, "psraw", A, B, I)
#define psrawv(A, B, C) \

View file

@ -18,8 +18,8 @@ COSMOPOLITAN_C_START_
#define ULF_WAIT_CANCEL_POINT 0x00020000 /* raises eintr */
#define ULF_WAIT_ADAPTIVE_SPIN 0x00040000
int ulock_wake(uint32_t, void *, uint64_t);
int ulock_wait(uint32_t, void *, uint64_t, uint32_t);
int ulock_wake(uint32_t, void *, uint64_t) libcesque;
int ulock_wait(uint32_t, void *, uint64_t, uint32_t) libcesque;
COSMOPOLITAN_C_END_
#endif /* COSMOPOLITAN_ULOCK_H_ */

View file

@ -103,226 +103,226 @@ typedef double double_t;
extern int signgam;
double acos(double);
double acosh(double);
double asin(double);
double asinh(double);
double atan(double);
double atan2(double, double);
double atanh(double);
double cbrt(double);
double ceil(double);
double copysign(double, double);
double cos(double);
double cosh(double);
double drem(double, double);
double erf(double);
double erfc(double);
double exp(double);
double exp10(double);
double exp2(double);
double expm1(double);
double fabs(double);
double fdim(double, double);
double floor(double);
double fma(double, double, double);
double fmax(double, double);
double fmin(double, double);
double fmod(double, double);
double hypot(double, double);
double ldexp(double, int);
double log(double);
double log10(double);
double log1p(double);
double log2(double);
double logb(double);
double nearbyint(double);
double nextafter(double, double);
double nexttoward(double, long double);
double pow(double, double);
double pow10(double);
double powi(double, int);
double remainder(double, double);
double rint(double);
double round(double);
double scalb(double, double);
double scalbln(double, long int);
double scalbn(double, int);
double significand(double);
double sin(double);
double sinh(double);
double sqrt(double);
double tan(double);
double tanh(double);
double trunc(double);
double tgamma(double);
double lgamma(double);
double lgamma_r(double, int *);
int finite(double);
double acos(double) libcesque;
double acosh(double) libcesque;
double asin(double) libcesque;
double asinh(double) libcesque;
double atan(double) libcesque;
double atan2(double, double) libcesque;
double atanh(double) libcesque;
double cbrt(double) libcesque;
double ceil(double) libcesque;
double copysign(double, double) libcesque;
double cos(double) libcesque;
double cosh(double) libcesque;
double drem(double, double) libcesque;
double erf(double) libcesque;
double erfc(double) libcesque;
double exp(double) libcesque;
double exp10(double) libcesque;
double exp2(double) libcesque;
double expm1(double) libcesque;
double fabs(double) libcesque;
double fdim(double, double) libcesque;
double floor(double) libcesque;
double fma(double, double, double) libcesque;
double fmax(double, double) libcesque;
double fmin(double, double) libcesque;
double fmod(double, double) libcesque;
double hypot(double, double) libcesque;
double ldexp(double, int) libcesque;
double log(double) libcesque;
double log10(double) libcesque;
double log1p(double) libcesque;
double log2(double) libcesque;
double logb(double) libcesque;
double nearbyint(double) libcesque;
double nextafter(double, double) libcesque;
double nexttoward(double, long double) libcesque;
double pow(double, double) libcesque;
double pow10(double) libcesque;
double powi(double, int) libcesque;
double remainder(double, double) libcesque;
double rint(double) libcesque;
double round(double) libcesque;
double scalb(double, double) libcesque;
double scalbln(double, long int) libcesque;
double scalbn(double, int) libcesque;
double significand(double) libcesque;
double sin(double) libcesque;
double sinh(double) libcesque;
double sqrt(double) libcesque;
double tan(double) libcesque;
double tanh(double) libcesque;
double trunc(double) libcesque;
double tgamma(double) libcesque;
double lgamma(double) libcesque;
double lgamma_r(double, int *) libcesque;
int finite(double) libcesque;
float acosf(float);
float acoshf(float);
float asinf(float);
float asinhf(float);
float atan2f(float, float);
float atanf(float);
float atanhf(float);
float cbrtf(float);
float ceilf(float);
float copysignf(float, float);
float cosf(float);
float coshf(float);
float dremf(float, float);
float erfcf(float);
float erff(float);
float exp10f(float);
float exp2f(float);
float expf(float);
float expm1f(float);
float fabsf(float);
float fdimf(float, float);
float floorf(float);
float fmaf(float, float, float);
float fmaxf(float, float);
float fminf(float, float);
float fmodf(float, float);
float hypotf(float, float);
float ldexpf(float, int);
float lgammaf(float);
float lgammaf_r(float, int *);
float log10f(float);
float log1pf(float);
float log2f(float);
float logbf(float);
float logf(float);
float nearbyintf(float);
float nextafterf(float, float);
float nexttowardf(float, long double);
float pow10f(float);
float powf(float, float);
float powif(float, int);
float remainderf(float, float);
float rintf(float);
float roundf(float);
float scalbf(float, float);
float scalblnf(float, long int);
float scalbnf(float, int);
float significandf(float);
float sinf(float);
float sinhf(float);
float sqrtf(float);
float tanf(float);
float tanhf(float);
float tgammaf(float);
float truncf(float);
int finitef(float);
float acosf(float) libcesque;
float acoshf(float) libcesque;
float asinf(float) libcesque;
float asinhf(float) libcesque;
float atan2f(float, float) libcesque;
float atanf(float) libcesque;
float atanhf(float) libcesque;
float cbrtf(float) libcesque;
float ceilf(float) libcesque;
float copysignf(float, float) libcesque;
float cosf(float) libcesque;
float coshf(float) libcesque;
float dremf(float, float) libcesque;
float erfcf(float) libcesque;
float erff(float) libcesque;
float exp10f(float) libcesque;
float exp2f(float) libcesque;
float expf(float) libcesque;
float expm1f(float) libcesque;
float fabsf(float) libcesque;
float fdimf(float, float) libcesque;
float floorf(float) libcesque;
float fmaf(float, float, float) libcesque;
float fmaxf(float, float) libcesque;
float fminf(float, float) libcesque;
float fmodf(float, float) libcesque;
float hypotf(float, float) libcesque;
float ldexpf(float, int) libcesque;
float lgammaf(float) libcesque;
float lgammaf_r(float, int *) libcesque;
float log10f(float) libcesque;
float log1pf(float) libcesque;
float log2f(float) libcesque;
float logbf(float) libcesque;
float logf(float) libcesque;
float nearbyintf(float) libcesque;
float nextafterf(float, float) libcesque;
float nexttowardf(float, long double) libcesque;
float pow10f(float) libcesque;
float powf(float, float) libcesque;
float powif(float, int) libcesque;
float remainderf(float, float) libcesque;
float rintf(float) libcesque;
float roundf(float) libcesque;
float scalbf(float, float) libcesque;
float scalblnf(float, long int) libcesque;
float scalbnf(float, int) libcesque;
float significandf(float) libcesque;
float sinf(float) libcesque;
float sinhf(float) libcesque;
float sqrtf(float) libcesque;
float tanf(float) libcesque;
float tanhf(float) libcesque;
float tgammaf(float) libcesque;
float truncf(float) libcesque;
int finitef(float) libcesque;
int finitel(long double);
long double acoshl(long double);
long double acosl(long double);
long double asinhl(long double);
long double asinl(long double);
long double atan2l(long double, long double);
long double atanhl(long double);
long double atanl(long double);
long double cbrtl(long double);
long double ceill(long double);
long double copysignl(long double, long double);
long double coshl(long double);
long double cosl(long double);
long double dreml(long double, long double);
long double erfcl(long double);
long double erfl(long double);
long double exp10l(long double);
long double exp2l(long double);
long double expl(long double);
long double expm1l(long double);
long double fabsl(long double);
long double fdiml(long double, long double);
long double floorl(long double);
long double fmal(long double, long double, long double);
long double fmaxl(long double, long double);
long double fminl(long double, long double);
long double fmodl(long double, long double);
long double hypotl(long double, long double);
long double ldexpl(long double, int);
long double lgammal(long double);
long double lgammal_r(long double, int *);
long double log10l(long double);
long double log1pl(long double);
long double log2l(long double);
long double logbl(long double);
long double logl(long double);
long double nearbyintl(long double);
long double nextafterl(long double, long double);
long double nexttowardl(long double, long double);
long double pow10l(long double);
long double powl(long double, long double);
long double remainderl(long double, long double);
long double rintl(long double);
long double roundl(long double);
long double scalbl(long double, long double);
long double scalblnl(long double, long int);
long double scalbnl(long double, int);
long double significandl(long double);
long double sinhl(long double);
long double sinl(long double);
long double sqrtl(long double);
long double tanhl(long double);
long double tanl(long double);
long double tgammal(long double);
long double truncl(long double);
int finitel(long double) libcesque;
long double acoshl(long double) libcesque;
long double acosl(long double) libcesque;
long double asinhl(long double) libcesque;
long double asinl(long double) libcesque;
long double atan2l(long double, long double) libcesque;
long double atanhl(long double) libcesque;
long double atanl(long double) libcesque;
long double cbrtl(long double) libcesque;
long double ceill(long double) libcesque;
long double copysignl(long double, long double) libcesque;
long double coshl(long double) libcesque;
long double cosl(long double) libcesque;
long double dreml(long double, long double) libcesque;
long double erfcl(long double) libcesque;
long double erfl(long double) libcesque;
long double exp10l(long double) libcesque;
long double exp2l(long double) libcesque;
long double expl(long double) libcesque;
long double expm1l(long double) libcesque;
long double fabsl(long double) libcesque;
long double fdiml(long double, long double) libcesque;
long double floorl(long double) libcesque;
long double fmal(long double, long double, long double) libcesque;
long double fmaxl(long double, long double) libcesque;
long double fminl(long double, long double) libcesque;
long double fmodl(long double, long double) libcesque;
long double hypotl(long double, long double) libcesque;
long double ldexpl(long double, int) libcesque;
long double lgammal(long double) libcesque;
long double lgammal_r(long double, int *) libcesque;
long double log10l(long double) libcesque;
long double log1pl(long double) libcesque;
long double log2l(long double) libcesque;
long double logbl(long double) libcesque;
long double logl(long double) libcesque;
long double nearbyintl(long double) libcesque;
long double nextafterl(long double, long double) libcesque;
long double nexttowardl(long double, long double) libcesque;
long double pow10l(long double) libcesque;
long double powl(long double, long double) libcesque;
long double remainderl(long double, long double) libcesque;
long double rintl(long double) libcesque;
long double roundl(long double) libcesque;
long double scalbl(long double, long double) libcesque;
long double scalblnl(long double, long int) libcesque;
long double scalbnl(long double, int) libcesque;
long double significandl(long double) libcesque;
long double sinhl(long double) libcesque;
long double sinl(long double) libcesque;
long double sqrtl(long double) libcesque;
long double tanhl(long double) libcesque;
long double tanl(long double) libcesque;
long double tgammal(long double) libcesque;
long double truncl(long double) libcesque;
long lrint(double);
long lrintf(float);
long lrintl(long double);
long lround(double);
long lroundf(float);
long lroundl(long double);
long lrint(double) libcesque;
long lrintf(float) libcesque;
long lrintl(long double) libcesque;
long lround(double) libcesque;
long lroundf(float) libcesque;
long lroundl(long double) libcesque;
int ilogbf(float);
int ilogb(double);
int ilogbl(long double);
int ilogbf(float) libcesque;
int ilogb(double) libcesque;
int ilogbl(long double) libcesque;
long long llrint(double);
long long llrintf(float);
long long llrintl(long double);
long long llround(double);
long long llroundf(float);
long long llroundl(long double);
long long llrint(double) libcesque;
long long llrintf(float) libcesque;
long long llrintl(long double) libcesque;
long long llround(double) libcesque;
long long llroundf(float) libcesque;
long long llroundl(long double) libcesque;
double frexp(double, int *);
double modf(double, double *);
double nan(const char *);
double remquo(double, double, int *);
float frexpf(float, int *);
float modff(float, float *);
float nanf(const char *);
float remquof(float, float, int *);
long double frexpl(long double, int *);
long double modfl(long double, long double *);
long double nanl(const char *);
long double remquol(long double, long double, int *);
void sincos(double, double *, double *);
void sincosf(float, float *, float *);
void sincosl(long double, long double *, long double *);
double frexp(double, int *) libcesque;
double modf(double, double *) libcesque;
double nan(const char *) libcesque;
double remquo(double, double, int *) libcesque;
float frexpf(float, int *) libcesque;
float modff(float, float *) libcesque;
float nanf(const char *) libcesque;
float remquof(float, float, int *) libcesque;
long double frexpl(long double, int *) libcesque;
long double modfl(long double, long double *) libcesque;
long double nanl(const char *) libcesque;
long double remquol(long double, long double, int *) libcesque;
void sincos(double, double *, double *) libcesque;
void sincosf(float, float *, float *) libcesque;
void sincosl(long double, long double *, long double *) libcesque;
double fsumf(const float *, size_t);
double fsum(const double *, size_t);
double fsumf(const float *, size_t) libcesque;
double fsum(const double *, size_t) libcesque;
double j0(double);
double j1(double);
double jn(int, double);
float j0f(float);
float j1f(float);
float jnf(int, float);
double j0(double) libcesque;
double j1(double) libcesque;
double jn(int, double) libcesque;
float j0f(float) libcesque;
float j1f(float) libcesque;
float jnf(int, float) libcesque;
double y0(double);
double y1(double);
double yn(int, double);
float y0f(float);
float y1f(float);
float ynf(int, float);
double y0(double) libcesque;
double y1(double) libcesque;
double yn(int, double) libcesque;
float y0f(float) libcesque;
float y1f(float) libcesque;
float ynf(int, float) libcesque;
COSMOPOLITAN_C_END_
#endif /* COSMOPOLITAN_LIBC_MATH_H_ */

View file

@ -3,12 +3,11 @@
COSMOPOLITAN_C_START_
void *bsearch(const void *, const void *, size_t, size_t,
int (*)(const void *, const void *))
paramsnonnull() dontthrow nosideeffect;
int (*)(const void *, const void *)) paramsnonnull() nosideeffect;
void *bsearch_r(const void *, const void *, size_t, size_t,
int (*)(const void *, const void *, void *), void *)
paramsnonnull((1, 2, 5)) dontthrow nosideeffect;
void djbsort(int32_t *, size_t);
paramsnonnull((1, 2, 5)) nosideeffect;
void djbsort(int32_t *, size_t) libcesque;
void qsort3(void *, size_t, size_t, int (*)(const void *, const void *))
paramsnonnull();
void qsort(void *, size_t, size_t, int (*)(const void *, const void *))
@ -26,10 +25,8 @@ int mergesort(void *, size_t, size_t, int (*)(const void *, const void *));
int mergesort_r(void *, size_t, size_t,
int (*)(const void *, const void *, void *), void *);
#define __algalloc returnspointerwithnoaliases dontthrow nocallback __wur
int radix_sort_int32(int32_t *, size_t);
int radix_sort_int64(int64_t *, size_t);
int radix_sort_int32(int32_t *, size_t) libcesque;
int radix_sort_int64(int64_t *, size_t) libcesque;
COSMOPOLITAN_C_END_
#endif /* COSMOPOLITAN_LIBC_ALG_ALG_H_ */

View file

@ -11,15 +11,15 @@ struct critbit0 {
size_t count;
};
bool critbit0_contains(struct critbit0 *, const char *) dontthrow nosideeffect
bool critbit0_contains(struct critbit0 *, const char *) libcesque nosideeffect
paramsnonnull();
int critbit0_insert(struct critbit0 *, const char *) paramsnonnull();
bool critbit0_delete(struct critbit0 *, const char *) dontthrow paramsnonnull();
void critbit0_clear(struct critbit0 *) dontthrow paramsnonnull();
bool critbit0_delete(struct critbit0 *, const char *) libcesque paramsnonnull();
void critbit0_clear(struct critbit0 *) libcesque paramsnonnull();
char *critbit0_get(struct critbit0 *, const char *);
intptr_t critbit0_allprefixed(struct critbit0 *, const char *,
intptr_t (*)(const char *, void *), void *)
paramsnonnull((1, 2, 3)) dontthrow;
paramsnonnull((1, 2, 3)) libcesque;
int critbit0_emplace(struct critbit0 *, const void *, size_t) paramsnonnull();
COSMOPOLITAN_C_END_

View file

@ -3,9 +3,9 @@
#ifdef _COSMO_SOURCE
COSMOPOLITAN_C_START_
void _gc_free(void *) libcesque;
void __defer(void *, void *, void *) libcesque;
void gclongjmp(void *, int) libcesque wontreturn;
libcesque void _gc_free(void *);
libcesque void __defer(void *, void *, void *);
libcesque void gclongjmp(void *, int) wontreturn;
#define gc(THING) defer((void *)_gc_free, (void *)(THING))
#define _gc(THING) defer((void *)_gc_free, (void *)(THING))
#define defer(FN, ARG) \

View file

@ -8,7 +8,7 @@ struct CritbitNode {
unsigned otherbits;
};
int __putenv(char *, bool);
int __putenv(char *, bool) libcesque;
bool __grow(void *, size_t *, size_t, size_t) paramsnonnull((1, 2)) libcesque;
COSMOPOLITAN_C_END_

View file

@ -24,14 +24,14 @@ char *strdup(const char *) paramsnonnull() mallocesque;
char *strndup(const char *, size_t) paramsnonnull() mallocesque;
void *aligned_alloc(size_t, size_t) attributeallocalign((1))
attributeallocsize((2)) returnspointerwithnoaliases libcesque __wur;
int posix_memalign(void **, size_t, size_t);
int posix_memalign(void **, size_t, size_t) libcesque;
int mallopt(int, int);
int malloc_trim(size_t);
size_t bulk_free(void **, size_t);
size_t malloc_usable_size(void *);
void **independent_calloc(size_t, size_t, void **);
void **independent_comalloc(size_t, size_t *, void **);
int mallopt(int, int) libcesque;
int malloc_trim(size_t) libcesque;
size_t bulk_free(void **, size_t) libcesque;
size_t malloc_usable_size(void *) libcesque;
void **independent_calloc(size_t, size_t, void **) libcesque;
void **independent_comalloc(size_t, size_t *, void **) libcesque;
wchar_t *wcsdup(const wchar_t *) strlenesque __wur;
@ -48,12 +48,12 @@ struct mallinfo {
size_t keepcost; /* releasable (via malloc_trim) space */
};
struct mallinfo mallinfo(void);
struct mallinfo mallinfo(void) libcesque;
size_t malloc_footprint(void);
size_t malloc_max_footprint(void);
size_t malloc_footprint_limit(void);
size_t malloc_set_footprint_limit(size_t);
size_t malloc_footprint(void) libcesque;
size_t malloc_max_footprint(void) libcesque;
size_t malloc_footprint_limit(void) libcesque;
size_t malloc_set_footprint_limit(size_t) libcesque;
void malloc_inspect_all(void (*)(void *, void *, size_t, void *), void *);
COSMOPOLITAN_C_END_

View file

@ -8,10 +8,10 @@ struct SortedInts {
int *p;
};
bool ContainsInt(const struct SortedInts *, int);
bool InsertInt(struct SortedInts *, int, bool);
int CountInt(const struct SortedInts *, int);
int LeftmostInt(const struct SortedInts *, int);
bool ContainsInt(const struct SortedInts *, int) libcesque;
bool InsertInt(struct SortedInts *, int, bool) libcesque;
int CountInt(const struct SortedInts *, int) libcesque;
int LeftmostInt(const struct SortedInts *, int) libcesque;
COSMOPOLITAN_C_END_
#endif /* COSMOPOLITAN_LIBC_MEM_SORTEDINTS_INTERNAL_H_ */

View file

@ -4,10 +4,10 @@
#include "libc/nt/struct/startupinfo.h"
COSMOPOLITAN_C_START_
bool __is_cloexec(const struct Fd *);
void __undescribe_fds(int64_t, int64_t *, uint32_t);
bool __is_cloexec(const struct Fd *) libcesque;
void __undescribe_fds(int64_t, int64_t *, uint32_t) libcesque;
char *__describe_fds(const struct Fd *, size_t, struct NtStartupInfo *, int64_t,
int64_t **, uint32_t *);
int64_t **, uint32_t *) libcesque;
COSMOPOLITAN_C_END_
#endif /* COSMOPOLITAN_LIBC_PROC_DESCRIBEFDS_INTERNAL_H_ */

View file

@ -2,7 +2,7 @@
#define COSMOPOLITAN_LIBC_CALLS_EXECVE_SYSV_H_
COSMOPOLITAN_C_START_
bool IsApeLoadable(char[8]);
bool IsApeLoadable(char[8]) libcesque;
COSMOPOLITAN_C_END_
#endif /* COSMOPOLITAN_LIBC_CALLS_EXECVE_SYSV_H_ */

View file

@ -24,34 +24,41 @@ int posix_spawn(int *, const char *, const posix_spawn_file_actions_t *,
int posix_spawnp(int *, const char *, const posix_spawn_file_actions_t *,
const posix_spawnattr_t *, char *const[], char *const[]);
int posix_spawn_file_actions_init(posix_spawn_file_actions_t *);
int posix_spawn_file_actions_destroy(posix_spawn_file_actions_t *);
int posix_spawn_file_actions_addclose(posix_spawn_file_actions_t *, int);
int posix_spawn_file_actions_adddup2(posix_spawn_file_actions_t *, int, int);
int posix_spawn_file_actions_init(posix_spawn_file_actions_t *) libcesque;
int posix_spawn_file_actions_destroy(posix_spawn_file_actions_t *) libcesque;
int posix_spawn_file_actions_addclose(posix_spawn_file_actions_t *,
int) libcesque;
int posix_spawn_file_actions_adddup2(posix_spawn_file_actions_t *, int,
int) libcesque;
int posix_spawn_file_actions_addopen(posix_spawn_file_actions_t *, int,
const char *, int, unsigned);
const char *, int, unsigned) libcesque;
int posix_spawn_file_actions_addchdir_np(posix_spawn_file_actions_t *,
const char *);
int posix_spawn_file_actions_addfchdir_np(posix_spawn_file_actions_t *, int);
const char *) libcesque;
int posix_spawn_file_actions_addfchdir_np(posix_spawn_file_actions_t *,
int) libcesque;
int posix_spawnattr_init(posix_spawnattr_t *);
int posix_spawnattr_destroy(posix_spawnattr_t *);
int posix_spawnattr_getflags(const posix_spawnattr_t *, short *);
int posix_spawnattr_setflags(posix_spawnattr_t *, short);
int posix_spawnattr_getpgroup(const posix_spawnattr_t *, int *);
int posix_spawnattr_setpgroup(posix_spawnattr_t *, int);
int posix_spawnattr_getschedpolicy(const posix_spawnattr_t *, int *);
int posix_spawnattr_setschedpolicy(posix_spawnattr_t *, int);
int posix_spawnattr_init(posix_spawnattr_t *) libcesque;
int posix_spawnattr_destroy(posix_spawnattr_t *) libcesque;
int posix_spawnattr_getflags(const posix_spawnattr_t *, short *) libcesque;
int posix_spawnattr_setflags(posix_spawnattr_t *, short) libcesque;
int posix_spawnattr_getpgroup(const posix_spawnattr_t *, int *) libcesque;
int posix_spawnattr_setpgroup(posix_spawnattr_t *, int) libcesque;
int posix_spawnattr_getschedpolicy(const posix_spawnattr_t *, int *) libcesque;
int posix_spawnattr_setschedpolicy(posix_spawnattr_t *, int) libcesque;
int posix_spawnattr_getschedparam(const posix_spawnattr_t *,
struct sched_param *);
struct sched_param *) libcesque;
int posix_spawnattr_setschedparam(posix_spawnattr_t *,
const struct sched_param *);
int posix_spawnattr_getsigmask(const posix_spawnattr_t *, sigset_t *);
int posix_spawnattr_setsigmask(posix_spawnattr_t *, const sigset_t *);
int posix_spawnattr_getsigdefault(const posix_spawnattr_t *, sigset_t *);
int posix_spawnattr_setsigdefault(posix_spawnattr_t *, const sigset_t *);
int posix_spawnattr_getrlimit(const posix_spawnattr_t *, int, struct rlimit *);
int posix_spawnattr_setrlimit(posix_spawnattr_t *, int, const struct rlimit *);
const struct sched_param *) libcesque;
int posix_spawnattr_getsigmask(const posix_spawnattr_t *, sigset_t *) libcesque;
int posix_spawnattr_setsigmask(posix_spawnattr_t *, const sigset_t *) libcesque;
int posix_spawnattr_getsigdefault(const posix_spawnattr_t *,
sigset_t *) libcesque;
int posix_spawnattr_setsigdefault(posix_spawnattr_t *,
const sigset_t *) libcesque;
int posix_spawnattr_getrlimit(const posix_spawnattr_t *, int,
struct rlimit *) libcesque;
int posix_spawnattr_setrlimit(posix_spawnattr_t *, int,
const struct rlimit *) libcesque;
COSMOPOLITAN_C_END_
#endif /* COSMOPOLITAN_LIBC_STDIO_SPAWN_H_ */

View file

@ -43,16 +43,16 @@ struct Procs {
extern struct Procs __proc;
void __proc_wipe(void);
void __proc_lock(void);
void __proc_unlock(void);
int64_t __proc_handle(int);
int64_t __proc_search(int);
struct Proc *__proc_new(void);
void __proc_add(struct Proc *);
void __proc_free(struct Proc *);
int __proc_harvest(struct Proc *, bool);
int sys_wait4_nt(int, int *, int, struct rusage *);
void __proc_wipe(void) libcesque;
void __proc_lock(void) libcesque;
void __proc_unlock(void) libcesque;
int64_t __proc_handle(int) libcesque;
int64_t __proc_search(int) libcesque;
struct Proc *__proc_new(void) libcesque;
void __proc_add(struct Proc *) libcesque;
void __proc_free(struct Proc *) libcesque;
int __proc_harvest(struct Proc *, bool) libcesque;
int sys_wait4_nt(int, int *, int, struct rusage *) libcesque;
COSMOPOLITAN_C_END_
#endif /* COSMOPOLITAN_LIBC_PROC_H_ */

View file

@ -15,10 +15,10 @@ struct thatispacked epoll_event {
epoll_data_t data;
};
int epoll_create(int);
int epoll_create1(int);
int epoll_ctl(int, int, int, struct epoll_event *);
int epoll_wait(int, struct epoll_event *, int, int);
int epoll_create(int) libcesque;
int epoll_create1(int) libcesque;
int epoll_ctl(int, int, int, struct epoll_event *) libcesque;
int epoll_wait(int, struct epoll_event *, int, int) libcesque;
int epoll_pwait(int, struct epoll_event *, int, int, const sigset_t *);
COSMOPOLITAN_C_END_

View file

@ -3,7 +3,7 @@
#include "libc/calls/struct/timeval.h"
COSMOPOLITAN_C_START_
int GoodSocket(int, int, int, bool, const struct timeval *);
int GoodSocket(int, int, int, bool, const struct timeval *) libcesque;
COSMOPOLITAN_C_END_
#endif /* COSMOPOLITAN_LIBC_SOCK_GOODSOCKET_H_ */

View file

@ -16,8 +16,8 @@ struct ifaddrs {
void *ifa_data;
};
void freeifaddrs(struct ifaddrs *);
int getifaddrs(struct ifaddrs **);
void freeifaddrs(struct ifaddrs *) libcesque;
int getifaddrs(struct ifaddrs **) libcesque;
COSMOPOLITAN_C_END_
#endif /* COSMOPOLITAN_LIBC_SOCK_IFADDRS_H_ */

View file

@ -19,9 +19,9 @@ typedef struct fd_set {
#define FD_ZERO(SET) bzero((SET)->fds_bits, sizeof((SET)->fds_bits))
#define FD_SIZE(bits) (((bits) + (sizeof(long) * 8) - 1) / sizeof(long))
int select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
int select(int, fd_set *, fd_set *, fd_set *, struct timeval *) libcesque;
int pselect(int, fd_set *, fd_set *, fd_set *, const struct timespec *,
const sigset_t *);
const sigset_t *) libcesque;
COSMOPOLITAN_C_END_
#endif /* COSMOPOLITAN_LIBC_SOCK_SELECT_H_ */

View file

@ -4,7 +4,7 @@
#include "libc/sock/select.h"
COSMOPOLITAN_C_START_
const char *DescribeFdSet(char[100], ssize_t, int, fd_set *);
const char *DescribeFdSet(char[100], ssize_t, int, fd_set *) libcesque;
#define DescribeFdSet(x, y, z) DescribeFdSet(alloca(100), x, y, z)
COSMOPOLITAN_C_END_

View file

@ -5,10 +5,10 @@ COSMOPOLITAN_C_START_
#define INET_ADDRSTRLEN 22
#define IFHWADDRLEN 6
uint16_t htons(uint16_t) pureconst;
uint16_t ntohs(uint16_t) pureconst;
uint32_t htonl(uint32_t) pureconst;
uint32_t ntohl(uint32_t) pureconst;
libcesque uint16_t htons(uint16_t) pureconst;
libcesque uint16_t ntohs(uint16_t) pureconst;
libcesque uint32_t htonl(uint32_t) pureconst;
libcesque uint32_t ntohl(uint32_t) pureconst;
#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
#define htons(x) __builtin_bswap16(x)
@ -17,21 +17,21 @@ uint32_t ntohl(uint32_t) pureconst;
#define ntohl(x) __builtin_bswap32(x)
#endif
const char *inet_ntop(int, const void *, char *, uint32_t);
int inet_pton(int, const char *, void *);
uint32_t inet_addr(const char *);
uint32_t *GetHostIps(void);
const char *inet_ntop(int, const void *, char *, uint32_t) libcesque;
int inet_pton(int, const char *, void *) libcesque;
uint32_t inet_addr(const char *) libcesque;
libcesque uint32_t *GetHostIps(void) __wur;
int socket(int, int, int);
int listen(int, int);
int shutdown(int, int);
ssize_t send(int, const void *, size_t, int);
ssize_t recv(int, void *, size_t, int);
ssize_t sendfile(int, int, int64_t *, size_t);
int getsockopt(int, int, int, void *, uint32_t *);
int setsockopt(int, int, int, const void *, uint32_t);
int socketpair(int, int, int, int[2]);
int sockatmark(int);
int socket(int, int, int) libcesque;
int listen(int, int) libcesque;
int shutdown(int, int) libcesque;
ssize_t send(int, const void *, size_t, int) libcesque;
ssize_t recv(int, void *, size_t, int) libcesque;
ssize_t sendfile(int, int, int64_t *, size_t) libcesque;
int getsockopt(int, int, int, void *, uint32_t *) libcesque;
int setsockopt(int, int, int, const void *, uint32_t) libcesque;
int socketpair(int, int, int, int[2]) libcesque;
int sockatmark(int) libcesque;
COSMOPOLITAN_C_END_
#endif /* COSMOPOLITAN_LIBC_SOCK_SOCK_H_ */

View file

@ -2,11 +2,11 @@
#define COSMOPOLITAN_LIBC_SOCK_SYSLOG_H_
COSMOPOLITAN_C_START_
int setlogmask(int);
void openlog(const char *, int, int);
void syslog(int, const char *, ...);
void closelog(void);
void vsyslog(int, const char *, va_list);
int setlogmask(int) libcesque;
void openlog(const char *, int, int) libcesque;
void syslog(int, const char *, ...) libcesque;
void closelog(void) libcesque;
void vsyslog(int, const char *, va_list) libcesque;
COSMOPOLITAN_C_END_
#endif /* COSMOPOLITAN_LIBC_SOCK_SYSLOG_H_ */

View file

@ -21,15 +21,15 @@ struct appendz {
size_t n;
};
struct appendz appendz(char *);
ssize_t appendr(char **, size_t);
ssize_t appendd(char **, const void *, size_t);
ssize_t appendw(char **, uint64_t);
ssize_t appends(char **, const char *);
ssize_t appendf(char **, const char *, ...);
ssize_t vappendf(char **, const char *, va_list);
ssize_t kappendf(char **, const char *, ...);
ssize_t kvappendf(char **, const char *, va_list);
struct appendz appendz(char *) libcesque;
ssize_t appendr(char **, size_t) libcesque;
ssize_t appendd(char **, const void *, size_t) libcesque;
ssize_t appendw(char **, uint64_t) libcesque;
ssize_t appends(char **, const char *) libcesque;
ssize_t appendf(char **, const char *, ...) libcesque;
ssize_t vappendf(char **, const char *, va_list) libcesque;
ssize_t kappendf(char **, const char *, ...) libcesque;
ssize_t kvappendf(char **, const char *, va_list) libcesque;
COSMOPOLITAN_C_END_
#endif /* _COSMO_SOURCE */

View file

@ -2,8 +2,8 @@
#define COSMOPOLITAN_LIBC_CALLS_DPRINTF_H_
COSMOPOLITAN_C_START_
int dprintf(int, const char *, ...) paramsnonnull((2));
int vdprintf(int, const char *, va_list) paramsnonnull();
libcesque int dprintf(int, const char *, ...) paramsnonnull((2));
libcesque int vdprintf(int, const char *, va_list) paramsnonnull();
COSMOPOLITAN_C_END_
#endif /* COSMOPOLITAN_LIBC_CALLS_DPRINTF_H_ */

View file

@ -79,10 +79,12 @@ struct FTW {
int level;
};
int ftw(const char *, int (*)(const char *, const struct stat *, int), int);
int ftw(const char *, int (*)(const char *, const struct stat *, int),
int) dontthrow;
int nftw(const char *,
int (*)(const char *, const struct stat *, int, struct FTW *), int,
int);
int) dontthrow;
COSMOPOLITAN_C_END_
#endif /* COSMOPOLITAN_THIRD_PARTY_MUSL_FTW_H_ */

View file

@ -6,15 +6,15 @@ COSMOPOLITAN_C_START_
cosmopolitan § random
*/
int rand(void);
void srand(unsigned);
char *strfry(char *);
int getentropy(void *, size_t);
ssize_t getrandom(void *, size_t, unsigned);
char *initstate(unsigned, char *, size_t);
char *setstate(char *);
long random(void);
void srandom(unsigned);
int rand(void) libcesque;
void srand(unsigned) libcesque;
char *strfry(char *) libcesque;
int getentropy(void *, size_t) libcesque;
ssize_t getrandom(void *, size_t, unsigned) libcesque;
char *initstate(unsigned, char *, size_t) libcesque;
char *setstate(char *) libcesque;
long random(void) libcesque;
void srandom(unsigned) libcesque;
#ifdef _COSMO_SOURCE
#define vigna __vigna
@ -22,26 +22,26 @@ void srandom(unsigned);
#define rngset __rngset
#define rdrand __rdrand
#define rdseed __rdseed
double poz(double);
double pochisq(double, int);
uint64_t lemur64(void);
uint64_t _rand64(void);
uint64_t vigna(void);
uint64_t vigna_r(uint64_t[hasatleast 1]);
void svigna(uint64_t);
uint64_t rdrand(void);
uint64_t rdseed(void);
void _smt19937(uint64_t);
void _Smt19937(uint64_t[], size_t);
uint64_t _mt19937(void);
double _real1(uint64_t);
double _real2(uint64_t);
double _real3(uint64_t);
double MeasureEntropy(const char *, size_t);
void *rngset(void *, size_t, uint64_t (*)(void), size_t);
void rt_init(int);
void rt_add(void *, int);
void rt_end(double *, double *, double *, double *, double *);
double poz(double) libcesque;
double pochisq(double, int) libcesque;
uint64_t lemur64(void) libcesque;
uint64_t _rand64(void) libcesque;
uint64_t vigna(void) libcesque;
uint64_t vigna_r(uint64_t[hasatleast 1]) libcesque;
void svigna(uint64_t) libcesque;
uint64_t rdrand(void) libcesque;
uint64_t rdseed(void) libcesque;
void _smt19937(uint64_t) libcesque;
void _Smt19937(uint64_t[], size_t) libcesque;
uint64_t _mt19937(void) libcesque;
double _real1(uint64_t) libcesque;
double _real2(uint64_t) libcesque;
double _real3(uint64_t) libcesque;
double MeasureEntropy(const char *, size_t) libcesque;
void *rngset(void *, size_t, uint64_t (*)(void), size_t) libcesque;
void rt_init(int) libcesque;
void rt_add(void *, int) libcesque;
void rt_end(double *, double *, double *, double *, double *) libcesque;
#endif /* _COSMO_SOURCE */
COSMOPOLITAN_C_END_

View file

@ -29,110 +29,105 @@ extern FILE *stdin;
extern FILE *stdout;
extern FILE *stderr;
errno_t ferror(FILE *) paramsnonnull();
void clearerr(FILE *) paramsnonnull();
int feof(FILE *) paramsnonnull();
int getc(FILE *) paramsnonnull();
int putc(int, FILE *) paramsnonnull();
int fflush(FILE *);
int fpurge(FILE *);
int fgetc(FILE *) paramsnonnull();
char *fgetln(FILE *, size_t *) paramsnonnull((1));
int ungetc(int, FILE *) paramsnonnull();
int fileno(FILE *) paramsnonnull() nosideeffect;
int fputc(int, FILE *) paramsnonnull();
int fputs(const char *, FILE *) paramsnonnull();
int fputws(const wchar_t *, FILE *) paramsnonnull();
void flockfile(FILE *) paramsnonnull();
void funlockfile(FILE *) paramsnonnull();
int ftrylockfile(FILE *) paramsnonnull();
char *fgets(char *, int, FILE *) paramsnonnull();
wchar_t *fgetws(wchar_t *, int, FILE *) paramsnonnull();
wint_t putwc(wchar_t, FILE *) paramsnonnull();
wint_t fputwc(wchar_t, FILE *) paramsnonnull();
wint_t putwchar(wchar_t);
wint_t getwchar(void);
wint_t getwc(FILE *) paramsnonnull();
wint_t fgetwc(FILE *) paramsnonnull();
wint_t ungetwc(wint_t, FILE *) paramsnonnull();
int getchar(void);
int putchar(int);
int puts(const char *);
ssize_t getline(char **, size_t *, FILE *) paramsnonnull();
ssize_t getdelim(char **, size_t *, int, FILE *) paramsnonnull();
FILE *fopen(const char *, const char *) paramsnonnull((2)) __wur;
FILE *fdopen(int, const char *) paramsnonnull() __wur;
FILE *fmemopen(void *, size_t, const char *) paramsnonnull((3)) __wur;
errno_t ferror(FILE *) libcesque paramsnonnull();
void clearerr(FILE *) libcesque paramsnonnull();
int feof(FILE *) libcesque paramsnonnull();
int getc(FILE *) libcesque paramsnonnull();
int putc(int, FILE *) libcesque paramsnonnull();
int fflush(FILE *) libcesque;
int fpurge(FILE *) libcesque;
int fgetc(FILE *) libcesque paramsnonnull();
char *fgetln(FILE *, size_t *) libcesque paramsnonnull((1));
int ungetc(int, FILE *) libcesque paramsnonnull();
int fileno(FILE *) libcesque paramsnonnull() nosideeffect;
int fputc(int, FILE *) libcesque paramsnonnull();
int fputs(const char *, FILE *) libcesque paramsnonnull();
int fputws(const wchar_t *, FILE *) libcesque paramsnonnull();
void flockfile(FILE *) libcesque paramsnonnull();
void funlockfile(FILE *) libcesque paramsnonnull();
int ftrylockfile(FILE *) libcesque paramsnonnull();
char *fgets(char *, int, FILE *) libcesque paramsnonnull();
wchar_t *fgetws(wchar_t *, int, FILE *) libcesque paramsnonnull();
wint_t putwc(wchar_t, FILE *) libcesque paramsnonnull();
wint_t fputwc(wchar_t, FILE *) libcesque paramsnonnull();
wint_t putwchar(wchar_t) libcesque;
wint_t getwchar(void) libcesque;
wint_t getwc(FILE *) libcesque paramsnonnull();
wint_t fgetwc(FILE *) libcesque paramsnonnull();
wint_t ungetwc(wint_t, FILE *) libcesque paramsnonnull();
int getchar(void) libcesque;
int putchar(int) libcesque;
int puts(const char *) libcesque;
ssize_t getline(char **, size_t *, FILE *) libcesque paramsnonnull();
ssize_t getdelim(char **, size_t *, int, FILE *) libcesque paramsnonnull();
FILE *fopen(const char *, const char *) libcesque paramsnonnull((2)) __wur;
FILE *fdopen(int, const char *) libcesque paramsnonnull() __wur;
FILE *fmemopen(void *, size_t, const char *) libcesque paramsnonnull((3)) __wur;
FILE *freopen(const char *, const char *, FILE *) paramsnonnull((2, 3));
size_t fread(void *, size_t, size_t, FILE *) paramsnonnull((4));
size_t fread(void *, size_t, size_t, FILE *) libcesque paramsnonnull((4));
size_t fwrite(const void *, size_t, size_t, FILE *) paramsnonnull((4));
int fclose(FILE *);
int fseek(FILE *, long, int) paramsnonnull();
long ftell(FILE *) paramsnonnull();
int fseeko(FILE *, int64_t, int) paramsnonnull();
int64_t ftello(FILE *) paramsnonnull();
void rewind(FILE *) paramsnonnull();
int fopenflags(const char *) paramsnonnull();
void setlinebuf(FILE *);
void setbuf(FILE *, char *);
void setbuffer(FILE *, char *, size_t);
int setvbuf(FILE *, char *, int, size_t);
int pclose(FILE *);
char *ctermid(char *);
void perror(const char *) relegated;
size_t confstr(int, char *, size_t);
int fclose(FILE *) libcesque;
int fseek(FILE *, long, int) libcesque paramsnonnull();
long ftell(FILE *) libcesque paramsnonnull();
int fseeko(FILE *, int64_t, int) libcesque paramsnonnull();
int64_t ftello(FILE *) libcesque paramsnonnull();
void rewind(FILE *) libcesque paramsnonnull();
int fopenflags(const char *) libcesque paramsnonnull();
void setlinebuf(FILE *) libcesque;
void setbuf(FILE *, char *) libcesque;
void setbuffer(FILE *, char *, size_t) libcesque;
int setvbuf(FILE *, char *, int, size_t) libcesque;
int pclose(FILE *) libcesque;
char *ctermid(char *) libcesque;
void perror(const char *) libcesque relegated;
size_t confstr(int, char *, size_t) libcesque;
typedef uint64_t fpos_t;
char *gets(char *) paramsnonnull();
int fgetpos(FILE *, fpos_t *) paramsnonnull();
int fsetpos(FILE *, const fpos_t *) paramsnonnull();
char *gets(char *) libcesque paramsnonnull();
int fgetpos(FILE *, fpos_t *) libcesque paramsnonnull();
int fsetpos(FILE *, const fpos_t *) libcesque paramsnonnull();
FILE *tmpfile(void) __wur;
char *tmpnam(char *) __wur;
char *tmpnam_r(char *) __wur;
int system(const char *);
FILE *popen(const char *, const char *);
FILE *tmpfile(void) libcesque __wur;
char *tmpnam(char *) libcesque __wur;
char *tmpnam_r(char *) libcesque __wur;
int system(const char *) libcesque;
FILE *popen(const char *, const char *) libcesque;
/*───────────────────────────────────────────────────────────────────────────│─╗
cosmopolitan § standard i/o » formatting
*/
int printf(const char *, ...) printfesque(1)
paramsnonnull((1)) dontthrow nocallback;
int vprintf(const char *, va_list) paramsnonnull() dontthrow nocallback;
int printf(const char *, ...) printfesque(1) paramsnonnull((1)) libcesque;
int vprintf(const char *, va_list) paramsnonnull() libcesque;
int fprintf(FILE *, const char *, ...) printfesque(2)
paramsnonnull((1, 2)) dontthrow nocallback;
int vfprintf(FILE *, const char *, va_list)
paramsnonnull() dontthrow nocallback;
int scanf(const char *, ...) scanfesque(1);
int vscanf(const char *, va_list);
int fscanf(FILE *, const char *, ...) scanfesque(2);
int vfscanf(FILE *, const char *, va_list);
paramsnonnull((1, 2)) libcesque;
int vfprintf(FILE *, const char *, va_list) paramsnonnull() libcesque;
int scanf(const char *, ...) libcesque scanfesque(1);
int vscanf(const char *, va_list) libcesque;
int fscanf(FILE *, const char *, ...) libcesque scanfesque(2);
int vfscanf(FILE *, const char *, va_list) libcesque;
int snprintf(char *, size_t, const char *, ...)
printfesque(3) dontthrow nocallback;
int vsnprintf(char *, size_t, const char *, va_list)
dontthrow nocallback;
int sprintf(char *, const char *, ...) dontthrow nocallback;
int vsprintf(char *, const char *, va_list)
dontthrow nocallback;
int snprintf(char *, size_t, const char *, ...) printfesque(3) libcesque;
int vsnprintf(char *, size_t, const char *, va_list) libcesque;
int sprintf(char *, const char *, ...) libcesque;
int vsprintf(char *, const char *, va_list) libcesque;
int fwprintf(FILE *, const wchar_t *, ...);
int fwscanf(FILE *, const wchar_t *, ...);
int swprintf(wchar_t *, size_t, const wchar_t *, ...);
int swscanf(const wchar_t *, const wchar_t *, ...);
int vfwprintf(FILE *, const wchar_t *, va_list);
int vfwscanf(FILE *, const wchar_t *, va_list);
int vswprintf(wchar_t *, size_t, const wchar_t *, va_list);
int vswscanf(const wchar_t *, const wchar_t *, va_list);
int vwprintf(const wchar_t *, va_list);
int vwscanf(const wchar_t *, va_list);
int wprintf(const wchar_t *, ...);
int wscanf(const wchar_t *, ...);
int fwide(FILE *, int);
int fwprintf(FILE *, const wchar_t *, ...) libcesque;
int fwscanf(FILE *, const wchar_t *, ...) libcesque;
int swprintf(wchar_t *, size_t, const wchar_t *, ...) libcesque;
int swscanf(const wchar_t *, const wchar_t *, ...) libcesque;
int vfwprintf(FILE *, const wchar_t *, va_list) libcesque;
int vfwscanf(FILE *, const wchar_t *, va_list) libcesque;
int vswprintf(wchar_t *, size_t, const wchar_t *, va_list) libcesque;
int vswscanf(const wchar_t *, const wchar_t *, va_list) libcesque;
int vwprintf(const wchar_t *, va_list) libcesque;
int vwscanf(const wchar_t *, va_list) libcesque;
int wprintf(const wchar_t *, ...) libcesque;
int wscanf(const wchar_t *, ...) libcesque;
int fwide(FILE *, int) libcesque;
int sscanf(const char *, const char *, ...) scanfesque(2);
int vsscanf(const char *, const char *, va_list);
int sscanf(const char *, const char *, ...) libcesque scanfesque(2);
int vsscanf(const char *, const char *, va_list) libcesque;
/*───────────────────────────────────────────────────────────────────────────│─╗
cosmopolitan § standard i/o » allocating
@ -146,38 +141,36 @@ int vasprintf(char **, const char *, va_list) paramsnonnull() libcesque;
cosmopolitan § standard i/o » without mutexes
*/
int getc_unlocked(FILE *) paramsnonnull();
int puts_unlocked(const char *);
int getchar_unlocked(void);
int putc_unlocked(int, FILE *) paramsnonnull();
int putchar_unlocked(int);
void clearerr_unlocked(FILE *);
int feof_unlocked(FILE *);
int ferror_unlocked(FILE *);
int fileno_unlocked(FILE *);
int fflush_unlocked(FILE *);
int fgetc_unlocked(FILE *);
int fputc_unlocked(int, FILE *);
size_t fread_unlocked(void *, size_t, size_t, FILE *);
size_t fwrite_unlocked(const void *, size_t, size_t, FILE *);
char *fgets_unlocked(char *, int, FILE *);
int fputs_unlocked(const char *, FILE *);
wint_t getwc_unlocked(FILE *);
wint_t getwchar_unlocked(void);
wint_t fgetwc_unlocked(FILE *);
wint_t fputwc_unlocked(wchar_t, FILE *);
wint_t putwc_unlocked(wchar_t, FILE *);
wint_t putwchar_unlocked(wchar_t);
wchar_t *fgetws_unlocked(wchar_t *, int, FILE *);
int fputws_unlocked(const wchar_t *, FILE *);
wint_t ungetwc_unlocked(wint_t, FILE *) paramsnonnull();
int ungetc_unlocked(int, FILE *) paramsnonnull();
int fseek_unlocked(FILE *, int64_t, int) paramsnonnull();
int getc_unlocked(FILE *) libcesque paramsnonnull();
int puts_unlocked(const char *) libcesque;
int getchar_unlocked(void) libcesque;
int putc_unlocked(int, FILE *) libcesque paramsnonnull();
int putchar_unlocked(int) libcesque;
void clearerr_unlocked(FILE *) libcesque;
int feof_unlocked(FILE *) libcesque;
int ferror_unlocked(FILE *) libcesque;
int fileno_unlocked(FILE *) libcesque;
int fflush_unlocked(FILE *) libcesque;
int fgetc_unlocked(FILE *) libcesque;
int fputc_unlocked(int, FILE *) libcesque;
size_t fread_unlocked(void *, size_t, size_t, FILE *) libcesque;
size_t fwrite_unlocked(const void *, size_t, size_t, FILE *) libcesque;
char *fgets_unlocked(char *, int, FILE *) libcesque;
int fputs_unlocked(const char *, FILE *) libcesque;
wint_t getwc_unlocked(FILE *) libcesque;
wint_t getwchar_unlocked(void) libcesque;
wint_t fgetwc_unlocked(FILE *) libcesque;
wint_t fputwc_unlocked(wchar_t, FILE *) libcesque;
wint_t putwc_unlocked(wchar_t, FILE *) libcesque;
wint_t putwchar_unlocked(wchar_t) libcesque;
wchar_t *fgetws_unlocked(wchar_t *, int, FILE *) libcesque;
int fputws_unlocked(const wchar_t *, FILE *) libcesque;
wint_t ungetwc_unlocked(wint_t, FILE *) libcesque paramsnonnull();
int ungetc_unlocked(int, FILE *) libcesque paramsnonnull();
int fseek_unlocked(FILE *, int64_t, int) libcesque paramsnonnull();
ssize_t getdelim_unlocked(char **, size_t *, int, FILE *) paramsnonnull();
int fprintf_unlocked(FILE *, const char *, ...) printfesque(2)
paramsnonnull((1, 2)) dontthrow nocallback;
int vfprintf_unlocked(FILE *, const char *, va_list)
paramsnonnull() dontthrow nocallback;
int fprintf_unlocked(FILE *, const char *, ...) printfesque(2) libcesque;
int vfprintf_unlocked(FILE *, const char *, va_list) paramsnonnull() libcesque;
COSMOPOLITAN_C_END_
#endif /* COSMOPOLITAN_LIBC_STDIO_H_ */

View file

@ -8,20 +8,20 @@
COSMOPOLITAN_C_START_
size_t __fbufsize(FILE *);
size_t __fpending(FILE *);
int __flbf(FILE *);
int __freadable(FILE *);
int __fwritable(FILE *);
int __freading(FILE *);
int __fwriting(FILE *);
int __fsetlocking(FILE *, int);
void _flushlbf(void);
void __fpurge(FILE *);
void __fseterr(FILE *);
const char *__freadptr(FILE *, size_t *);
size_t __freadahead(FILE *);
void __freadptrinc(FILE *, size_t);
size_t __fbufsize(FILE *) libcesque;
size_t __fpending(FILE *) libcesque;
int __flbf(FILE *) libcesque;
int __freadable(FILE *) libcesque;
int __fwritable(FILE *) libcesque;
int __freading(FILE *) libcesque;
int __fwriting(FILE *) libcesque;
int __fsetlocking(FILE *, int) libcesque;
void _flushlbf(void) libcesque;
void __fpurge(FILE *) libcesque;
void __fseterr(FILE *) libcesque;
const char *__freadptr(FILE *, size_t *) libcesque;
size_t __freadahead(FILE *) libcesque;
void __freadptrinc(FILE *, size_t) libcesque;
COSMOPOLITAN_C_END_
#endif /* COSMOPOLITAN_LIBC_STDIO_STDIO_EXT_H_ */

View file

@ -27,7 +27,7 @@
* - `SYS_gettid`
* - `SYS_getrandom`
*
* @return negative errno on error
* @return system call result, or -1 w/ errno
*/
long syscall(long number, ...) {
switch (number) {

View file

@ -5,7 +5,7 @@ COSMOPOLITAN_C_START_
#define SYS_gettid 186
#define SYS_getrandom 318
long syscall(long, ...);
long syscall(long, ...) libcesque;
COSMOPOLITAN_C_END_
#endif /* COSMOPOLITAN_LIBC_STDIO_SYSCALL_H_ */

View file

@ -2,9 +2,9 @@
#define COSMOPOLITAN_LIBC_STDLIB_H_
COSMOPOLITAN_C_START_
char *fcvt(double, int, int *, int *);
char *ecvt(double, int, int *, int *);
char *gcvt(double, int, char *);
char *fcvt(double, int, int *, int *) libcesque;
char *ecvt(double, int, int *, int *) libcesque;
char *gcvt(double, int, char *) libcesque;
COSMOPOLITAN_C_END_
#endif /* COSMOPOLITAN_LIBC_STDLIB_H_ */

View file

@ -2,7 +2,7 @@
#define COSMOPOLITAN_LIBC_STR_HIGHWAYHASH64_H_
COSMOPOLITAN_C_START_
uint64_t HighwayHash64(const void *, size_t, const uint64_t[4]);
uint64_t HighwayHash64(const void *, size_t, const uint64_t[4]) libcesque;
COSMOPOLITAN_C_END_
#endif /* COSMOPOLITAN_LIBC_STR_HIGHWAYHASH64_H_ */

View file

@ -40,48 +40,48 @@ extern const struct __locale_map __c_dot_utf8;
extern const struct __locale_struct __c_locale;
extern const struct __locale_struct __c_dot_utf8_locale;
char *nl_langinfo_l(int, locale_t);
char *setlocale(int, const char *);
double strtod_l(const char *, char **, locale_t);
double wcstod_l(const wchar_t *, wchar_t **, locale_t);
float strtof_l(const char *, char **, locale_t);
float wcstof_l(const wchar_t *, wchar_t **, locale_t);
int isdigit_l(int, locale_t);
int islower_l(int, locale_t);
int isupper_l(int, locale_t);
int iswalpha_l(wint_t, locale_t);
int iswblank_l(wint_t, locale_t);
int iswcntrl_l(wint_t, locale_t);
int iswdigit_l(wint_t, locale_t);
int iswlower_l(wint_t, locale_t);
int iswprint_l(wint_t, locale_t);
int iswpunct_l(wint_t, locale_t);
int iswspace_l(wint_t, locale_t);
int iswupper_l(wint_t, locale_t);
int iswxdigit_l(wint_t, locale_t);
int isxdigit_l(int, locale_t);
int strcoll_l(const char *, const char *, locale_t);
int tolower_l(int, locale_t);
int toupper_l(int, locale_t);
int wcscoll_l(const wchar_t *, const wchar_t *, locale_t);
locale_t duplocale(locale_t);
locale_t newlocale(int, const char *, locale_t);
locale_t uselocale(locale_t);
long double strtold_l(const char *, char **, locale_t);
long double wcstold_l(const wchar_t *, wchar_t **, locale_t);
long long strtoll_l(const char *, char **, int, locale_t);
long long wcstoll_l(const wchar_t *, wchar_t **, int, locale_t);
char *nl_langinfo_l(int, locale_t) libcesque;
char *setlocale(int, const char *) libcesque;
double strtod_l(const char *, char **, locale_t) libcesque;
double wcstod_l(const wchar_t *, wchar_t **, locale_t) libcesque;
float strtof_l(const char *, char **, locale_t) libcesque;
float wcstof_l(const wchar_t *, wchar_t **, locale_t) libcesque;
int isdigit_l(int, locale_t) libcesque;
int islower_l(int, locale_t) libcesque;
int isupper_l(int, locale_t) libcesque;
int iswalpha_l(wint_t, locale_t) libcesque;
int iswblank_l(wint_t, locale_t) libcesque;
int iswcntrl_l(wint_t, locale_t) libcesque;
int iswdigit_l(wint_t, locale_t) libcesque;
int iswlower_l(wint_t, locale_t) libcesque;
int iswprint_l(wint_t, locale_t) libcesque;
int iswpunct_l(wint_t, locale_t) libcesque;
int iswspace_l(wint_t, locale_t) libcesque;
int iswupper_l(wint_t, locale_t) libcesque;
int iswxdigit_l(wint_t, locale_t) libcesque;
int isxdigit_l(int, locale_t) libcesque;
int strcoll_l(const char *, const char *, locale_t) libcesque;
int tolower_l(int, locale_t) libcesque;
int toupper_l(int, locale_t) libcesque;
int wcscoll_l(const wchar_t *, const wchar_t *, locale_t) libcesque;
locale_t duplocale(locale_t) libcesque;
locale_t newlocale(int, const char *, locale_t) libcesque;
locale_t uselocale(locale_t) libcesque;
long double strtold_l(const char *, char **, locale_t) libcesque;
long double wcstold_l(const wchar_t *, wchar_t **, locale_t) libcesque;
long long strtoll_l(const char *, char **, int, locale_t) libcesque;
long long wcstoll_l(const wchar_t *, wchar_t **, int, locale_t) libcesque;
size_t strftime_l(char *, size_t, char const *, struct tm const *, locale_t);
size_t strxfrm_l(char *, const char *, size_t, locale_t);
size_t wcsxfrm_l(wchar_t *, const wchar_t *, size_t, locale_t);
unsigned long long strtoull_l(const char *, char **, int, locale_t);
size_t strxfrm_l(char *, const char *, size_t, locale_t) libcesque;
size_t wcsxfrm_l(wchar_t *, const wchar_t *, size_t, locale_t) libcesque;
unsigned long long strtoull_l(const char *, char **, int, locale_t) libcesque;
unsigned long long wcstoull_l(const wchar_t *, wchar_t **, int, locale_t);
void freelocale(locale_t);
wint_t towlower_l(wint_t, locale_t);
wint_t towupper_l(wint_t, locale_t);
int strcasecmp_l(const char *, const char *, locale_t);
int strncasecmp_l(const char *, const char *, size_t, locale_t);
ssize_t strfmon_l(char *, size_t, locale_t, const char *, ...);
void freelocale(locale_t) libcesque;
wint_t towlower_l(wint_t, locale_t) libcesque;
wint_t towupper_l(wint_t, locale_t) libcesque;
int strcasecmp_l(const char *, const char *, locale_t) libcesque;
int strncasecmp_l(const char *, const char *, size_t, locale_t) libcesque;
ssize_t strfmon_l(char *, size_t, locale_t, const char *, ...) libcesque;
COSMOPOLITAN_C_END_
#endif /* COSMOPOLITAN_LIBC_STR_LOCALE_H_ */

View file

@ -9,9 +9,9 @@ COSMOPOLITAN_C_START_
typedef int nl_item;
typedef void *nl_catd;
nl_catd catopen(const char *, int);
char *catgets(nl_catd, int, int, const char *);
int catclose(nl_catd);
nl_catd catopen(const char *, int) libcesque;
char *catgets(nl_catd, int, int, const char *) libcesque;
int catclose(nl_catd) libcesque;
COSMOPOLITAN_C_END_
#endif /* COSMOPOLITAN_LIBC_STR_NLTYPES_H_ */

View file

@ -16,8 +16,8 @@ COSMOPOLITAN_C_START_
__n == (m) && !memcasecmp(a, b, __n); \
})
int CompareSlices(const char *, size_t, const char *, size_t);
int CompareSlicesCase(const char *, size_t, const char *, size_t);
int CompareSlices(const char *, size_t, const char *, size_t) libcesque;
int CompareSlicesCase(const char *, size_t, const char *, size_t) libcesque;
COSMOPOLITAN_C_END_
#endif /* COSMOPOLITAN_LIBC_STR_SLICE_H_ */

View file

@ -23,38 +23,38 @@
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
int isascii(int);
int isspace(int);
int isalpha(int);
int isdigit(int);
int isalnum(int);
int isxdigit(int);
int isprint(int);
int islower(int);
int isupper(int);
int isblank(int);
int iscntrl(int);
int isgraph(int);
int tolower(int);
int ispunct(int);
int toupper(int);
int toascii(int);
int isascii(int) libcesque;
int isspace(int) libcesque;
int isalpha(int) libcesque;
int isdigit(int) libcesque;
int isalnum(int) libcesque;
int isxdigit(int) libcesque;
int isprint(int) libcesque;
int islower(int) libcesque;
int isupper(int) libcesque;
int isblank(int) libcesque;
int iscntrl(int) libcesque;
int isgraph(int) libcesque;
int tolower(int) libcesque;
int ispunct(int) libcesque;
int toupper(int) libcesque;
int toascii(int) libcesque;
int iswalnum(wint_t);
int iswalpha(wint_t);
int iswblank(wint_t);
int iswcntrl(wint_t);
int iswdigit(wint_t);
int iswgraph(wint_t);
int iswlower(wint_t);
int iswspace(wint_t);
int iswupper(wint_t);
int iswxdigit(wint_t);
int iswpunct(wint_t);
int iswprint(wint_t);
int iswseparator(wint_t);
wint_t towlower(wint_t);
wint_t towupper(wint_t);
int iswalnum(wint_t) libcesque;
int iswalpha(wint_t) libcesque;
int iswblank(wint_t) libcesque;
int iswcntrl(wint_t) libcesque;
int iswdigit(wint_t) libcesque;
int iswgraph(wint_t) libcesque;
int iswlower(wint_t) libcesque;
int iswspace(wint_t) libcesque;
int iswupper(wint_t) libcesque;
int iswxdigit(wint_t) libcesque;
int iswpunct(wint_t) libcesque;
int iswprint(wint_t) libcesque;
int iswseparator(wint_t) libcesque;
wint_t towlower(wint_t) libcesque;
wint_t towupper(wint_t) libcesque;
void *memset(void *, int, size_t) memcpyesque;
void *memmove(void *, const void *, size_t) memcpyesque;
@ -65,19 +65,19 @@ void *memccpy(void *restrict, const void *restrict, int, size_t) memcpyesque;
void explicit_bzero(void *, size_t);
int memcmp(const void *, const void *, size_t) strlenesque;
int timingsafe_bcmp(const void *, const void *, size_t);
int timingsafe_memcmp(const void *, const void *, size_t);
int timingsafe_bcmp(const void *, const void *, size_t) libcesque;
int timingsafe_memcmp(const void *, const void *, size_t) libcesque;
size_t strlen(const char *) strlenesque;
size_t strnlen(const char *, size_t) strlenesque;
size_t strnlen_s(const char *, size_t);
size_t strnlen_s(const char *, size_t) libcesque;
char *strchr(const char *, int) strlenesque;
void *memchr(const void *, int, size_t) strlenesque;
char *strchrnul(const char *, int) strlenesque returnsnonnull;
void *rawmemchr(const void *, int) strlenesque returnsnonnull;
size_t wcslen(const wchar_t *) strlenesque;
size_t wcsnlen(const wchar_t *, size_t) strlenesque;
size_t wcsnlen_s(const wchar_t *, size_t);
size_t wcsnlen_s(const wchar_t *, size_t) libcesque;
wchar_t *wcschr(const wchar_t *, wchar_t) strlenesque;
wchar_t *wmemchr(const wchar_t *, wchar_t, size_t) strlenesque;
wchar_t *wcschrnul(const wchar_t *, wchar_t)
@ -107,14 +107,14 @@ size_t strcspn(const char *, const char *) strlenesque;
size_t wcscspn(const wchar_t *, const wchar_t *) strlenesque;
void *memfrob(void *, size_t) memcpyesque;
int strcoll(const char *, const char *) strlenesque;
char *strsep(char **, const char *) paramsnonnull();
char *strsep(char **, const char *) libcesque paramsnonnull();
char *stpcpy(char *, const char *) memcpyesque;
char *stpncpy(char *, const char *, size_t) memcpyesque;
char *strcat(char *, const char *) memcpyesque;
wchar_t *wcscat(wchar_t *, const wchar_t *) memcpyesque;
size_t strlcpy(char *, const char *, size_t);
size_t strlcat(char *, const char *, size_t);
size_t strxfrm(char *, const char *, size_t);
size_t strlcpy(char *, const char *, size_t) libcesque;
size_t strlcat(char *, const char *, size_t) libcesque;
size_t strxfrm(char *, const char *, size_t) libcesque;
char *strcpy(char *, const char *) memcpyesque;
wchar_t *wcscpy(wchar_t *, const wchar_t *) memcpyesque;
char *strncat(char *, const char *, size_t) memcpyesque;
@ -123,56 +123,56 @@ char *strncpy(char *, const char *, size_t) memcpyesque;
char *strtok(char *, const char *) paramsnonnull((2)) libcesque;
char *strtok_r(char *, const char *, char **) paramsnonnull((2, 3));
wchar_t *wcstok(wchar_t *, const wchar_t *, wchar_t **) paramsnonnull((2, 3));
int strverscmp(const char *, const char *);
int strverscmp(const char *, const char *) libcesque;
wchar_t *wmemset(wchar_t *, wchar_t, size_t) memcpyesque;
wchar_t *wmemcpy(wchar_t *, const wchar_t *, size_t) memcpyesque;
wchar_t *wmempcpy(wchar_t *, const wchar_t *, size_t) memcpyesque;
wchar_t *wmemmove(wchar_t *, const wchar_t *, size_t) memcpyesque;
void *memmem(const void *, size_t, const void *, size_t)
libcesque nosideeffect;
ssize_t strfmon(char *, size_t, const char *, ...);
long a64l(const char *);
char *l64a(long);
ssize_t strfmon(char *, size_t, const char *, ...) libcesque;
long a64l(const char *) libcesque;
char *l64a(long) libcesque;
typedef unsigned mbstate_t;
wchar_t *wcsncpy(wchar_t *, const wchar_t *, size_t);
int mbtowc(wchar_t *, const char *, size_t);
size_t mbrtowc(wchar_t *, const char *, size_t, mbstate_t *);
size_t mbsrtowcs(wchar_t *, const char **, size_t, mbstate_t *);
size_t mbstowcs(wchar_t *, const char *, size_t);
size_t wcrtomb(char *, wchar_t, mbstate_t *);
size_t c32rtomb(char *, char32_t, mbstate_t *);
size_t mbrtoc32(char32_t *, const char *, size_t, mbstate_t *);
size_t c16rtomb(char *, char16_t, mbstate_t *);
size_t mbrtoc16(char16_t *, const char *, size_t, mbstate_t *);
size_t mbrlen(const char *, size_t, mbstate_t *);
wchar_t *wcsncpy(wchar_t *, const wchar_t *, size_t) libcesque;
int mbtowc(wchar_t *, const char *, size_t) libcesque;
size_t mbrtowc(wchar_t *, const char *, size_t, mbstate_t *) libcesque;
size_t mbsrtowcs(wchar_t *, const char **, size_t, mbstate_t *) libcesque;
size_t mbstowcs(wchar_t *, const char *, size_t) libcesque;
size_t wcrtomb(char *, wchar_t, mbstate_t *) libcesque;
size_t c32rtomb(char *, char32_t, mbstate_t *) libcesque;
size_t mbrtoc32(char32_t *, const char *, size_t, mbstate_t *) libcesque;
size_t c16rtomb(char *, char16_t, mbstate_t *) libcesque;
size_t mbrtoc16(char16_t *, const char *, size_t, mbstate_t *) libcesque;
size_t mbrlen(const char *, size_t, mbstate_t *) libcesque;
size_t mbsnrtowcs(wchar_t *, const char **, size_t, size_t, mbstate_t *);
size_t wcsnrtombs(char *, const wchar_t **, size_t, size_t, mbstate_t *);
size_t wcsrtombs(char *, const wchar_t **, size_t, mbstate_t *);
size_t wcstombs(char *, const wchar_t *, size_t);
int mbsinit(const mbstate_t *);
int mblen(const char *, size_t);
int wctomb(char *, wchar_t);
int wctob(wint_t);
wint_t btowc(int);
size_t wcsrtombs(char *, const wchar_t **, size_t, mbstate_t *) libcesque;
size_t wcstombs(char *, const wchar_t *, size_t) libcesque;
int mbsinit(const mbstate_t *) libcesque;
int mblen(const char *, size_t) libcesque;
int wctomb(char *, wchar_t) libcesque;
int wctob(wint_t) libcesque;
wint_t btowc(int) libcesque;
typedef unsigned wctype_t;
wctype_t wctype(const char *) strlenesque;
int iswctype(wint_t, wctype_t) pureconst;
pureconst int iswctype(wint_t, wctype_t) libcesque;
typedef const int *wctrans_t;
wctrans_t wctrans(const char *);
wint_t towctrans(wint_t, wctrans_t);
wctrans_t wctrans(const char *) libcesque;
wint_t towctrans(wint_t, wctrans_t) libcesque;
int getsubopt(char **, char *const *, char **) paramsnonnull();
int getsubopt(char **, char *const *, char **) libcesque paramsnonnull();
char *strsignal(int) returnsnonnull libcesque;
char *strerror(int) returnsnonnull dontthrow nocallback;
errno_t strerror_r(int, char *, size_t) libcesque;
char *__xpg_strerror_r(int, char *, size_t) libcesque;
#ifdef _COSMO_SOURCE
uint64_t tpenc(uint32_t) pureconst;
pureconst uint64_t tpenc(uint32_t) libcesque;
char *chomp(char *) libcesque;
wchar_t *wchomp(wchar_t *) libcesque;
uint64_t __fnv(const void *, size_t) strlenesque;
@ -205,11 +205,11 @@ char16_t *strncat16(char16_t *, const char16_t *, size_t) memcpyesque;
char16_t *memset16(char16_t *, char16_t, size_t) memcpyesque;
bool32 startswith16(const char16_t *, const char16_t *) strlenesque;
bool32 endswith16(const char16_t *, const char16_t *) strlenesque;
axdx_t tprecode8to16(char16_t *, size_t, const char *);
axdx_t tprecode16to8(char *, size_t, const char16_t *);
axdx_t tprecode8to16(char16_t *, size_t, const char *) libcesque;
axdx_t tprecode16to8(char *, size_t, const char16_t *) libcesque;
bool32 wcsstartswith(const wchar_t *, const wchar_t *) strlenesque;
bool32 wcsendswith(const wchar_t *, const wchar_t *) strlenesque;
char *__join_paths(char *, size_t, const char *, const char *) __wur;
char *__join_paths(char *, size_t, const char *, const char *) libcesque __wur;
int __mkntpathat(int, const char *, int, char16_t[hasatleast 1024]);
#endif /* _COSMO_SOURCE */

View file

@ -29,9 +29,9 @@ struct lconv {
char int_n_sign_posn;
};
int wcwidth(wchar_t) pureconst;
pureconst int wcwidth(wchar_t) libcesque;
int wcswidth(const wchar_t *, size_t) strlenesque;
struct lconv *localeconv(void);
struct lconv *localeconv(void) libcesque;
#ifdef _COSMO_SOURCE
int wcsnwidth(const wchar_t *, size_t, size_t) strlenesque;

View file

@ -19,137 +19,137 @@
* @see libc/sysv/errfuns.inc (for implementation)
*/
intptr_t einval(void) relegated;
intptr_t eperm(void) relegated;
intptr_t enoent(void) relegated;
intptr_t esrch(void) relegated;
intptr_t eintr(void) relegated;
intptr_t eio(void) relegated;
intptr_t enxio(void) relegated;
intptr_t e2big(void) relegated;
intptr_t enoexec(void) relegated;
intptr_t ebadf(void) relegated;
intptr_t echild(void) relegated;
intptr_t eagain(void) relegated;
intptr_t enomem(void) relegated;
intptr_t eacces(void) relegated;
intptr_t efault(void) relegated;
intptr_t enotblk(void) relegated;
intptr_t ebusy(void) relegated;
intptr_t eexist(void) relegated;
intptr_t exdev(void) relegated;
intptr_t enodev(void) relegated;
intptr_t enotdir(void) relegated;
intptr_t eisdir(void) relegated;
intptr_t enfile(void) relegated;
intptr_t emfile(void) relegated;
intptr_t enotty(void) relegated;
intptr_t enotsup(void) relegated;
intptr_t etxtbsy(void) relegated;
intptr_t efbig(void) relegated;
intptr_t enospc(void) relegated;
intptr_t espipe(void) relegated;
intptr_t erofs(void) relegated;
intptr_t emlink(void) relegated;
intptr_t epipe(void) relegated;
intptr_t edom(void) relegated;
intptr_t erange(void) relegated;
intptr_t edeadlk(void) relegated;
intptr_t enametoolong(void) relegated;
intptr_t enolck(void) relegated;
intptr_t enosys(void) relegated;
intptr_t enotempty(void) relegated;
intptr_t eloop(void) relegated;
intptr_t enomsg(void) relegated;
intptr_t eidrm(void) relegated;
intptr_t echrng(void) relegated;
intptr_t el2nsync(void) relegated;
intptr_t el3hlt(void) relegated;
intptr_t el3rst(void) relegated;
intptr_t elnrng(void) relegated;
intptr_t eunatch(void) relegated;
intptr_t enocsi(void) relegated;
intptr_t el2hlt(void) relegated;
intptr_t ebade(void) relegated;
intptr_t ebadr(void) relegated;
intptr_t exfull(void) relegated;
intptr_t enoano(void) relegated;
intptr_t ebadrqc(void) relegated;
intptr_t ebadslt(void) relegated;
intptr_t enostr(void) relegated;
intptr_t enodata(void) relegated;
intptr_t etime(void) relegated;
intptr_t enosr(void) relegated;
intptr_t enonet(void) relegated;
intptr_t enopkg(void) relegated;
intptr_t eremote(void) relegated;
intptr_t enolink(void) relegated;
intptr_t eadv(void) relegated;
intptr_t esrmnt(void) relegated;
intptr_t ecomm(void) relegated;
intptr_t eproto(void) relegated;
intptr_t emultihop(void) relegated;
intptr_t edotdot(void) relegated;
intptr_t ebadmsg(void) relegated;
intptr_t eoverflow(void) relegated;
intptr_t enotuniq(void) relegated;
intptr_t ebadfd(void) relegated;
intptr_t eremchg(void) relegated;
intptr_t elibacc(void) relegated;
intptr_t elibbad(void) relegated;
intptr_t elibscn(void) relegated;
intptr_t elibmax(void) relegated;
intptr_t elibexec(void) relegated;
intptr_t eilseq(void) relegated;
intptr_t erestart(void) relegated;
intptr_t estrpipe(void) relegated;
intptr_t eusers(void) relegated;
intptr_t enotsock(void) relegated;
intptr_t edestaddrreq(void) relegated;
intptr_t emsgsize(void) relegated;
intptr_t eprototype(void) relegated;
intptr_t enoprotoopt(void) relegated;
intptr_t eprotonosupport(void) relegated;
intptr_t esocktnosupport(void) relegated;
intptr_t eopnotsupp(void) relegated;
intptr_t epfnosupport(void) relegated;
intptr_t eafnosupport(void) relegated;
intptr_t eaddrinuse(void) relegated;
intptr_t eaddrnotavail(void) relegated;
intptr_t enetdown(void) relegated;
intptr_t enetunreach(void) relegated;
intptr_t enetreset(void) relegated;
intptr_t econnaborted(void) relegated;
intptr_t econnreset(void) relegated;
intptr_t enobufs(void) relegated;
intptr_t eisconn(void) relegated;
intptr_t enotconn(void) relegated;
intptr_t eshutdown(void) relegated;
intptr_t etoomanyrefs(void) relegated;
intptr_t etimedout(void) relegated;
intptr_t econnrefused(void) relegated;
intptr_t ehostdown(void) relegated;
intptr_t ehostunreach(void) relegated;
intptr_t ealready(void) relegated;
intptr_t einprogress(void) relegated;
intptr_t estale(void) relegated;
intptr_t euclean(void) relegated;
intptr_t enotnam(void) relegated;
intptr_t enavail(void) relegated;
intptr_t eisnam(void) relegated;
intptr_t eremoteio(void) relegated;
intptr_t edquot(void) relegated;
intptr_t enomedium(void) relegated;
intptr_t emediumtype(void) relegated;
intptr_t ecanceled(void) relegated;
intptr_t enokey(void) relegated;
intptr_t ekeyexpired(void) relegated;
intptr_t ekeyrevoked(void) relegated;
intptr_t ekeyrejected(void) relegated;
intptr_t eownerdead(void) relegated;
intptr_t enotrecoverable(void) relegated;
intptr_t erfkill(void) relegated;
intptr_t ehwpoison(void) relegated;
libcesque intptr_t einval(void) relegated;
libcesque intptr_t eperm(void) relegated;
libcesque intptr_t enoent(void) relegated;
libcesque intptr_t esrch(void) relegated;
libcesque intptr_t eintr(void) relegated;
libcesque intptr_t eio(void) relegated;
libcesque intptr_t enxio(void) relegated;
libcesque intptr_t e2big(void) relegated;
libcesque intptr_t enoexec(void) relegated;
libcesque intptr_t ebadf(void) relegated;
libcesque intptr_t echild(void) relegated;
libcesque intptr_t eagain(void) relegated;
libcesque intptr_t enomem(void) relegated;
libcesque intptr_t eacces(void) relegated;
libcesque intptr_t efault(void) relegated;
libcesque intptr_t enotblk(void) relegated;
libcesque intptr_t ebusy(void) relegated;
libcesque intptr_t eexist(void) relegated;
libcesque intptr_t exdev(void) relegated;
libcesque intptr_t enodev(void) relegated;
libcesque intptr_t enotdir(void) relegated;
libcesque intptr_t eisdir(void) relegated;
libcesque intptr_t enfile(void) relegated;
libcesque intptr_t emfile(void) relegated;
libcesque intptr_t enotty(void) relegated;
libcesque intptr_t enotsup(void) relegated;
libcesque intptr_t etxtbsy(void) relegated;
libcesque intptr_t efbig(void) relegated;
libcesque intptr_t enospc(void) relegated;
libcesque intptr_t espipe(void) relegated;
libcesque intptr_t erofs(void) relegated;
libcesque intptr_t emlink(void) relegated;
libcesque intptr_t epipe(void) relegated;
libcesque intptr_t edom(void) relegated;
libcesque intptr_t erange(void) relegated;
libcesque intptr_t edeadlk(void) relegated;
libcesque intptr_t enametoolong(void) relegated;
libcesque intptr_t enolck(void) relegated;
libcesque intptr_t enosys(void) relegated;
libcesque intptr_t enotempty(void) relegated;
libcesque intptr_t eloop(void) relegated;
libcesque intptr_t enomsg(void) relegated;
libcesque intptr_t eidrm(void) relegated;
libcesque intptr_t echrng(void) relegated;
libcesque intptr_t el2nsync(void) relegated;
libcesque intptr_t el3hlt(void) relegated;
libcesque intptr_t el3rst(void) relegated;
libcesque intptr_t elnrng(void) relegated;
libcesque intptr_t eunatch(void) relegated;
libcesque intptr_t enocsi(void) relegated;
libcesque intptr_t el2hlt(void) relegated;
libcesque intptr_t ebade(void) relegated;
libcesque intptr_t ebadr(void) relegated;
libcesque intptr_t exfull(void) relegated;
libcesque intptr_t enoano(void) relegated;
libcesque intptr_t ebadrqc(void) relegated;
libcesque intptr_t ebadslt(void) relegated;
libcesque intptr_t enostr(void) relegated;
libcesque intptr_t enodata(void) relegated;
libcesque intptr_t etime(void) relegated;
libcesque intptr_t enosr(void) relegated;
libcesque intptr_t enonet(void) relegated;
libcesque intptr_t enopkg(void) relegated;
libcesque intptr_t eremote(void) relegated;
libcesque intptr_t enolink(void) relegated;
libcesque intptr_t eadv(void) relegated;
libcesque intptr_t esrmnt(void) relegated;
libcesque intptr_t ecomm(void) relegated;
libcesque intptr_t eproto(void) relegated;
libcesque intptr_t emultihop(void) relegated;
libcesque intptr_t edotdot(void) relegated;
libcesque intptr_t ebadmsg(void) relegated;
libcesque intptr_t eoverflow(void) relegated;
libcesque intptr_t enotuniq(void) relegated;
libcesque intptr_t ebadfd(void) relegated;
libcesque intptr_t eremchg(void) relegated;
libcesque intptr_t elibacc(void) relegated;
libcesque intptr_t elibbad(void) relegated;
libcesque intptr_t elibscn(void) relegated;
libcesque intptr_t elibmax(void) relegated;
libcesque intptr_t elibexec(void) relegated;
libcesque intptr_t eilseq(void) relegated;
libcesque intptr_t erestart(void) relegated;
libcesque intptr_t estrpipe(void) relegated;
libcesque intptr_t eusers(void) relegated;
libcesque intptr_t enotsock(void) relegated;
libcesque intptr_t edestaddrreq(void) relegated;
libcesque intptr_t emsgsize(void) relegated;
libcesque intptr_t eprototype(void) relegated;
libcesque intptr_t enoprotoopt(void) relegated;
libcesque intptr_t eprotonosupport(void) relegated;
libcesque intptr_t esocktnosupport(void) relegated;
libcesque intptr_t eopnotsupp(void) relegated;
libcesque intptr_t epfnosupport(void) relegated;
libcesque intptr_t eafnosupport(void) relegated;
libcesque intptr_t eaddrinuse(void) relegated;
libcesque intptr_t eaddrnotavail(void) relegated;
libcesque intptr_t enetdown(void) relegated;
libcesque intptr_t enetunreach(void) relegated;
libcesque intptr_t enetreset(void) relegated;
libcesque intptr_t econnaborted(void) relegated;
libcesque intptr_t econnreset(void) relegated;
libcesque intptr_t enobufs(void) relegated;
libcesque intptr_t eisconn(void) relegated;
libcesque intptr_t enotconn(void) relegated;
libcesque intptr_t eshutdown(void) relegated;
libcesque intptr_t etoomanyrefs(void) relegated;
libcesque intptr_t etimedout(void) relegated;
libcesque intptr_t econnrefused(void) relegated;
libcesque intptr_t ehostdown(void) relegated;
libcesque intptr_t ehostunreach(void) relegated;
libcesque intptr_t ealready(void) relegated;
libcesque intptr_t einprogress(void) relegated;
libcesque intptr_t estale(void) relegated;
libcesque intptr_t euclean(void) relegated;
libcesque intptr_t enotnam(void) relegated;
libcesque intptr_t enavail(void) relegated;
libcesque intptr_t eisnam(void) relegated;
libcesque intptr_t eremoteio(void) relegated;
libcesque intptr_t edquot(void) relegated;
libcesque intptr_t enomedium(void) relegated;
libcesque intptr_t emediumtype(void) relegated;
libcesque intptr_t ecanceled(void) relegated;
libcesque intptr_t enokey(void) relegated;
libcesque intptr_t ekeyexpired(void) relegated;
libcesque intptr_t ekeyrevoked(void) relegated;
libcesque intptr_t ekeyrejected(void) relegated;
libcesque intptr_t eownerdead(void) relegated;
libcesque intptr_t enotrecoverable(void) relegated;
libcesque intptr_t erfkill(void) relegated;
libcesque intptr_t ehwpoison(void) relegated;
#if defined(__MNO_RED_ZONE__) && defined(__GNUC__) && !defined(__STRICT_ANSI__)
#define __ERRFUN(FUNC) \

View file

@ -2,18 +2,18 @@
#define COSMOPOLITAN_LIBC_TEMP_H_
COSMOPOLITAN_C_START_
char *mktemp(char *) returnsnonnull paramsnonnull();
char *mkdtemp(char *) paramsnonnull() __wur;
int mkstemp(char *) paramsnonnull() __wur;
int mkstemps(char *, int) paramsnonnull() __wur;
char *mktemp(char *) libcesque returnsnonnull paramsnonnull();
char *mkdtemp(char *) libcesque paramsnonnull() __wur;
int mkstemp(char *) libcesque paramsnonnull() __wur;
int mkstemps(char *, int) libcesque paramsnonnull() __wur;
#if defined(_GNU_SOURCE) || defined(_COSMO_SOURCE)
int mkostemp(char *, unsigned) paramsnonnull() __wur;
int mkostemps(char *, int, unsigned) paramsnonnull() __wur;
int mkostemp(char *, unsigned) libcesque paramsnonnull() __wur;
int mkostemps(char *, int, unsigned) libcesque paramsnonnull() __wur;
#endif
#ifdef _COSMO_SOURCE
int openatemp(int, char *, int, int, int) paramsnonnull() __wur;
int openatemp(int, char *, int, int, int) libcesque paramsnonnull() __wur;
#endif
COSMOPOLITAN_C_END_

View file

@ -97,24 +97,24 @@ extern struct Dll *_pthread_list;
extern struct PosixThread _pthread_static;
extern _Atomic(pthread_key_dtor) _pthread_key_dtor[PTHREAD_KEYS_MAX];
int _pthread_atfork(atfork_f, atfork_f, atfork_f);
int _pthread_reschedule(struct PosixThread *);
int _pthread_atfork(atfork_f, atfork_f, atfork_f) libcesque;
int _pthread_reschedule(struct PosixThread *) libcesque;
int _pthread_setschedparam_freebsd(int, int, const struct sched_param *);
int _pthread_tid(struct PosixThread *);
intptr_t _pthread_syshand(struct PosixThread *);
long _pthread_cancel_ack(void);
void _pthread_decimate(void);
void _pthread_free(struct PosixThread *, bool);
void _pthread_lock(void);
void _pthread_onfork_child(void);
void _pthread_onfork_parent(void);
void _pthread_onfork_prepare(void);
void _pthread_ungarbage(void);
void _pthread_unkey(struct CosmoTib *);
void _pthread_unlock(void);
void _pthread_unref(struct PosixThread *);
void _pthread_unwind(struct PosixThread *);
void _pthread_zombify(struct PosixThread *);
int _pthread_tid(struct PosixThread *) libcesque;
intptr_t _pthread_syshand(struct PosixThread *) libcesque;
long _pthread_cancel_ack(void) libcesque;
void _pthread_decimate(void) libcesque;
void _pthread_free(struct PosixThread *, bool) libcesque;
void _pthread_lock(void) libcesque;
void _pthread_onfork_child(void) libcesque;
void _pthread_onfork_parent(void) libcesque;
void _pthread_onfork_prepare(void) libcesque;
void _pthread_ungarbage(void) libcesque;
void _pthread_unkey(struct CosmoTib *) libcesque;
void _pthread_unlock(void) libcesque;
void _pthread_unref(struct PosixThread *) libcesque;
void _pthread_unwind(struct PosixThread *) libcesque;
void _pthread_zombify(struct PosixThread *) libcesque;
forceinline pureconst struct PosixThread *_pthread_self(void) {
return (struct PosixThread *)__get_tls()->tib_pthread;

View file

@ -26,16 +26,16 @@ typedef struct {
};
} sem_t;
int sem_init(sem_t *, int, unsigned);
int sem_destroy(sem_t *);
int sem_post(sem_t *);
int sem_wait(sem_t *);
int sem_trywait(sem_t *);
int sem_timedwait(sem_t *, const struct timespec *);
int sem_getvalue(sem_t *, int *);
sem_t *sem_open(const char *, int, ...);
int sem_close(sem_t *);
int sem_unlink(const char *);
int sem_init(sem_t *, int, unsigned) libcesque;
int sem_destroy(sem_t *) libcesque;
int sem_post(sem_t *) libcesque;
int sem_wait(sem_t *) libcesque;
int sem_trywait(sem_t *) libcesque;
int sem_timedwait(sem_t *, const struct timespec *) libcesque;
int sem_getvalue(sem_t *, int *) libcesque;
sem_t *sem_open(const char *, int, ...) libcesque;
int sem_close(sem_t *) libcesque;
int sem_unlink(const char *) libcesque;
COSMOPOLITAN_C_END_
#endif /* COSMOPOLITAN_LIBC_CALLS_SEMAPHORE_H_ */

View file

@ -112,97 +112,97 @@ struct _pthread_cleanup_buffer {
/* clang-format off */
int pthread_atfork(void (*)(void), void (*)(void), void (*)(void));
int pthread_attr_destroy(pthread_attr_t *) paramsnonnull();
int pthread_attr_getdetachstate(const pthread_attr_t *, int *) paramsnonnull();
int pthread_attr_getguardsize(const pthread_attr_t *, size_t *) paramsnonnull();
int pthread_attr_getinheritsched(const pthread_attr_t *, int *) paramsnonnull();
int pthread_attr_getschedpolicy(const pthread_attr_t *, int *) paramsnonnull();
int pthread_attr_getscope(const pthread_attr_t *, int *) paramsnonnull();
int pthread_attr_getstack(const pthread_attr_t *, void **, size_t *) paramsnonnull();
int pthread_attr_getstacksize(const pthread_attr_t *, size_t *) paramsnonnull();
int pthread_attr_init(pthread_attr_t *) paramsnonnull();
int pthread_attr_setdetachstate(pthread_attr_t *, int) paramsnonnull();
int pthread_attr_setguardsize(pthread_attr_t *, size_t) paramsnonnull();
int pthread_attr_setinheritsched(pthread_attr_t *, int) paramsnonnull();
int pthread_attr_setschedpolicy(pthread_attr_t *, int) paramsnonnull();
int pthread_attr_setscope(pthread_attr_t *, int) paramsnonnull();
int pthread_attr_setstack(pthread_attr_t *, void *, size_t) paramsnonnull((1));
int pthread_attr_setstacksize(pthread_attr_t *, size_t) paramsnonnull();
int pthread_barrier_destroy(pthread_barrier_t *) paramsnonnull();
int pthread_barrier_init(pthread_barrier_t *, const pthread_barrierattr_t *, unsigned) paramsnonnull((1));
int pthread_barrier_wait(pthread_barrier_t *) paramsnonnull();
int pthread_barrierattr_destroy(pthread_barrierattr_t *) paramsnonnull();
int pthread_barrierattr_getpshared(const pthread_barrierattr_t *, int *) paramsnonnull();
int pthread_barrierattr_init(pthread_barrierattr_t *) paramsnonnull();
int pthread_barrierattr_setpshared(pthread_barrierattr_t *, int) paramsnonnull();
int pthread_cancel(pthread_t);
int pthread_cond_broadcast(pthread_cond_t *) paramsnonnull();
int pthread_cond_destroy(pthread_cond_t *) paramsnonnull();
int pthread_cond_init(pthread_cond_t *, const pthread_condattr_t *) paramsnonnull((1));
int pthread_cond_signal(pthread_cond_t *) paramsnonnull();
int pthread_cond_wait(pthread_cond_t *, pthread_mutex_t *) paramsnonnull();
int pthread_condattr_destroy(pthread_condattr_t *) paramsnonnull();
int pthread_condattr_getpshared(const pthread_condattr_t *, int *) paramsnonnull();
int pthread_condattr_init(pthread_condattr_t *) paramsnonnull();
int pthread_condattr_setpshared(pthread_condattr_t *, int) paramsnonnull();
int pthread_create(pthread_t *, const pthread_attr_t *, void *(*)(void *), void *) paramsnonnull((1));
int pthread_detach(pthread_t);
int pthread_equal(pthread_t, pthread_t);
int pthread_getattr_np(pthread_t, pthread_attr_t *) paramsnonnull();
int pthread_getname_np(pthread_t, char *, size_t) paramsnonnull();
int pthread_getunique_np(pthread_t, pthread_id_np_t *) paramsnonnull();
int pthread_join(pthread_t, void **);
int pthread_key_create(pthread_key_t *, pthread_key_dtor) paramsnonnull((1));
int pthread_key_delete(pthread_key_t);
int pthread_kill(pthread_t, int);
int pthread_mutex_consistent(pthread_mutex_t *) paramsnonnull();
int pthread_mutex_destroy(pthread_mutex_t *) paramsnonnull();
int pthread_mutex_init(pthread_mutex_t *, const pthread_mutexattr_t *) paramsnonnull((1));
int pthread_mutex_lock(pthread_mutex_t *) paramsnonnull();
int pthread_mutex_trylock(pthread_mutex_t *) paramsnonnull();
int pthread_mutex_unlock(pthread_mutex_t *) paramsnonnull();
int pthread_mutexattr_destroy(pthread_mutexattr_t *) paramsnonnull();
int pthread_mutexattr_getpshared(const pthread_mutexattr_t *, int *) paramsnonnull();
int pthread_mutexattr_gettype(const pthread_mutexattr_t *, int *) paramsnonnull();
int pthread_mutexattr_init(pthread_mutexattr_t *) paramsnonnull();
int pthread_mutexattr_setpshared(pthread_mutexattr_t *, int) paramsnonnull();
int pthread_mutexattr_settype(pthread_mutexattr_t *, int) paramsnonnull();
int pthread_atfork(void (*)(void), void (*)(void), void (*)(void)) dontthrow;
int pthread_attr_destroy(pthread_attr_t *) libcesque paramsnonnull();
int pthread_attr_getdetachstate(const pthread_attr_t *, int *) libcesque paramsnonnull();
int pthread_attr_getguardsize(const pthread_attr_t *, size_t *) libcesque paramsnonnull();
int pthread_attr_getinheritsched(const pthread_attr_t *, int *) libcesque paramsnonnull();
int pthread_attr_getschedpolicy(const pthread_attr_t *, int *) libcesque paramsnonnull();
int pthread_attr_getscope(const pthread_attr_t *, int *) libcesque paramsnonnull();
int pthread_attr_getstack(const pthread_attr_t *, void **, size_t *) libcesque paramsnonnull();
int pthread_attr_getstacksize(const pthread_attr_t *, size_t *) libcesque paramsnonnull();
int pthread_attr_init(pthread_attr_t *) libcesque paramsnonnull();
int pthread_attr_setdetachstate(pthread_attr_t *, int) libcesque paramsnonnull();
int pthread_attr_setguardsize(pthread_attr_t *, size_t) libcesque paramsnonnull();
int pthread_attr_setinheritsched(pthread_attr_t *, int) libcesque paramsnonnull();
int pthread_attr_setschedpolicy(pthread_attr_t *, int) libcesque paramsnonnull();
int pthread_attr_setscope(pthread_attr_t *, int) libcesque paramsnonnull();
int pthread_attr_setstack(pthread_attr_t *, void *, size_t) libcesque paramsnonnull((1));
int pthread_attr_setstacksize(pthread_attr_t *, size_t) libcesque paramsnonnull();
int pthread_barrier_destroy(pthread_barrier_t *) libcesque paramsnonnull();
int pthread_barrier_init(pthread_barrier_t *, const pthread_barrierattr_t *, unsigned) libcesque paramsnonnull((1));
int pthread_barrier_wait(pthread_barrier_t *) libcesque paramsnonnull();
int pthread_barrierattr_destroy(pthread_barrierattr_t *) libcesque paramsnonnull();
int pthread_barrierattr_getpshared(const pthread_barrierattr_t *, int *) libcesque paramsnonnull();
int pthread_barrierattr_init(pthread_barrierattr_t *) libcesque paramsnonnull();
int pthread_barrierattr_setpshared(pthread_barrierattr_t *, int) libcesque paramsnonnull();
int pthread_cancel(pthread_t) libcesque;
int pthread_cond_broadcast(pthread_cond_t *) libcesque paramsnonnull();
int pthread_cond_destroy(pthread_cond_t *) libcesque paramsnonnull();
int pthread_cond_init(pthread_cond_t *, const pthread_condattr_t *) libcesque paramsnonnull((1));
int pthread_cond_signal(pthread_cond_t *) libcesque paramsnonnull();
int pthread_cond_wait(pthread_cond_t *, pthread_mutex_t *) libcesque paramsnonnull();
int pthread_condattr_destroy(pthread_condattr_t *) libcesque paramsnonnull();
int pthread_condattr_getpshared(const pthread_condattr_t *, int *) libcesque paramsnonnull();
int pthread_condattr_init(pthread_condattr_t *) libcesque paramsnonnull();
int pthread_condattr_setpshared(pthread_condattr_t *, int) libcesque paramsnonnull();
int pthread_create(pthread_t *, const pthread_attr_t *, void *(*)(void *), void *) dontthrow paramsnonnull((1));
int pthread_detach(pthread_t) libcesque;
int pthread_equal(pthread_t, pthread_t) libcesque;
int pthread_getattr_np(pthread_t, pthread_attr_t *) libcesque paramsnonnull();
int pthread_getname_np(pthread_t, char *, size_t) libcesque paramsnonnull();
int pthread_getunique_np(pthread_t, pthread_id_np_t *) libcesque paramsnonnull();
int pthread_join(pthread_t, void **) libcesque;
int pthread_key_create(pthread_key_t *, pthread_key_dtor) libcesque paramsnonnull((1));
int pthread_key_delete(pthread_key_t) libcesque;
int pthread_kill(pthread_t, int) libcesque;
int pthread_mutex_consistent(pthread_mutex_t *) libcesque paramsnonnull();
int pthread_mutex_destroy(pthread_mutex_t *) libcesque paramsnonnull();
int pthread_mutex_init(pthread_mutex_t *, const pthread_mutexattr_t *) libcesque paramsnonnull((1));
int pthread_mutex_lock(pthread_mutex_t *) libcesque paramsnonnull();
int pthread_mutex_trylock(pthread_mutex_t *) libcesque paramsnonnull();
int pthread_mutex_unlock(pthread_mutex_t *) libcesque paramsnonnull();
int pthread_mutexattr_destroy(pthread_mutexattr_t *) libcesque paramsnonnull();
int pthread_mutexattr_getpshared(const pthread_mutexattr_t *, int *) libcesque paramsnonnull();
int pthread_mutexattr_gettype(const pthread_mutexattr_t *, int *) libcesque paramsnonnull();
int pthread_mutexattr_init(pthread_mutexattr_t *) libcesque paramsnonnull();
int pthread_mutexattr_setpshared(pthread_mutexattr_t *, int) libcesque paramsnonnull();
int pthread_mutexattr_settype(pthread_mutexattr_t *, int) libcesque paramsnonnull();
int pthread_once(pthread_once_t *, void (*)(void)) paramsnonnull();
int pthread_orphan_np(void);
int pthread_rwlock_destroy(pthread_rwlock_t *) paramsnonnull();
int pthread_rwlock_init(pthread_rwlock_t *, const pthread_rwlockattr_t *) paramsnonnull((1));
int pthread_rwlock_rdlock(pthread_rwlock_t *) paramsnonnull();
int pthread_rwlock_tryrdlock(pthread_rwlock_t *) paramsnonnull();
int pthread_rwlock_trywrlock(pthread_rwlock_t *) paramsnonnull();
int pthread_rwlock_unlock(pthread_rwlock_t *) paramsnonnull();
int pthread_rwlock_wrlock(pthread_rwlock_t *) paramsnonnull();
int pthread_rwlockattr_destroy(pthread_rwlockattr_t *) paramsnonnull();
int pthread_rwlockattr_getpshared(const pthread_rwlockattr_t *, int *) paramsnonnull();
int pthread_rwlockattr_init(pthread_rwlockattr_t *) paramsnonnull();
int pthread_rwlockattr_setpshared(pthread_rwlockattr_t *, int) paramsnonnull();
int pthread_setcancelstate(int, int *);
int pthread_setcanceltype(int, int *);
int pthread_setname_np(pthread_t, const char *) paramsnonnull();
int pthread_setschedprio(pthread_t, int);
int pthread_setspecific(pthread_key_t, const void *);
int pthread_spin_destroy(pthread_spinlock_t *) paramsnonnull();
int pthread_spin_init(pthread_spinlock_t *, int) paramsnonnull();
int pthread_spin_lock(pthread_spinlock_t *) paramsnonnull();
int pthread_spin_trylock(pthread_spinlock_t *) paramsnonnull();
int pthread_spin_unlock(pthread_spinlock_t *) paramsnonnull();
int pthread_testcancel_np(void);
int pthread_tryjoin_np(pthread_t, void **);
int pthread_yield_np(void);
int pthread_yield(void);
pthread_id_np_t pthread_getthreadid_np(void);
pthread_t pthread_self(void) pureconst;
void *pthread_getspecific(pthread_key_t);
void pthread_cleanup_pop(struct _pthread_cleanup_buffer *, int) paramsnonnull();
void pthread_cleanup_push(struct _pthread_cleanup_buffer *, void (*)(void *), void *) paramsnonnull((1));
void pthread_exit(void *) wontreturn;
void pthread_testcancel(void);
void pthread_pause_np(void);
int pthread_orphan_np(void) libcesque;
int pthread_rwlock_destroy(pthread_rwlock_t *) libcesque paramsnonnull();
int pthread_rwlock_init(pthread_rwlock_t *, const pthread_rwlockattr_t *) libcesque paramsnonnull((1));
int pthread_rwlock_rdlock(pthread_rwlock_t *) libcesque paramsnonnull();
int pthread_rwlock_tryrdlock(pthread_rwlock_t *) libcesque paramsnonnull();
int pthread_rwlock_trywrlock(pthread_rwlock_t *) libcesque paramsnonnull();
int pthread_rwlock_unlock(pthread_rwlock_t *) libcesque paramsnonnull();
int pthread_rwlock_wrlock(pthread_rwlock_t *) libcesque paramsnonnull();
int pthread_rwlockattr_destroy(pthread_rwlockattr_t *) libcesque paramsnonnull();
int pthread_rwlockattr_getpshared(const pthread_rwlockattr_t *, int *) libcesque paramsnonnull();
int pthread_rwlockattr_init(pthread_rwlockattr_t *) libcesque paramsnonnull();
int pthread_rwlockattr_setpshared(pthread_rwlockattr_t *, int) libcesque paramsnonnull();
int pthread_setcancelstate(int, int *) libcesque;
int pthread_setcanceltype(int, int *) libcesque;
int pthread_setname_np(pthread_t, const char *) libcesque paramsnonnull();
int pthread_setschedprio(pthread_t, int) libcesque;
int pthread_setspecific(pthread_key_t, const void *) libcesque;
int pthread_spin_destroy(pthread_spinlock_t *) libcesque paramsnonnull();
int pthread_spin_init(pthread_spinlock_t *, int) libcesque paramsnonnull();
int pthread_spin_lock(pthread_spinlock_t *) libcesque paramsnonnull();
int pthread_spin_trylock(pthread_spinlock_t *) libcesque paramsnonnull();
int pthread_spin_unlock(pthread_spinlock_t *) libcesque paramsnonnull();
int pthread_testcancel_np(void) libcesque;
int pthread_tryjoin_np(pthread_t, void **) libcesque;
int pthread_yield_np(void) libcesque;
int pthread_yield(void) libcesque;
pthread_id_np_t pthread_getthreadid_np(void) libcesque;
pthread_t pthread_self(void) libcesque pureconst;
void *pthread_getspecific(pthread_key_t) libcesque;
void pthread_cleanup_pop(struct _pthread_cleanup_buffer *, int) libcesque paramsnonnull();
void pthread_cleanup_push(struct _pthread_cleanup_buffer *, void (*)(void *), void *) libcesque paramsnonnull((1));
void pthread_exit(void *) libcesque wontreturn;
void pthread_testcancel(void) libcesque;
void pthread_pause_np(void) libcesque;
/* clang-format on */

View file

@ -9,16 +9,16 @@
COSMOPOLITAN_C_START_
/* clang-format off */
int pthread_attr_getschedparam(const pthread_attr_t *, struct sched_param *) paramsnonnull();
int pthread_attr_getsigmask_np(const pthread_attr_t *, sigset_t *) paramsnonnull((1));
int pthread_attr_setschedparam(pthread_attr_t *, const struct sched_param *) paramsnonnull();
int pthread_attr_setsigmask_np(pthread_attr_t *, const sigset_t *) paramsnonnull((1));
int pthread_cond_timedwait(pthread_cond_t *, pthread_mutex_t *, const struct timespec *) paramsnonnull((1, 2));
int pthread_getaffinity_np(pthread_t, size_t, cpu_set_t *) paramsnonnull();
int pthread_getschedparam(pthread_t, int *, struct sched_param *) paramsnonnull();
int pthread_setaffinity_np(pthread_t, size_t, const cpu_set_t *) paramsnonnull();
int pthread_setschedparam(pthread_t, int, const struct sched_param *) paramsnonnull();
int pthread_timedjoin_np(pthread_t, void **, struct timespec *);
int pthread_attr_getschedparam(const pthread_attr_t *, struct sched_param *) libcesque paramsnonnull();
int pthread_attr_getsigmask_np(const pthread_attr_t *, sigset_t *) libcesque paramsnonnull((1));
int pthread_attr_setschedparam(pthread_attr_t *, const struct sched_param *) libcesque paramsnonnull();
int pthread_attr_setsigmask_np(pthread_attr_t *, const sigset_t *) libcesque paramsnonnull((1));
int pthread_cond_timedwait(pthread_cond_t *, pthread_mutex_t *, const struct timespec *) libcesque paramsnonnull((1, 2));
int pthread_getaffinity_np(pthread_t, size_t, cpu_set_t *) libcesque paramsnonnull();
int pthread_getschedparam(pthread_t, int *, struct sched_param *) libcesque paramsnonnull();
int pthread_setaffinity_np(pthread_t, size_t, const cpu_set_t *) libcesque paramsnonnull();
int pthread_setschedparam(pthread_t, int, const struct sched_param *) libcesque paramsnonnull();
int pthread_timedjoin_np(pthread_t, void **, struct timespec *) libcesque;
/* clang-format off */
COSMOPOLITAN_C_END_

View file

@ -45,8 +45,8 @@ extern int __threaded;
extern char __tls_morphed;
extern unsigned __tls_index;
char *_mktls(struct CosmoTib **);
void __bootstrap_tls(struct CosmoTib *, char *);
char *_mktls(struct CosmoTib **) libcesque;
void __bootstrap_tls(struct CosmoTib *, char *) libcesque;
#ifdef __x86_64__
extern char __tls_enabled;
@ -58,7 +58,7 @@ extern char __tls_enabled;
#error "unsupported architecture"
#endif
void __set_tls(struct CosmoTib *);
void __set_tls(struct CosmoTib *) libcesque;
/**
* Returns location of thread information block.

View file

@ -16,26 +16,27 @@ struct tm {
const char *tm_zone;
};
char *asctime(const struct tm *);
char *asctime_r(const struct tm *, char[hasatleast 26]);
char *strptime(const char *, const char *, struct tm *);
int64_t mktime(struct tm *);
int64_t timegm(struct tm *);
int64_t timelocal(struct tm *);
int64_t timeoff(struct tm *, long);
size_t strftime(char *, size_t, const char *, const struct tm *)
strftimeesque(3);
size_t wcsftime(wchar_t *, size_t, const wchar_t *, const struct tm *);
struct tm *gmtime(const int64_t *);
struct tm *gmtime_r(const int64_t *, struct tm *);
struct tm *localtime(const int64_t *);
struct tm *localtime_r(const int64_t *, struct tm *);
char *asctime(const struct tm *) libcesque;
char *asctime_r(const struct tm *, char[hasatleast 26]) libcesque;
char *strptime(const char *, const char *, struct tm *) libcesque;
int64_t mktime(struct tm *) libcesque;
int64_t timegm(struct tm *) libcesque;
int64_t timelocal(struct tm *) libcesque;
int64_t timeoff(struct tm *, long) libcesque;
size_t strftime(char *, size_t, const char *, const struct tm *) libcesque
strftimeesque(3) libcesque;
size_t wcsftime(wchar_t *, size_t, const wchar_t *,
const struct tm *) libcesque;
struct tm *gmtime(const int64_t *) libcesque;
struct tm *gmtime_r(const int64_t *, struct tm *) libcesque;
struct tm *localtime(const int64_t *) libcesque;
struct tm *localtime_r(const int64_t *, struct tm *) libcesque;
#ifdef _COSMO_SOURCE
#define iso8601 __iso8601
#define iso8601us __iso8601us
char *iso8601(char[hasatleast 20], struct tm *);
char *iso8601us(char[hasatleast 27], struct tm *, long);
char *iso8601(char[hasatleast 20], struct tm *) libcesque;
char *iso8601us(char[hasatleast 27], struct tm *, long) libcesque;
#endif /* _COSMO_SOURCE */
COSMOPOLITAN_C_END_

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