mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-02 17:28:30 +00:00
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:
parent
cb19e172da
commit
eeb20775d2
103 changed files with 1455 additions and 1456 deletions
|
@ -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 */
|
||||
|
|
|
@ -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_ */
|
||||
|
|
|
@ -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_ */
|
||||
|
|
|
@ -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_
|
||||
|
|
|
@ -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_ */
|
||||
|
|
|
@ -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_ */
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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_ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue