From a15934c764818b925638f706ad90a05bb17f1c90 Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Tue, 7 Jan 2014 04:06:36 +0100 Subject: [PATCH] init ldtrace repo --- Makefile | 12 + func.h | 1514 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ head.h | 164 ++++++ hello.c | 8 + stress.c | 11 + wrap.c | 31 ++ 6 files changed, 1740 insertions(+) create mode 100644 Makefile create mode 100644 func.h create mode 100644 head.h create mode 100644 hello.c create mode 100644 stress.c create mode 100644 wrap.c diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..a1de594 --- /dev/null +++ b/Makefile @@ -0,0 +1,12 @@ +CFLAGS=-std=c99 -Os -g +LDFLAGS=-g +CC=musl-gcc +all: wrap.so hello +hello: hello.o +wrap.o: head.h func.h +wrap.so: wrap.o + $(CC) $(LDFLAGS) -shared -o $@ $< -ldl -lm -lrt -lcrypt +clean: + rm -f wrap.so hello *.o +test: all + LD_PRELOAD=./wrap.so ./hello diff --git a/func.h b/func.h new file mode 100644 index 0000000..87f2d7c --- /dev/null +++ b/func.h @@ -0,0 +1,1514 @@ +typedef void (*signal_handler)(int); + +V(_Noreturn void, _Exit, (int ec), (ec)) +V(void, __acquire_ptc, (), ()) +V(void, __aio_wake, (void), ()) +F(char *, __asctime, (const struct tm *restrict tm, char *restrict buf), (tm,buf)) +V(void, __assert_fail, (const char *expr, const char *file, int line, const char *func), (expr,file,line,func)) +V(void, __block_all_sigs, (void *set), (set)) +V(void, __block_app_sigs, (void *set), (set)) +F(uintptr_t, __brk, (uintptr_t newbrk), (newbrk)) +F(int, __cachectl, (void *addr, int len, int op), (addr,len,op)) +V(void, __cancel, (), ()) +F(int, __clock_gettime, (clockid_t clk, struct timespec *ts), (clk,ts)) +XF(int, __clone, (int (*func)(void *), void *stack, int flags, void *arg, ...)) +F(void *, __copy_tls, (unsigned char *mem), (mem)) +F(double, __cos, (double x, double y), (x,y)) +F(float, __cosdf, (double x), (x)) +F(long double, __cosl, (long double x, long double y), (x,y)) +F(char *, __crypt_blowfish, (const char *key, const char *setting, char *output), (key,setting,output)) +F(char *, __crypt_des, (const char *key, const char *setting, char *output), (key,setting,output)) +F(char *, __crypt_md5, (const char *key, const char *setting, char *output), (key,setting,output)) +F(char *, __crypt_r, (const char *key, const char *salt, struct crypt_data *data), (key,salt,data)) +F(char *, __crypt_sha256, (const char *key, const char *setting, char *output), (key,setting,output)) +F(char *, __crypt_sha512, (const char *key, const char *setting, char *output), (key,setting,output)) +F(const unsigned short **, __ctype_b_loc, (void), ()) +F(size_t, __ctype_get_mb_cur_max, (), ()) +F(const int32_t **, __ctype_tolower_loc, (void), ()) +F(const int32_t **, __ctype_toupper_loc, (void), ()) +F(int, __cxa_atexit, (void (*func)(void *), void *arg, void *dso), (func,arg,dso)) +V(void, __cxa_finalize, (void *dso), (dso)) +F(int, __dladdr, (void *addr, Dl_info *info), (addr,info)) +F(int, __dlinfo, (void *dso, int req, void *res), (dso,req,res)) +F(void *, __dlsym, (void *restrict p, const char *restrict s, void *restrict ra), (p,s,ra)) +F(int, __dn_comp, (const char *src, unsigned char *dst, int space, unsigned char **dnptrs, unsigned char **lastdnptr), (src,dst,space,dnptrs,lastdnptr)) +F(int, __dn_expand, (const unsigned char *base, const unsigned char *end, const unsigned char *src, char *dest, int space), (base,end,src,dest,space)) +F(int, __dns_count_addrs, (const unsigned char *r, int cnt), (r,cnt)) +F(int, __dns_doqueries, (unsigned char *dest, const char *name, int *rr, int rrcnt), (dest,name,rr,rrcnt)) +F(int, __dns_get_rr, (void *dest, size_t stride, size_t maxlen, size_t limit, const unsigned char *r, int rr, int dec), (dest,stride,maxlen,limit,r,rr,dec)) +F(int, __dns_query, (unsigned char *r, const void *a, int family, int ptr), (r,a,family,ptr)) +V(void, __do_cleanup_pop, (struct __ptcb *cb), (cb)) +V(void, __do_cleanup_push, (struct __ptcb *cb), (cb)) +F(int, __dup3, (int old, int new, int flags), (old,new,flags)) +F(void *, __dynlink, (int argc, char **argv), (argc,argv)) +F(int *, __errno_location, (void), ()) +F(int, __execvpe, (const char *file, char *const argv[], char *const envp[]), (file,argv,envp)) +F(double, __expo2, (double x), (x)) +F(float, __expo2f, (float x), (x)) +F(size_t, __fbufsize, (FILE *f), (f)) +F(int, __fclose_ca, (FILE *f), (f)) +F(FILE *, __fdopen, (int fd, const char *mode), (fd,mode)) +F(int, __fesetround, (int r), (r)) +F(wint_t, __fgetwc_unlocked, (FILE *f), (f)) +F(int, __flbf, (FILE *f), (f)) +F(long double, __floatscan, (FILE *f, int prec, int pok), (f,prec,pok)) +V(void, __flush_on_exit, (), ()) +F(int, __fmodeflags, (const char *mode), (mode)) +F(FILE *, __fopen_rb_ca, (const char *filename, FILE *f, unsigned char *buf, size_t len), (filename,f,buf,len)) +V(void, __fork_handler, (int who), (who)) +F(int, __fpclassify, (double x), (x)) +F(int, __fpclassifyf, (float x), (x)) +F(int, __fpclassifyl, (long double x), (x)) +F(size_t, __fpending, (FILE *f), (f)) +F(int, __fpurge, (FILE *f), (f)) +F(wint_t, __fputwc_unlocked, (wchar_t c, FILE *f), (c,f)) +F(int, __freadable, (FILE *f), (f)) +F(size_t, __freadahead, (FILE *f), (f)) +F(int, __freading, (FILE *f), (f)) +F(const char *, __freadptr, (FILE *f, size_t *sizep), (f,sizep)) +V(void, __freadptrinc, (FILE *f, size_t inc), (f,inc)) +F(int, __fseeko, (FILE *f, off_t off, int whence), (f,off,whence)) +F(int, __fseeko_unlocked, (FILE *f, off_t off, int whence), (f,off,whence)) +V(void, __fseterr, (FILE *f), (f)) +F(int, __fsetlocking, (FILE *f, int type), (f,type)) +F(int, __fstatfs, (int fd, struct statfs *buf), (fd,buf)) +F(off_t, __ftello, (FILE *f), (f)) +F(off_t, __ftello_unlocked, (FILE *f), (f)) +V(void, __funcs_on_exit, (), ()) +V(void, __funcs_on_quick_exit, (), ()) +F(int, __futex, (volatile int *addr, int op, int val, void *ts), (addr,op,val,ts)) +F(int, __fwritable, (FILE *f), (f)) +F(size_t, __fwritex, (const unsigned char *restrict s, size_t l, FILE *restrict f), (s,l,f)) +F(int, __fwriting, (FILE *f), (f)) +F(int, __fxstat, (int ver, int fd, struct stat *buf), (ver,fd,buf)) +F(int, __fxstatat, (int ver, int fd, const char *path, struct stat *buf, int flag), (ver,fd,path,buf,flag)) +V(void, __get_handler_set, (sigset_t *set), (set)) +F(int, __getdents, (int fd, struct dirent *buf, size_t len), (fd,buf,len)) +F(struct group *, __getgrent_a, (FILE *f, struct group *gr, char **line, size_t *size, char ***mem, size_t *nmem), (f,gr,line,size,mem,nmem)) +F(struct passwd *, __getpwent_a, (FILE *f, struct passwd *pw, char **line, size_t *size), (f,pw,line,size)) +F(struct tm *, __gmtime_r, (const time_t *restrict t, struct tm *restrict tm), (t,tm)) +F(int *, __h_errno_location, (void), ()) +V(void, __inhibit_ptc, (), ()) +V(void, __init_libc, (char **envp, char *pn), (envp,pn)) +V(void, __init_security, (size_t *aux), (aux)) +V(void, __init_ssp, (void *entropy), (entropy)) +V(void, __init_tls, (size_t *aux), (aux)) +F(void *, __install_initial_tls, (void *p), (p)) +F(unsigned long long, __intscan, (FILE *f, unsigned base, int pok, unsigned long long lim), (f,base,pok,lim)) +F(long double, __invtrigl_R, (long double z), (z)) +F(int, __ipparse, (void *dest, int family, const char *s0), (dest,family,s0)) +F(double complex, __ldexp_cexp, (double complex z, int expt), (z,expt)) +F(float complex, __ldexp_cexpf, (float complex z, int expt), (z,expt)) +F(double, __lgamma_r, (double x, int *signgamp), (x,signgamp)) +F(float, __lgammaf_r, (float x, int *signgamp), (x,signgamp)) +F(long double, __lgammal_r, (long double x, int *sg), (x,sg)) +F(int, __libc_current_sigrtmax, (), ()) +F(int, __libc_current_sigrtmin, (), ()) +F(const char *, __libc_get_version, (), ()) +F(struct __libc *, __libc_loc, (), ()) +F(int, __libc_sigaction, (int sig, const struct sigaction *restrict sa, struct sigaction *restrict old), (sig,sa,old)) +F(int, __libc_start_main, (int (*main)(int,char **,char **), int argc, char **argv), (main,argc,argv)) +F(struct tm *, __localtime_r, (const time_t *restrict t, struct tm *restrict tm), (t,tm)) +V(void, __lock, (volatile int *l), (l)) +F(int, __lockfile, (FILE *f), (f)) +F(int, __lxstat, (int ver, const char *path, struct stat *buf), (ver,path,buf)) +F(int, __madvise, (void *addr, size_t len, int advice), (addr,len,advice)) +F(const char unsigned *, __map_file, (const char *pathname, size_t *size), (pathname,size)) +F(void *, __memalign, (size_t align, size_t len), (align,len)) +F(void *, __memrchr, (const void *m, int c, size_t n), (m,c,n)) +F(int, __mkostemps, (char *template, int len, int flags), (template,len,flags)) +F(void *, __mmap, (void *start, size_t len, int prot, int flags, int fd, off_t off), (start,len,prot,flags,fd,off)) +F(int, __month_to_secs, (int month, int is_leap), (month,is_leap)) +XF(void *, __mremap, (void *old_addr, size_t old_len, size_t new_len, int flags, ...)) +F(int, __munmap, (void *start, size_t len), (start,len)) +F(char *, __nl_langinfo, (nl_item item), (item)) +F(char *, __nl_langinfo_l, (nl_item item, locale_t loc), (item,loc)) +F(int, __overflow, (FILE *f, int _c), (f,_c)) +F(long double, __p1evll, (long double x, const long double *P, int n), (x,P,n)) +F(int, __parsespent, (char *s, struct spwd *sp), (s,sp)) +F(long double, __polevll, (long double x, const long double *P, int n), (x,P,n)) +F(int, __posix_spawnx, (pid_t *restrict res, const char *restrict path, int (*exec)(const char *, char *const *, char *const *), const posix_spawn_file_actions_t *fa, const posix_spawnattr_t *restrict attr, char *const argv[restrict], char *const envp[restrict]), (res,path,exec,fa,attr,argv,envp)) +V(void, __procfdname, (char *buf, unsigned fd), (buf,fd)) +F(pthread_t, __pthread_self_def, (), ()) +V(void, __pthread_tsd_run_dtors, (), ()) +F(int, __ptsname_r, (int fd, char *buf, size_t len), (fd,buf,len)) +F(int, __putenv, (char *s, int a), (s,a)) +F(uint64_t, __rand48_step, (unsigned short *xi, unsigned short *lc), (xi,lc)) +F(char *, __randname, (char *template), (template)) +V(void, __release_ptc, (), ()) +F(int, __rem_pio2, (double x, double *y), (x,y)) +F(int, __rem_pio2_large, (double *x, double *y, int e0, int nx, int prec), (x,y,e0,nx,prec)) +F(int, __rem_pio2f, (float x, double *y), (x,y)) +F(int, __rem_pio2l, (long double x, long double *y), (x,y)) +F(struct __res_state *, __res_state, (), ()) +V(void, __reset_tls, (), ()) +V(void, __restore, (), ()) +V(void, __restore_rt, (), ()) +V(void, __restore_sigs, (void *set), (set)) +F(int, __sched_cpucount, (size_t size, const cpu_set_t *set), (size,set)) +F(int, __secs_to_tm, (long long t, struct tm *tm), (t,tm)) +V(void, __secs_to_zone, (long long t, int local, int *isdst, long *offset, long *oppoff, const char **zonename), (t,local,isdst,offset,oppoff,zonename)) +V(void, __seek_on_exit, (), ()) +F(int, __set_thread_area, (void *p), (p)) +F(int, __setrlimit, (int resource, const struct rlimit *rlim), (resource,rlim)) +F(int, __setxid, (int nr, int id, int eid, int sid), (nr,id,eid,sid)) +F(int, __shgetc, (FILE *f), (f)) +V(void, __shlim, (FILE *f, off_t lim), (f,lim)) +F(char *, __shm_mapname, (const char *name, char *buf), (name,buf)) +F(int, __sigaction, (int sig, const struct sigaction *restrict sa, struct sigaction *restrict old), (sig,sa,old)) +F(int, __signbit, (double x), (x)) +F(int, __signbitf, (float x), (x)) +F(int, __signbitl, (long double x), (x)) +F(void *, __simple_malloc, (size_t n), (n)) +F(double, __sin, (double x, double y, int iy), (x,y,iy)) +F(float, __sindf, (double x), (x)) +F(long double, __sinl, (long double x, long double y, int iy), (x,y,iy)) +V(void, __stack_chk_fail, (void), ()) +F(int, __statfs, (const char *path, struct statfs *buf), (path,buf)) +F(int, __stdio_close, (FILE *f), (f)) +V(void, __stdio_exit, (void), ()) +F(size_t, __stdio_read, (FILE *f, unsigned char *buf, size_t len), (f,buf,len)) +F(off_t, __stdio_seek, (FILE *f, off_t off, int whence), (f,off,whence)) +F(size_t, __stdio_write, (FILE *f, const unsigned char *buf, size_t len), (f,buf,len)) +F(size_t, __stdout_write, (FILE *f, const unsigned char *buf, size_t len), (f,buf,len)) +F(char *, __stpcpy, (char *restrict d, const char *restrict s), (d,s)) +F(char *, __stpncpy, (char *restrict d, const char *restrict s, size_t n), (d,s,n)) +F(char *, __strchrnul, (const char *s, int c), (s,c)) +F(int, __strcoll_l, (const char *l, const char *r, locale_t loc), (l,r,loc)) +F(char *, __strdup, (const char *s), (s)) +F(const char *, __strftime_fmt_1, (char (*s)[100], size_t *l, int f, const struct tm *tm, locale_t loc), (s,l,f,tm,loc)) +F(size_t, __strftime_l, (char *restrict s, size_t n, const char *restrict f, const struct tm *restrict tm, locale_t loc), (s,n,f,tm,loc)) +F(size_t, __string_read, (FILE *f, unsigned char *buf, size_t len), (f,buf,len)) +F(size_t, __strxfrm_l, (char *restrict dest, const char *restrict src, size_t n, locale_t loc), (dest,src,n,loc)) +V(void, __synccall, (void (*func)(void *), void *ctx), (func,ctx)) +F(long, __syscall_cp, (long nr, long u, long v, long w, long x, long y, long z), (nr,u,v,w,x,y,z)) +F(long, __syscall_ret, (unsigned long r), (r)) +F(double, __tan, (double x, double y, int odd), (x,y,odd)) +F(float, __tandf, (double x, int odd), (x,odd)) +F(long double, __tanl, (long double x, long double y, int odd), (x,y,odd)) +V(void, __testcancel, (), ()) +F(int, __timedwait, (volatile int *addr, int val, clockid_t clk, const struct timespec *at, void (*cleanup)(void *), void *arg, int priv), (addr,val,clk,at,cleanup,arg,priv)) +F(void *, __tls_get_addr, (size_t *v), (v)) +F(long long, __tm_to_secs, (const struct tm *tm), (tm)) +F(const char *, __tm_to_tzname, (const struct tm *tm), (tm)) +F(int, __toread, (FILE *f), (f)) +F(int, __towrite, (FILE *f), (f)) +V(void, __tzset, (), ()) +F(int, __uflow, (FILE *f), (f)) +V(void, __unlock, (volatile int *l), (l)) +V(void, __unlockfile, (FILE *f), (f)) +F(pid_t, __vfork, (void), ()) +V(void, __vm_lock, (int inc), (inc)) +V(void, __vm_unlock, (void), ()) +V(void, __vsyslog, (int priority, const char *message, va_list ap), (priority,message,ap)) +V(void, __wait, (volatile int *addr, volatile int *waiters, int val, int priv), (addr,waiters,val,priv)) +F(int, __wcscoll_l, (const wchar_t *l, const wchar_t *r, locale_t locale), (l,r,locale)) +F(size_t, __wcsftime_l, (wchar_t *restrict s, size_t n, const wchar_t *restrict f, const struct tm *restrict tm, locale_t loc), (s,n,f,tm,loc)) +F(size_t, __wcsxfrm_l, (wchar_t *restrict dest, const wchar_t *restrict src, size_t n, locale_t loc), (dest,src,n,loc)) +F(int, __xstat, (int ver, const char *path, struct stat *buf), (ver,path,buf)) +F(long long, __year_to_secs, (long long year, int *is_leap), (year,is_leap)) +F(int, __yield, (), ()) +V(void, _dl_debug_state, (void), ()) +V(_Noreturn void, _exit, (int status), (status)) +F(int, _flush_cache, (void *addr, int len, int op), (addr,len,op)) +V(void, _flushlbf, (void), ()) +V(void, _pthread_cleanup_pop, (struct __ptcb *cb, int run), (cb,run)) +V(void, _pthread_cleanup_push, (struct __ptcb *cb, void (*f)(void *), void *x), (cb,f,x)) +V(void, _start, (), ()) +F(long, a64l, (const char *s), (s)) +V(_Noreturn void, abort, (void), ()) +F(int, abs, (int a), (a)) +F(int, accept, (int fd, struct sockaddr *restrict addr, socklen_t *restrict len), (fd,addr,len)) +F(int, accept4, (int fd, struct sockaddr *restrict addr, socklen_t *restrict len, int flg), (fd,addr,len,flg)) +F(int, access, (const char *filename, int amode), (filename,amode)) +F(int, acct, (const char *filename), (filename)) +F(double, acos, (double x), (x)) +F(float, acosf, (float x), (x)) +F(double, acosh, (double x), (x)) +F(float, acoshf, (float x), (x)) +F(long double, acoshl, (long double x), (x)) +F(long double, acosl, (long double x), (x)) +F(int, addmntent, (FILE *f, const struct mntent *mnt), (f,mnt)) +F(int, adjtime, (const struct timeval *in, struct timeval *out), (in,out)) +F(int, adjtimex, (struct timex *tx), (tx)) +F(int, aio_cancel, (int fd, struct aiocb *cb), (fd,cb)) +F(int, aio_error, (const struct aiocb *cb), (cb)) +F(int, aio_fsync, (int op, struct aiocb *cb), (op,cb)) +F(int, aio_read, (struct aiocb *cb), (cb)) +F(ssize_t, aio_return, (struct aiocb *cb), (cb)) +F(int, aio_suspend, (const struct aiocb *const cbs[], int cnt, const struct timespec *ts), (cbs,cnt,ts)) +F(int, aio_write, (struct aiocb *cb), (cb)) +F(unsigned, alarm, (unsigned seconds), (seconds)) +F(void *, aligned_alloc, (size_t align, size_t len), (align,len)) +F(int, alphasort, (const struct dirent **a, const struct dirent **b), (a,b)) +F(int, arch_prctl, (int code, unsigned long addr), (code,addr)) +F(char *, asctime, (const struct tm *tm), (tm)) +F(char *, asctime_r, (const struct tm *restrict tm, char *restrict buf), (tm,buf)) +F(double, asin, (double x), (x)) +F(float, asinf, (float x), (x)) +F(double, asinh, (double x), (x)) +F(float, asinhf, (float x), (x)) +F(long double, asinhl, (long double x), (x)) +F(long double, asinl, (long double x), (x)) +XF(int, asprintf, (char **s, const char *fmt, ...)) +F(int, at_quick_exit, (void (*func)(void)), (func)) +F(double, atan, (double x), (x)) +F(double, atan2, (double y, double x), (y,x)) +F(float, atan2f, (float y, float x), (y,x)) +F(long double, atan2l, (long double y, long double x), (y,x)) +F(float, atanf, (float x), (x)) +F(double, atanh, (double x), (x)) +F(float, atanhf, (float x), (x)) +F(long double, atanhl, (long double x), (x)) +F(long double, atanl, (long double x), (x)) +F(int, atexit, (void (*func)(void)), (func)) +F(double, atof, (const char *s), (s)) +F(int, atoi, (const char *s), (s)) +F(long, atol, (const char *s), (s)) +F(long long, atoll, (const char *s), (s)) +F(char *, basename, (char *s), (s)) +F(int, bcmp, (const void *s1, const void *s2, size_t n), (s1,s2,n)) +V(void, bcopy, (const void *s1, void *s2, size_t n), (s1,s2,n)) +F(int, bind, (int fd, const struct sockaddr *addr, socklen_t len), (fd,addr,len)) +F(char *, bind_textdomain_codeset, (const char *domainname, const char *codeset), (domainname,codeset)) +F(char *, bindtextdomain, (const char *domainname, const char *dirname), (domainname,dirname)) +F(int, brk, (void *end), (end)) +F(void *, bsearch, (const void *key, const void *base, size_t nel, size_t width, int (*cmp)(const void *, const void *)), (key,base,nel,width,cmp)) +F(wint_t, btowc, (int c), (c)) +V(void, bzero, (void *s, size_t n), (s,n)) +F(double, cabs, (double complex z), (z)) +F(float, cabsf, (float complex z), (z)) +F(long double, cabsl, (long double complex z), (z)) +F(double complex, cacos, (double complex z), (z)) +F(float complex, cacosf, (float complex z), (z)) +F(double complex, cacosh, (double complex z), (z)) +F(float complex, cacoshf, (float complex z), (z)) +F(long double complex, cacoshl, (long double complex z), (z)) +F(long double complex, cacosl, (long double complex z), (z)) +F(void *, calloc, (size_t m, size_t n), (m,n)) +F(int, capget, (void *a, void *b), (a,b)) +F(int, capset, (void *a, void *b), (a,b)) +F(double, carg, (double complex z), (z)) +F(float, cargf, (float complex z), (z)) +F(long double, cargl, (long double complex z), (z)) +F(double complex, casin, (double complex z), (z)) +F(float complex, casinf, (float complex z), (z)) +F(double complex, casinh, (double complex z), (z)) +F(float complex, casinhf, (float complex z), (z)) +F(long double complex, casinhl, (long double complex z), (z)) +F(long double complex, casinl, (long double complex z), (z)) +F(double complex, catan, (double complex z), (z)) +F(float complex, catanf, (float complex z), (z)) +F(double complex, catanh, (double complex z), (z)) +F(float complex, catanhf, (float complex z), (z)) +F(long double complex, catanhl, (long double complex z), (z)) +F(long double complex, catanl, (long double complex z), (z)) +F(int, catclose, (nl_catd catd), (catd)) +F(char *, catgets, (nl_catd catd, int set_id, int msg_id, const char *s), (catd,set_id,msg_id,s)) +F(nl_catd, catopen, (const char *name, int oflag), (name,oflag)) +F(double, cbrt, (double x), (x)) +F(float, cbrtf, (float x), (x)) +F(long double, cbrtl, (long double x), (x)) +F(double complex, ccos, (double complex z), (z)) +F(float complex, ccosf, (float complex z), (z)) +F(double complex, ccosh, (double complex z), (z)) +F(float complex, ccoshf, (float complex z), (z)) +F(long double complex, ccoshl, (long double complex z), (z)) +F(long double complex, ccosl, (long double complex z), (z)) +F(double, ceil, (double x), (x)) +F(float, ceilf, (float x), (x)) +F(long double, ceill, (long double x), (x)) +F(double complex, cexp, (double complex z), (z)) +F(float complex, cexpf, (float complex z), (z)) +F(long double complex, cexpl, (long double complex z), (z)) +F(speed_t, cfgetispeed, (const struct termios *tio), (tio)) +F(speed_t, cfgetospeed, (const struct termios *tio), (tio)) +V(void, cfmakeraw, (struct termios *t), (t)) +F(int, cfsetispeed, (struct termios *tio, speed_t speed), (tio,speed)) +F(int, cfsetospeed, (struct termios *tio, speed_t speed), (tio,speed)) +F(int, chdir, (const char *path), (path)) +F(int, chmod, (const char *path, mode_t mode), (path,mode)) +F(int, chown, (const char *path, uid_t uid, gid_t gid), (path,uid,gid)) +F(int, chroot, (const char *path), (path)) +F(double, cimag, (double complex z), (z)) +F(float, cimagf, (float complex z), (z)) +F(long double, cimagl, (long double complex z), (z)) +F(int, clearenv, (), ()) +V(void, clearerr, (FILE *f), (f)) +F(clock_t, clock, (), ()) +F(int, clock_adjtime, (clockid_t clock_id, struct timex *utx), (clock_id,utx)) +F(int, clock_getcpuclockid, (pid_t pid, clockid_t *clk), (pid,clk)) +F(int, clock_getres, (clockid_t clk, struct timespec *ts), (clk,ts)) +F(int, clock_nanosleep, (clockid_t clk, int flags, const struct timespec *req, struct timespec *rem), (clk,flags,req,rem)) +F(int, clock_settime, (clockid_t clk, const struct timespec *ts), (clk,ts)) +F(double complex, clog, (double complex z), (z)) +F(float complex, clogf, (float complex z), (z)) +F(long double complex, clogl, (long double complex z), (z)) +F(int, close, (int fd), (fd)) +F(int, closedir, (DIR *dir), (dir)) +V(void, closelog, (void), ()) +F(size_t, confstr, (int name, char *buf, size_t len), (name,buf,len)) +F(double complex, conj, (double complex z), (z)) +F(float complex, conjf, (float complex z), (z)) +F(long double complex, conjl, (long double complex z), (z)) +F(int, connect, (int fd, const struct sockaddr *addr, socklen_t len), (fd,addr,len)) +F(double, copysign, (double x, double y), (x,y)) +F(float, copysignf, (float x, float y), (x,y)) +F(long double, copysignl, (long double x, long double y), (x,y)) +F(double, cos, (double x), (x)) +F(float, cosf, (float x), (x)) +F(double, cosh, (double x), (x)) +F(float, coshf, (float x), (x)) +F(long double, coshl, (long double x), (x)) +F(long double, cosl, (long double x), (x)) +F(double complex, cpow, (double complex z, double complex c), (z,c)) +F(float complex, cpowf, (float complex z, float complex c), (z,c)) +F(long double complex, cpowl, (long double complex z, long double complex c), (z,c)) +F(double complex, cproj, (double complex z), (z)) +F(float complex, cprojf, (float complex z), (z)) +F(long double complex, cprojl, (long double complex z), (z)) +F(double, creal, (double complex z), (z)) +F(float, crealf, (float complex z), (z)) +F(long double, creall, (long double complex z), (z)) +F(int, creat, (const char *filename, mode_t mode), (filename,mode)) +F(char *, crypt, (const char *key, const char *salt), (key,salt)) +F(double complex, csin, (double complex z), (z)) +F(float complex, csinf, (float complex z), (z)) +F(double complex, csinh, (double complex z), (z)) +F(float complex, csinhf, (float complex z), (z)) +F(long double complex, csinhl, (long double complex z), (z)) +F(long double complex, csinl, (long double complex z), (z)) +F(double complex, csqrt, (double complex z), (z)) +F(float complex, csqrtf, (float complex z), (z)) +F(long double complex, csqrtl, (long double complex z), (z)) +F(double complex, ctan, (double complex z), (z)) +F(float complex, ctanf, (float complex z), (z)) +F(double complex, ctanh, (double complex z), (z)) +F(float complex, ctanhf, (float complex z), (z)) +F(long double complex, ctanhl, (long double complex z), (z)) +F(long double complex, ctanl, (long double complex z), (z)) +F(char *, ctermid, (char *s), (s)) +F(char *, ctime, (const time_t *t), (t)) +F(char *, ctime_r, (const time_t *t, char *buf), (t,buf)) +F(char *, cuserid, (char *buf), (buf)) +F(int, daemon, (int nochdir, int noclose), (nochdir,noclose)) +F(char *, dcgettext, (const char *domainname, const char *msgid, int category), (domainname,msgid,category)) +F(char *, dcngettext, (const char *domainname, const char *msgid1, const char *msgid2, unsigned long int n, int category), (domainname,msgid1,msgid2,n,category)) +F(int, delete_module, (const char *a, unsigned b), (a,b)) +F(char *, dgettext, (const char *domainname, const char *msgid), (domainname,msgid)) +F(double, difftime, (time_t t1, time_t t0), (t1,t0)) +F(int, dirfd, (DIR *d), (d)) +F(char *, dirname, (char *s), (s)) +F(div_t, div, (int num, int den), (num,den)) +F(int, dl_iterate_phdr, (int(*callback)(struct dl_phdr_info *info, size_t size, void *data), void *data), (callback,data)) +F(int, dladdr, (void *addr, Dl_info *info), (addr,info)) +F(int, dlclose, (void *p), (p)) +F(char *, dlerror, (), ()) +F(int, dlinfo, (void *dso, int req, void *res), (dso,req,res)) +F(void *, dlopen, (const char *file, int mode), (file,mode)) +//F(void *, dlsym, (void *restrict p, const char *restrict s), (p,s)) +F(int, dn_skipname, (const unsigned char *s, const unsigned char *end), (s,end)) +F(char *, dngettext, (const char *domainname, const char *msgid1, const char *msgid2, unsigned long int n), (domainname,msgid1,msgid2,n)) +XF(int, dprintf, (int fd, const char *restrict fmt, ...)) +F(double, drand48, (void), ()) +F(int, dup, (int fd), (fd)) +F(int, dup2, (int old, int new), (old,new)) +F(locale_t, duplocale, (locale_t old), (old)) +F(char *, ecvt, (double x, int n, int *dp, int *sign), (x,n,dp,sign)) +V(void, endhostent, (void), ()) +F(int, endmntent, (FILE *f), (f)) +V(void, endprotoent, (void), ()) +V(void, endservent, (void), ()) +V(void, endspent, (), ()) +V(void, endusershell, (void), ()) +V(void, endutxent, (void), ()) +F(int, epoll_create, (int size), (size)) +F(int, epoll_create1, (int flags), (flags)) +F(int, epoll_ctl, (int fd, int op, int fd2, struct epoll_event *ev), (fd,op,fd2,ev)) +F(int, epoll_pwait, (int fd, struct epoll_event *ev, int cnt, int to, const sigset_t *sigs), (fd,ev,cnt,to,sigs)) +F(int, epoll_wait, (int fd, struct epoll_event *ev, int cnt, int to), (fd,ev,cnt,to)) +F(double, erand48, (unsigned short s[3]), (s)) +F(double, erf, (double x), (x)) +F(double, erfc, (double x), (x)) +F(float, erfcf, (float x), (x)) +F(long double, erfcl, (long double x), (x)) +F(float, erff, (float x), (x)) +F(long double, erfl, (long double x), (x)) +XV(_Noreturn void, err, (int status, const char *fmt, ...)) +XV(_Noreturn void, errx, (int status, const char *fmt, ...)) +F(struct ether_addr *, ether_aton, (const char *x), (x)) +F(struct ether_addr *, ether_aton_r, (const char *x, struct ether_addr *p_a), (x,p_a)) +F(int, ether_hostton, (const char *hostname, struct ether_addr *e), (hostname,e)) +F(int, ether_line, (const char *l, struct ether_addr *e, char *hostname), (l,e,hostname)) +F(char *, ether_ntoa, (const struct ether_addr *p_a), (p_a)) +F(char *, ether_ntoa_r, (const struct ether_addr *p_a, char *x), (p_a,x)) +F(int, ether_ntohost, (char *hostname, const struct ether_addr *e), (hostname,e)) +F(int, euidaccess, (const char *filename, int amode), (filename,amode)) +F(int, eventfd, (unsigned int count, int flags), (count,flags)) +F(int, eventfd_read, (int fd, eventfd_t *value), (fd,value)) +F(int, eventfd_write, (int fd, eventfd_t value), (fd,value)) +XF(int, execl, (const char *path, const char *argv0, ...)) +XF(int, execle, (const char *path, const char *argv0, ...)) +XF(int, execlp, (const char *file, const char *argv0, ...)) +F(int, execv, (const char *path, char *const argv[]), (path,argv)) +F(int, execve, (const char *path, char *const argv[], char *const envp[]), (path,argv,envp)) +F(int, execvp, (const char *file, char *const argv[]), (file,argv)) +V(_Noreturn void, exit, (int code), (code)) +F(double, exp, (double x), (x)) +F(double, exp10, (double x), (x)) +F(float, exp10f, (float x), (x)) +F(long double, exp10l, (long double x), (x)) +F(double, exp2, (double x), (x)) +F(float, exp2f, (float x), (x)) +F(long double, exp2l, (long double x), (x)) +F(float, expf, (float x), (x)) +F(long double, expl, (long double x), (x)) +F(double, expm1, (double x), (x)) +F(float, expm1f, (float x), (x)) +F(long double, expm1l, (long double x), (x)) +F(double, fabs, (double x), (x)) +F(float, fabsf, (float x), (x)) +F(long double, fabsl, (long double x), (x)) +F(int, faccessat, (int fd, const char *filename, int amode, int flag), (fd,filename,amode,flag)) +F(int, fallocate, (int fd, int mode, off_t base, off_t len), (fd,mode,base,len)) +F(int, fanotify_init, (unsigned flags, unsigned event_f_flags), (flags,event_f_flags)) +F(int, fanotify_mark, (int fanotify_fd, unsigned flags, unsigned long long mask, int dfd, const char *pathname), (fanotify_fd,flags,mask,dfd,pathname)) +F(int, fchdir, (int fd), (fd)) +F(int, fchmod, (int fd, mode_t mode), (fd,mode)) +F(int, fchmodat, (int fd, const char *path, mode_t mode, int flag), (fd,path,mode,flag)) +F(int, fchown, (int fd, uid_t uid, gid_t gid), (fd,uid,gid)) +F(int, fchownat, (int fd, const char *path, uid_t uid, gid_t gid, int flag), (fd,path,uid,gid,flag)) +F(int, fclose, (FILE *f), (f)) +XF(int, fcntl, (int fd, int cmd, ...)) +F(char *, fcvt, (double x, int n, int *dp, int *sign), (x,n,dp,sign)) +F(int, fdatasync, (int fd), (fd)) +F(double, fdim, (double x, double y), (x,y)) +F(float, fdimf, (float x, float y), (x,y)) +F(long double, fdiml, (long double x, long double y), (x,y)) +F(DIR *, fdopendir, (int fd), (fd)) +F(int, feclearexcept, (int mask), (mask)) +F(int, fegetenv, (fenv_t *envp), (envp)) +F(int, fegetexceptflag, (fexcept_t *fp, int mask), (fp,mask)) +F(int, fegetround, (void), ()) +F(int, feholdexcept, (fenv_t *envp), (envp)) +F(int, feof, (FILE *f), (f)) +F(int, feraiseexcept, (int mask), (mask)) +F(int, ferror, (FILE *f), (f)) +F(int, fesetenv, (const fenv_t *envp), (envp)) +F(int, fesetexceptflag, (const fexcept_t *fp, int mask), (fp,mask)) +F(int, fesetround, (int r), (r)) +F(int, fetestexcept, (int mask), (mask)) +F(int, feupdateenv, (const fenv_t *envp), (envp)) +F(int, fexecve, (int fd, char *const argv[], char *const envp[]), (fd,argv,envp)) +F(int, fflush, (FILE *f), (f)) +F(int, ffs, (int i), (i)) +F(int, fgetc, (FILE *f), (f)) +F(struct group *, fgetgrent, (FILE *f), (f)) +F(char *, fgetln, (FILE *f, size_t *plen), (f,plen)) +F(int, fgetpos, (FILE *restrict f, fpos_t *restrict pos), (f,pos)) +F(struct passwd *, fgetpwent, (FILE *f), (f)) +F(char *, fgets, (char *restrict s, int n, FILE *restrict f), (s,n,f)) +F(struct spwd *, fgetspent, (FILE *f), (f)) +F(wint_t, fgetwc, (FILE *f), (f)) +F(wchar_t *, fgetws, (wchar_t *restrict s, int n, FILE *restrict f), (s,n,f)) +F(ssize_t, fgetxattr, (int filedes, const char *name, void *value, size_t size), (filedes,name,value,size)) +F(int, fileno, (FILE *f), (f)) +F(int, finite, (double x), (x)) +F(int, finitef, (float x), (x)) +F(ssize_t, flistxattr, (int filedes, char *list, size_t size), (filedes,list,size)) +F(int, flock, (int fd, int op), (fd,op)) +V(void, flockfile, (FILE *f), (f)) +F(double, floor, (double x), (x)) +F(float, floorf, (float x), (x)) +F(long double, floorl, (long double x), (x)) +F(double, fma, (double x, double y, double z), (x,y,z)) +F(float, fmaf, (float x, float y, float z), (x,y,z)) +F(long double, fmal, (long double x, long double y, long double z), (x,y,z)) +F(double, fmax, (double x, double y), (x,y)) +F(float, fmaxf, (float x, float y), (x,y)) +F(long double, fmaxl, (long double x, long double y), (x,y)) +F(FILE *, fmemopen, (void *restrict buf, size_t size, const char *restrict mode), (buf,size,mode)) +F(double, fmin, (double x, double y), (x,y)) +F(float, fminf, (float x, float y), (x,y)) +F(long double, fminl, (long double x, long double y), (x,y)) +F(double, fmod, (double x, double y), (x,y)) +F(float, fmodf, (float x, float y), (x,y)) +F(long double, fmodl, (long double x, long double y), (x,y)) +F(int, fnmatch, (const char *pat, const char *str, int flags), (pat,str,flags)) +F(FILE *, fopen, (const char *restrict filename, const char *restrict mode), (filename,mode)) +F(pid_t, fork, (void), ()) +F(int, forkpty, (int *m, char *name, const struct termios *tio, const struct winsize *ws), (m,name,tio,ws)) +F(long, fpathconf, (int fd, int name), (fd,name)) +XF(int, fprintf, (FILE *restrict f, const char *restrict fmt, ...)) +F(int, fputc, (int c, FILE *f), (c,f)) +F(int, fputs, (const char *restrict s, FILE *restrict f), (s,f)) +F(wint_t, fputwc, (wchar_t c, FILE *f), (c,f)) +F(int, fputws, (const wchar_t *restrict ws, FILE *restrict f), (ws,f)) +F(size_t, fread, (void *restrict destv, size_t size, size_t nmemb, FILE *restrict f), (destv,size,nmemb,f)) +V(void, free, (void *p), (p)) +V(void, freeaddrinfo, (struct addrinfo *p), (p)) +V(void, freeifaddrs, (struct ifaddrs *ifp), (ifp)) +V(void, freelocale, (locale_t l), (l)) +F(int, fremovexattr, (int fd, const char *name), (fd,name)) +F(FILE *, freopen, (const char *restrict filename, const char *restrict mode, FILE *restrict f), (filename,mode,f)) +F(double, frexp, (double x, int *e), (x,e)) +F(float, frexpf, (float x, int *e), (x,e)) +F(long double, frexpl, (long double x, int *e), (x,e)) +XF(int, fscanf, (FILE *restrict f, const char *restrict fmt, ...)) +F(int, fseek, (FILE *f, long off, int whence), (f,off,whence)) +F(int, fsetpos, (FILE *f, const fpos_t *pos), (f,pos)) +F(int, fsetxattr, (int filedes, const char *name, const void *value, size_t size, int flags), (filedes,name,value,size,flags)) +F(int, fstat, (int fd, struct stat *st), (fd,st)) +F(int, fstatat, (int fd, const char *restrict path, struct stat *restrict buf, int flag), (fd,path,buf,flag)) +F(int, fstatvfs, (int fd, struct statvfs *buf), (fd,buf)) +F(int, fsync, (int fd), (fd)) +F(long, ftell, (FILE *f), (f)) +F(int, ftime, (struct timeb *tp), (tp)) +F(key_t, ftok, (const char *path, int id), (path,id)) +F(int, ftruncate, (int fd, off_t length), (fd,length)) +F(int, ftrylockfile, (FILE *f), (f)) +F(int, ftw, (const char *path, int (*fn)(const char *, const struct stat *, int), int fd_limit), (path,fn,fd_limit)) +V(void, funlockfile, (FILE *f), (f)) +F(int, futimens, (int fd, const struct timespec times[2]), (fd,times)) +F(int, futimes, (int fd, const struct timeval tv[2]), (fd,tv)) +F(int, futimesat, (int dirfd, const char *pathname, const struct timeval times[2]), (dirfd,pathname,times)) +F(int, fwide, (FILE *f, int mode), (f,mode)) +XF(int, fwprintf, (FILE *restrict f, const wchar_t *restrict fmt, ...)) +F(size_t, fwrite, (const void *restrict src, size_t size, size_t nmemb, FILE *restrict f), (src,size,nmemb,f)) +XF(int, fwscanf, (FILE *restrict f, const wchar_t *restrict fmt, ...)) +F(const char *, gai_strerror, (int ecode), (ecode)) +F(char *, gcvt, (double x, int n, char *b), (x,n,b)) +F(char *, get_current_dir_name, (void), ()) +F(int, getaddrinfo, (const char *restrict host, const char *restrict serv, const struct addrinfo *restrict hint, struct addrinfo **restrict res), (host,serv,hint,res)) +F(int, getc, (FILE *f), (f)) +F(int, getc_unlocked, (FILE *f), (f)) +F(int, getchar, (void), ()) +F(int, getchar_unlocked, (void), ()) +F(char *, getcwd, (char *buf, size_t size), (buf,size)) +F(struct tm *, getdate, (const char *s), (s)) +F(ssize_t, getdelim, (char **restrict s, size_t *restrict n, int delim, FILE *restrict f), (s,n,delim,f)) +F(int, getdomainname, (char *name, size_t len), (name,len)) +F(int, getdtablesize, (void), ()) +F(gid_t, getegid, (void), ()) +F(char *, getenv, (const char *name), (name)) +F(uid_t, geteuid, (void), ()) +F(gid_t, getgid, (void), ()) +F(struct group *, getgrent, (), ()) +F(struct group *, getgrgid, (gid_t gid), (gid)) +F(int, getgrgid_r, (gid_t gid, struct group *gr, char *buf, size_t size, struct group **res), (gid,gr,buf,size,res)) +F(struct group *, getgrnam, (const char *name), (name)) +F(int, getgrnam_r, (const char *name, struct group *gr, char *buf, size_t size, struct group **res), (name,gr,buf,size,res)) +F(int, getgrouplist, (const char *user, gid_t gid, gid_t *groups, int *ngroups), (user,gid,groups,ngroups)) +F(int, getgroups, (int count, gid_t list[]), (count,list)) +F(struct hostent *, gethostbyaddr, (const void *a, socklen_t l, int af), (a,l,af)) +F(int, gethostbyaddr_r, (const void *a, socklen_t l, int af, struct hostent *h, char *buf, size_t buflen, struct hostent **res, int *err), (a,l,af,h,buf,buflen,res,err)) +F(struct hostent *, gethostbyname, (const char *name), (name)) +F(struct hostent *, gethostbyname2, (const char *name, int af), (name,af)) +F(int, gethostbyname2_r, (const char *name, int af, struct hostent *h, char *buf, size_t buflen, struct hostent **res, int *err), (name,af,h,buf,buflen,res,err)) +F(int, gethostbyname_r, (const char *name, struct hostent *h, char *buf, size_t buflen, struct hostent **res, int *err), (name,h,buf,buflen,res,err)) +F(struct hostent *, gethostent, (), ()) +F(long, gethostid, (), ()) +F(int, gethostname, (char *name, size_t len), (name,len)) +F(int, getifaddrs, (struct ifaddrs **ifap), (ifap)) +F(int, getitimer, (int which, struct itimerval *old), (which,old)) +F(ssize_t, getline, (char **restrict s, size_t *restrict n, FILE *restrict f), (s,n,f)) +F(int, getloadavg, (double *a, int n), (a,n)) +F(char *, getlogin, (void), ()) +F(int, getlogin_r, (char *name, size_t size), (name,size)) +F(struct mntent *, getmntent, (FILE *f), (f)) +F(struct mntent *, getmntent_r, (FILE *f, struct mntent *mnt, char *linebuf, int buflen), (f,mnt,linebuf,buflen)) +F(int, getnameinfo, (const struct sockaddr *restrict sa, socklen_t sl, char *restrict node, socklen_t nodelen, char *restrict serv, socklen_t servlen, int flags), (sa,sl,node,nodelen,serv,servlen,flags)) +F(struct netent *, getnetbyaddr, (uint32_t net, int type), (net,type)) +F(struct netent *, getnetbyname, (const char *name), (name)) +F(int, getopt, (int argc, char * const argv[], const char *optstring), (argc,argv,optstring)) +F(int, getopt_long, (int argc, char *const *argv, const char *optstring, const struct option *longopts, int *idx), (argc,argv,optstring,longopts,idx)) +F(int, getopt_long_only, (int argc, char *const *argv, const char *optstring, const struct option *longopts, int *idx), (argc,argv,optstring,longopts,idx)) +F(int, getpagesize, (void), ()) +F(char *, getpass, (const char *prompt), (prompt)) +F(int, getpeername, (int fd, struct sockaddr *restrict addr, socklen_t *restrict len), (fd,addr,len)) +F(pid_t, getpgid, (pid_t pid), (pid)) +F(pid_t, getpgrp, (void), ()) +F(pid_t, getpid, (void), ()) +F(pid_t, getppid, (void), ()) +F(int, getpriority, (int which, id_t who), (which,who)) +F(struct protoent *, getprotobyname, (const char *name), (name)) +F(struct protoent *, getprotobynumber, (int num), (num)) +F(struct protoent *, getprotoent, (void), ()) +F(struct passwd *, getpwent, (), ()) +F(struct passwd *, getpwnam, (const char *name), (name)) +F(int, getpwnam_r, (const char *name, struct passwd *pw, char *buf, size_t size, struct passwd **res), (name,pw,buf,size,res)) +F(struct passwd *, getpwuid, (uid_t uid), (uid)) +F(int, getpwuid_r, (uid_t uid, struct passwd *pw, char *buf, size_t size, struct passwd **res), (uid,pw,buf,size,res)) +F(int, getresgid, (gid_t *rgid, gid_t *egid, gid_t *sgid), (rgid,egid,sgid)) +F(int, getresuid, (uid_t *ruid, uid_t *euid, uid_t *suid), (ruid,euid,suid)) +F(int, getrlimit, (int resource, struct rlimit *rlim), (resource,rlim)) +F(int, getrusage, (int who, struct rusage *ru), (who,ru)) +F(char *, gets, (char *s), (s)) +F(struct servent *, getservbyname, (const char *name, const char *prots), (name,prots)) +F(int, getservbyname_r, (const char *name, const char *prots, struct servent *se, char *buf, size_t buflen, struct servent **res), (name,prots,se,buf,buflen,res)) +F(struct servent *, getservbyport, (int port, const char *prots), (port,prots)) +F(int, getservbyport_r, (int port, const char *prots, struct servent *se, char *buf, size_t buflen, struct servent **res), (port,prots,se,buf,buflen,res)) +F(struct servent *, getservent, (void), ()) +F(pid_t, getsid, (pid_t pid), (pid)) +F(int, getsockname, (int fd, struct sockaddr *restrict addr, socklen_t *restrict len), (fd,addr,len)) +F(int, getsockopt, (int fd, int level, int optname, void *restrict optval, socklen_t *restrict optlen), (fd,level,optname,optval,optlen)) +F(struct spwd *, getspent, (), ()) +F(struct spwd *, getspnam, (const char *name), (name)) +F(int, getspnam_r, (const char *name, struct spwd *sp, char *buf, size_t size, struct spwd **res), (name,sp,buf,size,res)) +F(int, getsubopt, (char **opt, char *const *keys, char **val), (opt,keys,val)) +F(char *, gettext, (const char *msgid), (msgid)) +F(int, gettimeofday, (struct timeval *restrict tv, void *restrict tz), (tv,tz)) +F(uid_t, getuid, (void), ()) +F(char *, getusershell, (void), ()) +F(struct utmpx *, getutxent, (void), ()) +F(struct utmpx *, getutxid, (const struct utmpx *ut), (ut)) +F(struct utmpx *, getutxline, (const struct utmpx *ut), (ut)) +F(int, getw, (FILE *f), (f)) +F(wint_t, getwc, (FILE *f), (f)) +F(wint_t, getwchar, (void), ()) +F(ssize_t, getxattr, (const char *path, const char *name, void *value, size_t size), (path,name,value,size)) +F(int, glob, (const char *restrict pat, int flags, int (*errfunc)(const char *path, int err), glob_t *restrict g), (pat,flags,errfunc,g)) +V(void, globfree, (glob_t *g), (g)) +F(struct tm *, gmtime, (const time_t *t), (t)) +F(int, grantpt, (int fd), (fd)) +F(char *, hasmntopt, (const struct mntent *mnt, const char *opt), (mnt,opt)) +F(int, hcreate, (size_t nel), (nel)) +V(void, hdestroy, (void), ()) +V(void, herror, (const char *msg), (msg)) +F(ENTRY *, hsearch, (ENTRY item, ACTION action), (item,action)) +F(const char *, hstrerror, (int ecode), (ecode)) +F(uint32_t, htonl, (uint32_t n), (n)) +F(uint16_t, htons, (uint16_t n), (n)) +F(double, hypot, (double x, double y), (x,y)) +F(float, hypotf, (float x, float y), (x,y)) +F(long double, hypotl, (long double x, long double y), (x,y)) +F(size_t, iconv, (iconv_t cd0, char **restrict in, size_t *restrict inb, char **restrict out, size_t *restrict outb), (cd0,in,inb,out,outb)) +F(int, iconv_close, (iconv_t cd), (cd)) +F(iconv_t, iconv_open, (const char *to, const char *from), (to,from)) +V(void, if_freenameindex, (struct if_nameindex *idx), (idx)) +F(char *, if_indextoname, (unsigned index, char *name), (index,name)) +F(struct if_nameindex *, if_nameindex, (), ()) +F(unsigned, if_nametoindex, (const char *name), (name)) +F(int, ilogb, (double x), (x)) +F(int, ilogbf, (float x), (x)) +F(int, ilogbl, (long double x), (x)) +F(intmax_t, imaxabs, (intmax_t a), (a)) +F(imaxdiv_t, imaxdiv, (intmax_t num, intmax_t den), (num,den)) +F(char *, index, (const char *s, int c), (s,c)) +F(in_addr_t, inet_addr, (const char *p), (p)) +F(int, inet_aton, (const char *cp, struct in_addr *inp), (cp,inp)) +F(in_addr_t, inet_lnaof, (struct in_addr in), (in)) +F(struct in_addr, inet_makeaddr, (int net, int host), (net,host)) +F(in_addr_t, inet_netof, (struct in_addr in), (in)) +F(in_addr_t, inet_network, (const char *p), (p)) +F(char *, inet_ntoa, (struct in_addr in), (in)) +F(const char *, inet_ntop, (int af, const void *restrict a0, char *restrict s, socklen_t l), (af,a0,s,l)) +F(int, inet_pton, (int af, const char *restrict s, void *restrict a0), (af,s,a0)) +F(int, init_module, (void *a, unsigned long b, const char *c), (a,b,c)) +F(int, initgroups, (const char *user, gid_t gid), (user,gid)) +F(char *, initstate, (unsigned seed, char *state, size_t size), (seed,state,size)) +F(int, inotify_add_watch, (int fd, const char *pathname, uint32_t mask), (fd,pathname,mask)) +F(int, inotify_init, (), ()) +F(int, inotify_init1, (int flags), (flags)) +F(int, inotify_rm_watch, (int fd, uint32_t wd), (fd,wd)) +V(void, insque, (void *element, void *pred), (element,pred)) +XF(int, ioctl, (int fd, int req, ...)) +F(int, ioperm, (unsigned long from, unsigned long num, int turn_on), (from,num,turn_on)) +F(int, iopl, (int level), (level)) +F(int, isalnum, (int c), (c)) +F(int, isalnum_l, (int c, locale_t l), (c,l)) +F(int, isalpha, (int c), (c)) +F(int, isalpha_l, (int c, locale_t l), (c,l)) +F(int, isascii, (int c), (c)) +F(int, isastream, (int fd), (fd)) +F(int, isatty, (int fd), (fd)) +F(int, isblank, (int c), (c)) +F(int, isblank_l, (int c, locale_t l), (c,l)) +F(int, iscntrl, (int c), (c)) +F(int, iscntrl_l, (int c, locale_t l), (c,l)) +F(int, isdigit, (int c), (c)) +F(int, isdigit_l, (int c, locale_t l), (c,l)) +F(int, isgraph, (int c), (c)) +F(int, isgraph_l, (int c, locale_t l), (c,l)) +F(int, islower, (int c), (c)) +F(int, islower_l, (int c, locale_t l), (c,l)) +F(int, isprint, (int c), (c)) +F(int, isprint_l, (int c, locale_t l), (c,l)) +F(int, ispunct, (int c), (c)) +F(int, ispunct_l, (int c, locale_t l), (c,l)) +F(int, isspace, (int c), (c)) +F(int, isspace_l, (int c, locale_t l), (c,l)) +F(int, isupper, (int c), (c)) +F(int, isupper_l, (int c, locale_t l), (c,l)) +F(int, iswalnum, (wint_t wc), (wc)) +F(int, iswalnum_l, (wint_t c, locale_t l), (c,l)) +F(int, iswalpha, (wint_t wc), (wc)) +F(int, iswalpha_l, (wint_t c, locale_t l), (c,l)) +F(int, iswblank, (wint_t wc), (wc)) +F(int, iswblank_l, (wint_t c, locale_t l), (c,l)) +F(int, iswcntrl, (wint_t wc), (wc)) +F(int, iswcntrl_l, (wint_t c, locale_t l), (c,l)) +F(int, iswctype, (wint_t wc, wctype_t type), (wc,type)) +F(int, iswctype_l, (wint_t c, wctype_t t, locale_t l), (c,t,l)) +F(int, iswdigit, (wint_t wc), (wc)) +F(int, iswdigit_l, (wint_t c, locale_t l), (c,l)) +F(int, iswgraph, (wint_t wc), (wc)) +F(int, iswgraph_l, (wint_t c, locale_t l), (c,l)) +F(int, iswlower, (wint_t wc), (wc)) +F(int, iswlower_l, (wint_t c, locale_t l), (c,l)) +F(int, iswprint, (wint_t wc), (wc)) +F(int, iswprint_l, (wint_t c, locale_t l), (c,l)) +F(int, iswpunct, (wint_t wc), (wc)) +F(int, iswpunct_l, (wint_t c, locale_t l), (c,l)) +F(int, iswspace, (wint_t wc), (wc)) +F(int, iswspace_l, (wint_t c, locale_t l), (c,l)) +F(int, iswupper, (wint_t wc), (wc)) +F(int, iswupper_l, (wint_t c, locale_t l), (c,l)) +F(int, iswxdigit, (wint_t wc), (wc)) +F(int, iswxdigit_l, (wint_t c, locale_t l), (c,l)) +F(int, isxdigit, (int c), (c)) +F(int, isxdigit_l, (int c, locale_t l), (c,l)) +F(double, j0, (double x), (x)) +F(float, j0f, (float x), (x)) +F(double, j1, (double x), (x)) +F(float, j1f, (float x), (x)) +F(double, jn, (int n, double x), (n,x)) +F(float, jnf, (int n, float x), (n,x)) +F(long, jrand48, (unsigned short s[3]), (s)) +F(int, kill, (pid_t pid, int sig), (pid,sig)) +F(int, killpg, (pid_t pgid, int sig), (pgid,sig)) +F(int, klogctl, (int type, char *buf, int len), (type,buf,len)) +F(char *, l64a, (long x0), (x0)) +F(long, labs, (long a), (a)) +F(int, lchmod, (const char *path, mode_t mode), (path,mode)) +F(int, lchown, (const char *path, uid_t uid, gid_t gid), (path,uid,gid)) +F(int, lckpwdf, (), ()) +V(void, lcong48, (unsigned short p[7]), (p)) +F(double, ldexp, (double x, int n), (x,n)) +F(float, ldexpf, (float x, int n), (x,n)) +F(long double, ldexpl, (long double x, int n), (x,n)) +F(ldiv_t, ldiv, (long num, long den), (num,den)) +F(void *, lfind, (const void *key, const void *base, size_t *nelp, size_t width, int (*compar)(const void *, const void *)), (key,base,nelp,width,compar)) +F(double, lgamma, (double x), (x)) +F(float, lgammaf, (float x), (x)) +F(long double, lgammal, (long double x), (x)) +F(ssize_t, lgetxattr, (const char *path, const char *name, void *value, size_t size), (path,name,value,size)) +F(int, link, (const char *existing, const char *new), (existing,new)) +F(int, linkat, (int fd1, const char *existing, int fd2, const char *new, int flag), (fd1,existing,fd2,new,flag)) +F(int, lio_listio, (int mode, struct aiocb *restrict const *restrict cbs, int cnt, struct sigevent *restrict sev), (mode,cbs,cnt,sev)) +F(int, listen, (int fd, int backlog), (fd,backlog)) +F(ssize_t, listxattr, (const char *path, char *list, size_t size), (path,list,size)) +F(long long, llabs, (long long a), (a)) +F(lldiv_t, lldiv, (long long num, long long den), (num,den)) +F(ssize_t, llistxattr, (const char *path, char *list, size_t size), (path,list,size)) +F(long long, llrint, (double x), (x)) +F(long long, llrintf, (float x), (x)) +F(long long, llrintl, (long double x), (x)) +F(long long, llround, (double x), (x)) +F(long long, llroundf, (float x), (x)) +F(long long, llroundl, (long double x), (x)) +F(struct lconv *, localeconv, (void), ()) +F(struct tm *, localtime, (const time_t *t), (t)) +F(int, lockf, (int fd, int op, off_t size), (fd,op,size)) +F(double, log, (double x), (x)) +F(double, log10, (double x), (x)) +F(float, log10f, (float x), (x)) +F(long double, log10l, (long double x), (x)) +F(double, log1p, (double x), (x)) +F(float, log1pf, (float x), (x)) +F(long double, log1pl, (long double x), (x)) +F(double, log2, (double x), (x)) +F(float, log2f, (float x), (x)) +F(long double, log2l, (long double x), (x)) +F(double, logb, (double x), (x)) +F(float, logbf, (float x), (x)) +F(long double, logbl, (long double x), (x)) +F(float, logf, (float x), (x)) +F(long double, logl, (long double x), (x)) +F(long, lrand48, (void), ()) +F(int, lremovexattr, (const char *path, const char *name), (path,name)) +F(long, lrint, (double x), (x)) +F(long, lrintf, (float x), (x)) +F(long, lrintl, (long double x), (x)) +F(long, lround, (double x), (x)) +F(long, lroundf, (float x), (x)) +F(long, lroundl, (long double x), (x)) +F(void *, lsearch, (const void *key, void *base, size_t *nelp, size_t width, int (*compar)(const void *, const void *)), (key,base,nelp,width,compar)) +F(off_t, lseek, (int fd, off_t offset, int whence), (fd,offset,whence)) +F(int, lsetxattr, (const char *path, const char *name, const void *value, size_t size, int flags), (path,name,value,size,flags)) +F(int, lstat, (const char *restrict path, struct stat *restrict buf), (path,buf)) +F(int, lutimes, (const char *filename, const struct timeval tv[2]), (filename,tv)) +F(void *, malloc, (size_t n), (n)) +F(int, mblen, (const char *s, size_t n), (s,n)) +F(size_t, mbrlen, (const char *restrict s, size_t n, mbstate_t *restrict st), (s,n,st)) +F(size_t, mbrtowc, (wchar_t *restrict wc, const char *restrict src, size_t n, mbstate_t *restrict st), (wc,src,n,st)) +F(int, mbsinit, (const mbstate_t *st), (st)) +F(size_t, mbsnrtowcs, (wchar_t *restrict wcs, const char **restrict src, size_t n, size_t wn, mbstate_t *restrict st), (wcs,src,n,wn,st)) +F(size_t, mbsrtowcs, (wchar_t *restrict ws, const char **restrict src, size_t wn, mbstate_t *restrict st), (ws,src,wn,st)) +F(size_t, mbstowcs, (wchar_t *restrict ws, const char *restrict s, size_t wn), (ws,s,wn)) +F(int, mbtowc, (wchar_t *restrict wc, const char *restrict src, size_t n), (wc,src,n)) +F(void *, memccpy, (void *restrict dest, const void *restrict src, int c, size_t n), (dest,src,c,n)) +F(void *, memchr, (const void *src, int c, size_t n), (src,c,n)) +F(int, memcmp, (const void *vl, const void *vr, size_t n), (vl,vr,n)) +F(void *, memcpy, (void *restrict dest, const void *restrict src, size_t n), (dest,src,n)) +F(void *, memmem, (const void *h0, size_t k, const void *n0, size_t l), (h0,k,n0,l)) +F(void *, memmove, (void *dest, const void *src, size_t n), (dest,src,n)) +F(void *, mempcpy, (void *dest, const void *src, size_t n), (dest,src,n)) +F(void *, memset, (void *dest, int c, size_t n), (dest,c,n)) +F(int, mincore, (void *addr, size_t len, unsigned char *vec), (addr,len,vec)) +F(int, mkdir, (const char *path, mode_t mode), (path,mode)) +F(int, mkdirat, (int fd, const char *path, mode_t mode), (fd,path,mode)) +F(char *, mkdtemp, (char *template), (template)) +F(int, mkfifo, (const char *path, mode_t mode), (path,mode)) +F(int, mkfifoat, (int fd, const char *path, mode_t mode), (fd,path,mode)) +F(int, mknod, (const char *path, mode_t mode, dev_t dev), (path,mode,dev)) +F(int, mknodat, (int fd, const char *path, mode_t mode, dev_t dev), (fd,path,mode,dev)) +F(int, mkostemp, (char *template, int flags), (template,flags)) +F(int, mkstemp, (char *template), (template)) +F(int, mkstemps, (char *template, int len), (template,len)) +F(char *, mktemp, (char *template), (template)) +F(time_t, mktime, (struct tm *tm), (tm)) +F(int, mlock, (const void *addr, size_t len), (addr,len)) +F(int, mlockall, (int flags), (flags)) +F(double, modf, (double x, double *iptr), (x,iptr)) +F(float, modff, (float x, float *iptr), (x,iptr)) +F(long double, modfl, (long double x, long double *iptr), (x,iptr)) +F(int, mount, (const char *special, const char *dir, const char *fstype, unsigned long flags, const void *data), (special,dir,fstype,flags,data)) +F(int, mprotect, (void *addr, size_t len, int prot), (addr,len,prot)) +F(int, mq_close, (mqd_t mqd), (mqd)) +F(int, mq_getattr, (mqd_t mqd, struct mq_attr *attr), (mqd,attr)) +F(int, mq_notify, (mqd_t mqd, const struct sigevent *sev), (mqd,sev)) +XF(mqd_t, mq_open, (const char *name, int flags, ...)) +F(ssize_t, mq_receive, (mqd_t mqd, char *msg, size_t len, unsigned *prio), (mqd,msg,len,prio)) +F(int, mq_send, (mqd_t mqd, const char *msg, size_t len, unsigned prio), (mqd,msg,len,prio)) +F(int, mq_setattr, (mqd_t mqd, const struct mq_attr *restrict new, struct mq_attr *restrict old), (mqd,new,old)) +F(ssize_t, mq_timedreceive, (mqd_t mqd, char *restrict msg, size_t len, unsigned *restrict prio, const struct timespec *restrict at), (mqd,msg,len,prio,at)) +F(int, mq_timedsend, (mqd_t mqd, const char *msg, size_t len, unsigned prio, const struct timespec *at), (mqd,msg,len,prio,at)) +F(int, mq_unlink, (const char *name), (name)) +F(long, mrand48, (void), ()) +F(int, msgctl, (int q, int cmd, struct msqid_ds *buf), (q,cmd,buf)) +F(int, msgget, (key_t k, int flag), (k,flag)) +F(ssize_t, msgrcv, (int q, void *m, size_t len, long type, int flag), (q,m,len,type,flag)) +F(int, msgsnd, (int q, const void *m, size_t len, int flag), (q,m,len,flag)) +F(int, msync, (void *start, size_t len, int flags), (start,len,flags)) +F(int, munlock, (const void *addr, size_t len), (addr,len)) +F(int, munlockall, (void), ()) +F(double, nan, (const char *s), (s)) +F(float, nanf, (const char *s), (s)) +F(long double, nanl, (const char *s), (s)) +F(int, nanosleep, (const struct timespec *req, struct timespec *rem), (req,rem)) +F(double, nearbyint, (double x), (x)) +F(float, nearbyintf, (float x), (x)) +F(long double, nearbyintl, (long double x), (x)) +F(locale_t, newlocale, (int mask, const char *name, locale_t base), (mask,name,base)) +F(double, nextafter, (double x, double y), (x,y)) +F(float, nextafterf, (float x, float y), (x,y)) +F(long double, nextafterl, (long double x, long double y), (x,y)) +F(double, nexttoward, (double x, long double y), (x,y)) +F(float, nexttowardf, (float x, long double y), (x,y)) +F(long double, nexttowardl, (long double x, long double y), (x,y)) +F(int, nftw, (const char *path, int (*fn)(const char *, const struct stat *, int, struct FTW *), int fd_limit, int flags), (path,fn,fd_limit,flags)) +F(char *, ngettext, (const char *msgid1, const char *msgid2, unsigned long int n), (msgid1,msgid2,n)) +F(int, nice, (int inc), (inc)) +F(long, nrand48, (unsigned short s[3]), (s)) +F(uint32_t, ntohl, (uint32_t n), (n)) +F(uint16_t, ntohs, (uint16_t n), (n)) +XF(int, open, (const char *filename, int flags, ...)) +F(FILE *, open_memstream, (char **bufp, size_t *sizep), (bufp,sizep)) +F(FILE *, open_wmemstream, (wchar_t **bufp, size_t *sizep), (bufp,sizep)) +XF(int, openat, (int fd, const char *filename, int flags, ...)) +F(DIR *, opendir, (const char *name), (name)) +V(void, openlog, (const char *ident, int opt, int facility), (ident,opt,facility)) +F(int, openpty, (int *m, int *s, char *name, const struct termios *tio, const struct winsize *ws), (m,s,name,tio,ws)) +F(long, pathconf, (const char *path, int name), (path,name)) +F(int, pause, (void), ()) +F(int, pclose, (FILE *f), (f)) +V(void, perror, (const char *msg), (msg)) +F(int, personality, (unsigned long persona), (persona)) +F(int, pipe, (int fd[2]), (fd)) +F(int, pipe2, (int fd[2], int flag), (fd,flag)) +F(int, pivot_root, (const char *new, const char *old), (new,old)) +F(int, poll, (struct pollfd *fds, nfds_t n, int timeout), (fds,n,timeout)) +F(FILE *, popen, (const char *cmd, const char *mode), (cmd,mode)) +F(int, posix_close, (int fd, int flags), (fd,flags)) +F(int, posix_fadvise, (int fd, off_t base, off_t len, int advice), (fd,base,len,advice)) +F(int, posix_fallocate, (int fd, off_t base, off_t len), (fd,base,len)) +F(int, posix_madvise, (void *addr, size_t len, int advice), (addr,len,advice)) +F(int, posix_memalign, (void **res, size_t align, size_t len), (res,align,len)) +F(int, posix_openpt, (int flags), (flags)) +F(int, posix_spawn, (pid_t *restrict res, const char *restrict path, const posix_spawn_file_actions_t *fa, const posix_spawnattr_t *restrict attr, char *const argv[restrict], char *const envp[restrict]), (res,path,fa,attr,argv,envp)) +F(int, posix_spawn_file_actions_addclose, (posix_spawn_file_actions_t *fa, int fd), (fa,fd)) +F(int, posix_spawn_file_actions_adddup2, (posix_spawn_file_actions_t *fa, int srcfd, int fd), (fa,srcfd,fd)) +F(int, posix_spawn_file_actions_addopen, (posix_spawn_file_actions_t *restrict fa, int fd, const char *restrict path, int flags, mode_t mode), (fa,fd,path,flags,mode)) +F(int, posix_spawn_file_actions_destroy, (posix_spawn_file_actions_t *fa), (fa)) +F(int, posix_spawn_file_actions_init, (posix_spawn_file_actions_t *fa), (fa)) +F(int, posix_spawnattr_destroy, (posix_spawnattr_t *attr), (attr)) +F(int, posix_spawnattr_getflags, (const posix_spawnattr_t *restrict attr, short *restrict flags), (attr,flags)) +F(int, posix_spawnattr_getpgroup, (const posix_spawnattr_t *restrict attr, pid_t *restrict pgrp), (attr,pgrp)) +F(int, posix_spawnattr_getschedparam, (const posix_spawnattr_t *restrict attr, struct sched_param *restrict schedparam), (attr,schedparam)) +F(int, posix_spawnattr_getschedpolicy, (const posix_spawnattr_t *restrict attr, int *restrict policy), (attr,policy)) +F(int, posix_spawnattr_getsigdefault, (const posix_spawnattr_t *restrict attr, sigset_t *restrict def), (attr,def)) +F(int, posix_spawnattr_getsigmask, (const posix_spawnattr_t *restrict attr, sigset_t *restrict mask), (attr,mask)) +F(int, posix_spawnattr_init, (posix_spawnattr_t *attr), (attr)) +F(int, posix_spawnattr_setflags, (posix_spawnattr_t *attr, short flags), (attr,flags)) +F(int, posix_spawnattr_setpgroup, (posix_spawnattr_t *attr, pid_t pgrp), (attr,pgrp)) +F(int, posix_spawnattr_setschedparam, (posix_spawnattr_t *restrict attr, const struct sched_param *restrict schedparam), (attr,schedparam)) +F(int, posix_spawnattr_setschedpolicy, (posix_spawnattr_t *attr, int policy), (attr,policy)) +F(int, posix_spawnattr_setsigdefault, (posix_spawnattr_t *restrict attr, const sigset_t *restrict def), (attr,def)) +F(int, posix_spawnattr_setsigmask, (posix_spawnattr_t *restrict attr, const sigset_t *restrict mask), (attr,mask)) +F(int, posix_spawnp, (pid_t *restrict res, const char *restrict file, const posix_spawn_file_actions_t *fa, const posix_spawnattr_t *restrict attr, char *const argv[restrict], char *const envp[restrict]), (res,file,fa,attr,argv,envp)) +F(double, pow, (double x, double y), (x,y)) +F(float, powf, (float x, float y), (x,y)) +F(long double, powl, (long double x, long double y), (x,y)) +F(int, ppoll, (struct pollfd *fds, nfds_t n, const struct timespec *to, const sigset_t *mask), (fds,n,to,mask)) +XF(int, prctl, (int op, ...)) +F(ssize_t, pread, (int fd, void *buf, size_t size, off_t ofs), (fd,buf,size,ofs)) +F(ssize_t, preadv, (int fd, const struct iovec *iov, int count, off_t ofs), (fd,iov,count,ofs)) +XF(int, printf, (const char *restrict fmt, ...)) +F(int, prlimit, (pid_t pid, int resource, const struct rlimit *new_limit, struct rlimit *old_limit), (pid,resource,new_limit,old_limit)) +F(ssize_t, process_vm_readv, (pid_t pid, const struct iovec *lvec, unsigned long liovcnt, const struct iovec *rvec, unsigned long riovcnt, unsigned long flags), (pid,lvec,liovcnt,rvec,riovcnt,flags)) +F(ssize_t, process_vm_writev, (pid_t pid, const struct iovec *lvec, unsigned long liovcnt, const struct iovec *rvec, unsigned long riovcnt, unsigned long flags), (pid,lvec,liovcnt,rvec,riovcnt,flags)) +F(int, pselect, (int n, fd_set *restrict rfds, fd_set *restrict wfds, fd_set *restrict efds, const struct timespec *restrict ts, const sigset_t *restrict mask), (n,rfds,wfds,efds,ts,mask)) +V(void, psiginfo, (const siginfo_t *si, const char *msg), (si,msg)) +V(void, psignal, (int sig, const char *msg), (sig,msg)) +F(int, pthread_atfork, (void (*prepare)(void), void (*parent)(void), void (*child)(void)), (prepare,parent,child)) +F(int, pthread_attr_destroy, (pthread_attr_t *a), (a)) +F(int, pthread_attr_getdetachstate, (const pthread_attr_t *a, int *state), (a,state)) +F(int, pthread_attr_getguardsize, (const pthread_attr_t *restrict a, size_t *restrict size), (a,size)) +F(int, pthread_attr_getinheritsched, (const pthread_attr_t *restrict a, int *restrict inherit), (a,inherit)) +F(int, pthread_attr_getschedparam, (const pthread_attr_t *restrict a, struct sched_param *restrict param), (a,param)) +F(int, pthread_attr_getschedpolicy, (const pthread_attr_t *restrict a, int *restrict policy), (a,policy)) +F(int, pthread_attr_getscope, (const pthread_attr_t *restrict a, int *restrict scope), (a,scope)) +F(int, pthread_attr_getstack, (const pthread_attr_t *restrict a, void **restrict addr, size_t *restrict size), (a,addr,size)) +F(int, pthread_attr_getstacksize, (const pthread_attr_t *restrict a, size_t *restrict size), (a,size)) +F(int, pthread_attr_init, (pthread_attr_t *a), (a)) +F(int, pthread_attr_setdetachstate, (pthread_attr_t *a, int state), (a,state)) +F(int, pthread_attr_setguardsize, (pthread_attr_t *a, size_t size), (a,size)) +F(int, pthread_attr_setinheritsched, (pthread_attr_t *a, int inherit), (a,inherit)) +F(int, pthread_attr_setschedparam, (pthread_attr_t *restrict a, const struct sched_param *restrict param), (a,param)) +F(int, pthread_attr_setschedpolicy, (pthread_attr_t *a, int policy), (a,policy)) +F(int, pthread_attr_setscope, (pthread_attr_t *a, int scope), (a,scope)) +F(int, pthread_attr_setstack, (pthread_attr_t *a, void *addr, size_t size), (a,addr,size)) +F(int, pthread_attr_setstacksize, (pthread_attr_t *a, size_t size), (a,size)) +F(int, pthread_barrier_destroy, (pthread_barrier_t *b), (b)) +F(int, pthread_barrier_init, (pthread_barrier_t *restrict b, const pthread_barrierattr_t *restrict a, unsigned count), (b,a,count)) +F(int, pthread_barrier_wait, (pthread_barrier_t *b), (b)) +F(int, pthread_barrierattr_destroy, (pthread_barrierattr_t *a), (a)) +F(int, pthread_barrierattr_getpshared, (const pthread_barrierattr_t *restrict a, int *restrict pshared), (a,pshared)) +F(int, pthread_barrierattr_init, (pthread_barrierattr_t *a), (a)) +F(int, pthread_barrierattr_setpshared, (pthread_barrierattr_t *a, int pshared), (a,pshared)) +F(int, pthread_cancel, (pthread_t t), (t)) +F(int, pthread_cond_broadcast, (pthread_cond_t *c), (c)) +F(int, pthread_cond_destroy, (pthread_cond_t *c), (c)) +F(int, pthread_cond_init, (pthread_cond_t *restrict c, const pthread_condattr_t *restrict a), (c,a)) +F(int, pthread_cond_signal, (pthread_cond_t *c), (c)) +F(int, pthread_cond_timedwait, (pthread_cond_t *restrict c, pthread_mutex_t *restrict m, const struct timespec *restrict ts), (c,m,ts)) +F(int, pthread_cond_wait, (pthread_cond_t *restrict c, pthread_mutex_t *restrict m), (c,m)) +F(int, pthread_condattr_destroy, (pthread_condattr_t *a), (a)) +F(int, pthread_condattr_getclock, (const pthread_condattr_t *restrict a, clockid_t *restrict clk), (a,clk)) +F(int, pthread_condattr_getpshared, (const pthread_condattr_t *restrict a, int *restrict pshared), (a,pshared)) +F(int, pthread_condattr_init, (pthread_condattr_t *a), (a)) +F(int, pthread_condattr_setclock, (pthread_condattr_t *a, clockid_t clk), (a,clk)) +F(int, pthread_condattr_setpshared, (pthread_condattr_t *a, int pshared), (a,pshared)) +F(int, pthread_create, (pthread_t *restrict res, const pthread_attr_t *restrict attrp, void *(*entry)(void *), void *restrict arg), (res,attrp,entry,arg)) +F(int, pthread_detach, (pthread_t t), (t)) +F(int, pthread_equal, (pthread_t a, pthread_t b), (a,b)) +V(_Noreturn void, pthread_exit, (void *result), (result)) +F(int, pthread_getaffinity_np, (pthread_t td, size_t size, cpu_set_t *set), (td,size,set)) +F(int, pthread_getattr_np, (pthread_t t, pthread_attr_t *a), (t,a)) +F(int, pthread_getconcurrency, (), ()) +F(int, pthread_getcpuclockid, (pthread_t t, clockid_t *clockid), (t,clockid)) +F(int, pthread_getschedparam, (pthread_t t, int *restrict policy, struct sched_param *restrict param), (t,policy,param)) +F(void *, pthread_getspecific, (pthread_key_t k), (k)) +F(int, pthread_join, (pthread_t t, void **res), (t,res)) +F(int, pthread_key_create, (pthread_key_t *k, void (*dtor)(void *)), (k,dtor)) +F(int, pthread_key_delete, (pthread_key_t k), (k)) +F(int, pthread_kill, (pthread_t t, int sig), (t,sig)) +F(int, pthread_mutex_consistent, (pthread_mutex_t *m), (m)) +F(int, pthread_mutex_destroy, (pthread_mutex_t *mutex), (mutex)) +F(int, pthread_mutex_getprioceiling, (const pthread_mutex_t *restrict m, int *restrict ceiling), (m,ceiling)) +F(int, pthread_mutex_init, (pthread_mutex_t *restrict m, const pthread_mutexattr_t *restrict a), (m,a)) +F(int, pthread_mutex_lock, (pthread_mutex_t *m), (m)) +F(int, pthread_mutex_setprioceiling, (pthread_mutex_t *restrict m, int ceiling, int *restrict old), (m,ceiling,old)) +F(int, pthread_mutex_timedlock, (pthread_mutex_t *restrict m, const struct timespec *restrict at), (m,at)) +F(int, pthread_mutex_trylock, (pthread_mutex_t *m), (m)) +F(int, pthread_mutex_unlock, (pthread_mutex_t *m), (m)) +F(int, pthread_mutexattr_destroy, (pthread_mutexattr_t *a), (a)) +F(int, pthread_mutexattr_getprotocol, (const pthread_mutexattr_t *restrict a, int *restrict protocol), (a,protocol)) +F(int, pthread_mutexattr_getpshared, (const pthread_mutexattr_t *restrict a, int *restrict pshared), (a,pshared)) +F(int, pthread_mutexattr_getrobust, (const pthread_mutexattr_t *restrict a, int *restrict robust), (a,robust)) +F(int, pthread_mutexattr_gettype, (const pthread_mutexattr_t *restrict a, int *restrict type), (a,type)) +F(int, pthread_mutexattr_init, (pthread_mutexattr_t *a), (a)) +F(int, pthread_mutexattr_setprotocol, (pthread_mutexattr_t *a, int protocol), (a,protocol)) +F(int, pthread_mutexattr_setpshared, (pthread_mutexattr_t *a, int pshared), (a,pshared)) +F(int, pthread_mutexattr_setrobust, (pthread_mutexattr_t *a, int robust), (a,robust)) +F(int, pthread_mutexattr_settype, (pthread_mutexattr_t *a, int type), (a,type)) +F(int, pthread_once, (pthread_once_t *control, void (*init)(void)), (control,init)) +F(int, pthread_rwlock_destroy, (pthread_rwlock_t *rw), (rw)) +F(int, pthread_rwlock_init, (pthread_rwlock_t *restrict rw, const pthread_rwlockattr_t *restrict a), (rw,a)) +F(int, pthread_rwlock_rdlock, (pthread_rwlock_t *rw), (rw)) +F(int, pthread_rwlock_timedrdlock, (pthread_rwlock_t *restrict rw, const struct timespec *restrict at), (rw,at)) +F(int, pthread_rwlock_timedwrlock, (pthread_rwlock_t *restrict rw, const struct timespec *restrict at), (rw,at)) +F(int, pthread_rwlock_tryrdlock, (pthread_rwlock_t *rw), (rw)) +F(int, pthread_rwlock_trywrlock, (pthread_rwlock_t *rw), (rw)) +F(int, pthread_rwlock_unlock, (pthread_rwlock_t *rw), (rw)) +F(int, pthread_rwlock_wrlock, (pthread_rwlock_t *rw), (rw)) +F(int, pthread_rwlockattr_destroy, (pthread_rwlockattr_t *a), (a)) +F(int, pthread_rwlockattr_getpshared, (const pthread_rwlockattr_t *restrict a, int *restrict pshared), (a,pshared)) +F(int, pthread_rwlockattr_init, (pthread_rwlockattr_t *a), (a)) +F(int, pthread_rwlockattr_setpshared, (pthread_rwlockattr_t *a, int pshared), (a,pshared)) +F(int, pthread_setaffinity_np, (pthread_t td, size_t size, const cpu_set_t *set), (td,size,set)) +F(int, pthread_setcancelstate, (int new, int *old), (new,old)) +F(int, pthread_setcanceltype, (int new, int *old), (new,old)) +F(int, pthread_setconcurrency, (int val), (val)) +F(int, pthread_setschedparam, (pthread_t t, int policy, const struct sched_param *param), (t,policy,param)) +F(int, pthread_setschedprio, (pthread_t t, int prio), (t,prio)) +F(int, pthread_setspecific, (pthread_key_t k, const void *x), (k,x)) +F(int, pthread_sigmask, (int how, const sigset_t *restrict set, sigset_t *restrict old), (how,set,old)) +F(int, pthread_spin_destroy, (pthread_spinlock_t *s), (s)) +F(int, pthread_spin_init, (pthread_spinlock_t *s, int shared), (s,shared)) +F(int, pthread_spin_lock, (pthread_spinlock_t *s), (s)) +F(int, pthread_spin_trylock, (pthread_spinlock_t *s), (s)) +F(int, pthread_spin_unlock, (pthread_spinlock_t *s), (s)) +V(void, pthread_testcancel, (), ()) +XF(long, ptrace, (int req, ...)) +F(char *, ptsname, (int fd), (fd)) +F(int, putc, (int c, FILE *f), (c,f)) +F(int, putc_unlocked, (int c, FILE *f), (c,f)) +F(int, putchar, (int c), (c)) +F(int, putchar_unlocked, (int c), (c)) +F(int, putenv, (char *s), (s)) +F(int, putgrent, (const struct group *gr, FILE *f), (gr,f)) +F(int, putpwent, (const struct passwd *pw, FILE *f), (pw,f)) +F(int, puts, (const char *s), (s)) +F(int, putspent, (const struct spwd *sp, FILE *f), (sp,f)) +F(struct utmpx *, pututxline, (const struct utmpx *ut), (ut)) +F(int, putw, (int x, FILE *f), (x,f)) +F(wint_t, putwc, (wchar_t c, FILE *f), (c,f)) +F(wint_t, putwchar, (wchar_t c), (c)) +F(ssize_t, pwrite, (int fd, const void *buf, size_t size, off_t ofs), (fd,buf,size,ofs)) +F(ssize_t, pwritev, (int fd, const struct iovec *iov, int count, off_t ofs), (fd,iov,count,ofs)) +V(void, qsort, (void *base, size_t nel, size_t width, int (*cmp)(const void*, const void*)), (base,nel,width,cmp)) +V(_Noreturn void, quick_exit, (int code), (code)) +F(int, quotactl, (int cmd, const char *special, int id, char *addr), (cmd,special,id,addr)) +F(int, raise, (int sig), (sig)) +F(int, rand, (void), ()) +F(int, rand_r, (unsigned *seed), (seed)) +F(long, random, (void), ()) +F(ssize_t, read, (int fd, void *buf, size_t count), (fd,buf,count)) +F(ssize_t, readahead, (int fd, off_t pos, size_t len), (fd,pos,len)) +F(struct dirent *, readdir, (DIR *dir), (dir)) +F(int, readdir_r, (DIR *restrict dir, struct dirent *restrict buf, struct dirent **restrict result), (dir,buf,result)) +F(ssize_t, readlink, (const char *restrict path, char *restrict buf, size_t bufsize), (path,buf,bufsize)) +F(ssize_t, readlinkat, (int fd, const char *restrict path, char *restrict buf, size_t bufsize), (fd,path,buf,bufsize)) +F(ssize_t, readv, (int fd, const struct iovec *iov, int count), (fd,iov,count)) +F(void *, realloc, (void *p, size_t n), (p,n)) +F(char *, realpath, (const char *restrict filename, char *restrict resolved), (filename,resolved)) +F(int, reboot, (int type), (type)) +F(ssize_t, recv, (int fd, void *buf, size_t len, int flags), (fd,buf,len,flags)) +F(ssize_t, recvfrom, (int fd, void *restrict buf, size_t len, int flags, struct sockaddr *restrict addr, socklen_t *restrict alen), (fd,buf,len,flags,addr,alen)) +F(ssize_t, recvmsg, (int fd, struct msghdr *msg, int flags), (fd,msg,flags)) +F(int, regcomp, (regex_t *restrict preg, const char *restrict regex, int cflags), (preg,regex,cflags)) +F(size_t, regerror, (int e, const regex_t *restrict preg, char *restrict buf, size_t size), (e,preg,buf,size)) +F(int, regexec, (const regex_t *restrict preg, const char *restrict string, size_t nmatch, regmatch_t pmatch[restrict], int eflags), (preg,string,nmatch,pmatch,eflags)) +V(void, regfree, (regex_t *preg), (preg)) +F(double, remainder, (double x, double y), (x,y)) +F(float, remainderf, (float x, float y), (x,y)) +F(long double, remainderl, (long double x, long double y), (x,y)) +F(int, remap_file_pages, (void *addr, size_t size, int prot, ssize_t pgoff, int flags), (addr,size,prot,pgoff,flags)) +F(int, remove, (const char *path), (path)) +F(int, removexattr, (const char *path, const char *name), (path,name)) +V(void, remque, (void *element), (element)) +F(double, remquo, (double x, double y, int *quo), (x,y,quo)) +F(float, remquof, (float x, float y, int *quo), (x,y,quo)) +F(long double, remquol, (long double x, long double y, int *quo), (x,y,quo)) +F(int, rename, (const char *old, const char *new), (old,new)) +F(int, renameat, (int oldfd, const char *old, int newfd, const char *new), (oldfd,old,newfd,new)) +F(int, res_init, (), ()) +F(int, res_query, (const char *name, int class, int type, unsigned char *dest, int len), (name,class,type,dest,len)) +V(void, rewind, (FILE *f), (f)) +V(void, rewinddir, (DIR *dir), (dir)) +F(char *, rindex, (const char *s, int c), (s,c)) +F(double, rint, (double x), (x)) +F(float, rintf, (float x), (x)) +F(long double, rintl, (long double x), (x)) +F(int, rmdir, (const char *path), (path)) +F(double, round, (double x), (x)) +F(float, roundf, (float x), (x)) +F(long double, roundl, (long double x), (x)) +F(void *, sbrk, (intptr_t inc), (inc)) +F(double, scalb, (double x, double fn), (x,fn)) +F(float, scalbf, (float x, float fn), (x,fn)) +F(double, scalbln, (double x, long n), (x,n)) +F(float, scalblnf, (float x, long n), (x,n)) +F(long double, scalblnl, (long double x, long n), (x,n)) +F(double, scalbn, (double x, int n), (x,n)) +F(float, scalbnf, (float x, int n), (x,n)) +F(long double, scalbnl, (long double x, int n), (x,n)) +F(int, scandir, (const char *path, struct dirent ***res, int (*sel)(const struct dirent *), int (*cmp)(const struct dirent **, const struct dirent **)), (path,res,sel,cmp)) +XF(int, scanf, (const char *restrict fmt, ...)) +F(int, sched_get_priority_max, (int policy), (policy)) +F(int, sched_get_priority_min, (int policy), (policy)) +F(int, sched_getaffinity, (pid_t tid, size_t size, cpu_set_t *set), (tid,size,set)) +F(int, sched_getparam, (pid_t pid, struct sched_param *param), (pid,param)) +F(int, sched_getscheduler, (pid_t pid), (pid)) +F(int, sched_rr_get_interval, (pid_t pid, struct timespec *ts), (pid,ts)) +F(int, sched_setaffinity, (pid_t tid, size_t size, const cpu_set_t *set), (tid,size,set)) +F(int, sched_setparam, (pid_t pid, const struct sched_param *param), (pid,param)) +F(int, sched_setscheduler, (pid_t pid, int sched, const struct sched_param *param), (pid,sched,param)) +F(unsigned short *, seed48, (unsigned short *s), (s)) +V(void, seekdir, (DIR *dir, long off), (dir,off)) +F(int, select, (int n, fd_set *restrict rfds, fd_set *restrict wfds, fd_set *restrict efds, struct timeval *restrict tv), (n,rfds,wfds,efds,tv)) +F(int, sem_close, (sem_t *sem), (sem)) +F(int, sem_destroy, (sem_t *sem), (sem)) +F(int, sem_getvalue, (sem_t *restrict sem, int *restrict valp), (sem,valp)) +F(int, sem_init, (sem_t *sem, int pshared, unsigned value), (sem,pshared,value)) +XF(sem_t *, sem_open, (const char *name, int flags, ...)) +F(int, sem_post, (sem_t *sem), (sem)) +F(int, sem_timedwait, (sem_t *restrict sem, const struct timespec *restrict at), (sem,at)) +F(int, sem_trywait, (sem_t *sem), (sem)) +F(int, sem_unlink, (const char *name), (name)) +F(int, sem_wait, (sem_t *sem), (sem)) +XF(int, semctl, (int id, int num, int cmd, ...)) +F(int, semget, (key_t key, int n, int fl), (key,n,fl)) +F(int, semop, (int id, struct sembuf *buf, size_t n), (id,buf,n)) +F(int, semtimedop, (int id, struct sembuf *buf, size_t n, const struct timespec *ts), (id,buf,n,ts)) +F(ssize_t, send, (int fd, const void *buf, size_t len, int flags), (fd,buf,len,flags)) +F(ssize_t, sendfile, (int out_fd, int in_fd, off_t *ofs, size_t count), (out_fd,in_fd,ofs,count)) +F(ssize_t, sendmsg, (int fd, const struct msghdr *msg, int flags), (fd,msg,flags)) +F(ssize_t, sendto, (int fd, const void *buf, size_t len, int flags, const struct sockaddr *addr, socklen_t alen), (fd,buf,len,flags,addr,alen)) +V(void, setbuf, (FILE *restrict f, char *restrict buf), (f,buf)) +V(void, setbuffer, (FILE *f, char *buf, size_t size), (f,buf,size)) +F(int, setdomainname, (const char *name, size_t len), (name,len)) +F(int, setegid, (gid_t egid), (egid)) +F(int, setenv, (const char *var, const char *value, int overwrite), (var,value,overwrite)) +F(int, seteuid, (uid_t euid), (euid)) +F(int, setfsgid, (gid_t gid), (gid)) +F(int, setfsuid, (uid_t uid), (uid)) +F(int, setgid, (gid_t gid), (gid)) +V(void, setgrent, (), ()) +F(int, setgroups, (size_t count, const gid_t list[]), (count,list)) +V(void, sethostent, (int x), (x)) +F(int, sethostname, (const char *name, size_t len), (name,len)) +F(int, setitimer, (int which, const struct itimerval *restrict new, struct itimerval *restrict old), (which,new,old)) +V(void, setlinebuf, (FILE *f), (f)) +F(char *, setlocale, (int category, const char *locale), (category,locale)) +F(int, setlogmask, (int maskpri), (maskpri)) +F(FILE *, setmntent, (const char *name, const char *mode), (name,mode)) +F(int, setns, (int fd, int nstype), (fd,nstype)) +F(int, setpgid, (pid_t pid, pid_t pgid), (pid,pgid)) +F(pid_t, setpgrp, (void), ()) +F(int, setpriority, (int which, id_t who, int prio), (which,who,prio)) +V(void, setprotoent, (int stayopen), (stayopen)) +V(void, setpwent, (), ()) +F(int, setregid, (gid_t rgid, gid_t egid), (rgid,egid)) +F(int, setresgid, (gid_t rgid, gid_t egid, gid_t sgid), (rgid,egid,sgid)) +F(int, setresuid, (uid_t ruid, uid_t euid, uid_t suid), (ruid,euid,suid)) +F(int, setreuid, (uid_t ruid, uid_t euid), (ruid,euid)) +F(int, setrlimit, (int resource, const struct rlimit *rlim), (resource,rlim)) +V(void, setservent, (int stayopen), (stayopen)) +F(pid_t, setsid, (void), ()) +F(int, setsockopt, (int fd, int level, int optname, const void *optval, socklen_t optlen), (fd,level,optname,optval,optlen)) +V(void, setspent, (), ()) +F(char *, setstate, (char *state), (state)) +F(int, settimeofday, (const struct timeval *tv, const struct timezone *tz), (tv,tz)) +F(int, setuid, (uid_t uid), (uid)) +V(void, setusershell, (void), ()) +V(void, setutxent, (void), ()) +F(int, setvbuf, (FILE *restrict f, char *restrict buf, int type, size_t size), (f,buf,type,size)) +F(int, setxattr, (const char *path, const char *name, const void *value, size_t size, int flags), (path,name,value,size,flags)) +F(int, shm_open, (const char *name, int flag, mode_t mode), (name,flag,mode)) +F(int, shm_unlink, (const char *name), (name)) +F(void *, shmat, (int id, const void *addr, int flag), (id,addr,flag)) +F(int, shmctl, (int id, int cmd, struct shmid_ds *buf), (id,cmd,buf)) +F(int, shmdt, (const void *addr), (addr)) +F(int, shmget, (key_t key, size_t size, int flag), (key,size,flag)) +F(int, shutdown, (int fd, int how), (fd,how)) +F(int, sigaddset, (sigset_t *set, int sig), (set,sig)) +F(int, sigaltstack, (const stack_t *restrict ss, stack_t *restrict old), (ss,old)) +F(int, sigandset, (sigset_t *dest, sigset_t *left, sigset_t *right), (dest,left,right)) +F(int, sigdelset, (sigset_t *set, int sig), (set,sig)) +F(int, sigemptyset, (sigset_t *set), (set)) +F(int, sigfillset, (sigset_t *set), (set)) +F(int, sighold, (int sig), (sig)) +F(int, sigignore, (int sig), (sig)) +F(int, siginterrupt, (int sig, int flag), (sig,flag)) +F(int, sigisemptyset, (const sigset_t *set), (set)) +F(int, sigismember, (const sigset_t *set, int sig), (set,sig)) +V(_Noreturn void, siglongjmp, (sigjmp_buf buf, int ret), (buf,ret)) +F(signal_handler, signal, (int sig, void (*func)(int)), (sig,func)) +F(int, signalfd, (int fd, const sigset_t *sigs, int flags), (fd,sigs,flags)) +F(double, significand, (double x), (x)) +F(float, significandf, (float x), (x)) +F(int, sigorset, (sigset_t *dest, sigset_t *left, sigset_t *right), (dest,left,right)) +F(int, sigpause, (int sig), (sig)) +F(int, sigpending, (sigset_t *set), (set)) +F(int, sigprocmask, (int how, const sigset_t *restrict set, sigset_t *restrict old), (how,set,old)) +F(int, sigqueue, (pid_t pid, int sig, const union sigval value), (pid,sig,value)) +F(int, sigrelse, (int sig), (sig)) +F(signal_handler, sigset, (int sig, void (*handler)(int)), (sig,handler)) +F(int, sigsetjmp, (sigjmp_buf buf, int save), (buf,save)) +F(int, sigsuspend, (const sigset_t *mask), (mask)) +F(int, sigtimedwait, (const sigset_t *restrict mask, siginfo_t *restrict si, const struct timespec *restrict timeout), (mask,si,timeout)) +F(int, sigwait, (const sigset_t *restrict mask, int *restrict sig), (mask,sig)) +F(int, sigwaitinfo, (const sigset_t *restrict mask, siginfo_t *restrict si), (mask,si)) +F(double, sin, (double x), (x)) +V(void, sincos, (double x, double *sin, double *cos), (x,sin,cos)) +V(void, sincosf, (float x, float *sin, float *cos), (x,sin,cos)) +V(void, sincosl, (long double x, long double *sin, long double *cos), (x,sin,cos)) +F(float, sinf, (float x), (x)) +F(double, sinh, (double x), (x)) +F(float, sinhf, (float x), (x)) +F(long double, sinhl, (long double x), (x)) +F(long double, sinl, (long double x), (x)) +F(unsigned, sleep, (unsigned seconds), (seconds)) +XF(int, snprintf, (char *restrict s, size_t n, const char *restrict fmt, ...)) +F(int, sockatmark, (int s), (s)) +F(int, socket, (int domain, int type, int protocol), (domain,type,protocol)) +F(int, socketpair, (int domain, int type, int protocol, int fd[2]), (domain,type,protocol,fd)) +F(ssize_t, splice, (int fd_in, off_t *off_in, int fd_out, off_t *off_out, size_t len, unsigned flags), (fd_in,off_in,fd_out,off_out,len,flags)) +XF(int, sprintf, (char *restrict s, const char *restrict fmt, ...)) +F(double, sqrt, (double x), (x)) +F(float, sqrtf, (float x), (x)) +F(long double, sqrtl, (long double x), (x)) +V(void, srand, (unsigned s), (s)) +V(void, srand48, (long seed), (seed)) +V(void, srandom, (unsigned seed), (seed)) +XF(int, sscanf, (const char *restrict s, const char *restrict fmt, ...)) +F(int, stat, (const char *restrict path, struct stat *restrict buf), (path,buf)) +F(int, statvfs, (const char *restrict path, struct statvfs *restrict buf), (path,buf)) +F(int, stime, (time_t *t), (t)) +F(int, strcasecmp, (const char *_l, const char *_r), (_l,_r)) +F(int, strcasecmp_l, (const char *l, const char *r, locale_t loc), (l,r,loc)) +F(char *, strcasestr, (const char *h, const char *n), (h,n)) +F(char *, strcat, (char *restrict dest, const char *restrict src), (dest,src)) +F(char *, strchr, (const char *s, int c), (s,c)) +F(int, strcmp, (const char *l, const char *r), (l,r)) +F(int, strcoll, (const char *l, const char *r), (l,r)) +F(char *, strcpy, (char *restrict dest, const char *restrict src), (dest,src)) +F(size_t, strcspn, (const char *s, const char *c), (s,c)) +F(char *, strerror, (int e), (e)) +F(char *, strerror_l, (int err, locale_t l), (err,l)) +F(int, strerror_r, (int err, char *buf, size_t buflen), (err,buf,buflen)) +XF(ssize_t, strfmon, (char *restrict s, size_t n, const char *restrict fmt, ...)) +XF(ssize_t, strfmon_l, (char *restrict s, size_t n, locale_t loc, const char *restrict fmt, ...)) +F(size_t, strftime, (char *restrict s, size_t n, const char *restrict f, const struct tm *restrict tm), (s,n,f,tm)) +F(size_t, strlcat, (char *d, const char *s, size_t n), (d,s,n)) +F(size_t, strlcpy, (char *d, const char *s, size_t n), (d,s,n)) +F(size_t, strlen, (const char *s), (s)) +F(int, strncasecmp, (const char *_l, const char *_r, size_t n), (_l,_r,n)) +F(int, strncasecmp_l, (const char *l, const char *r, size_t n, locale_t loc), (l,r,n,loc)) +F(char *, strncat, (char *restrict d, const char *restrict s, size_t n), (d,s,n)) +F(int, strncmp, (const char *_l, const char *_r, size_t n), (_l,_r,n)) +F(char *, strncpy, (char *restrict d, const char *restrict s, size_t n), (d,s,n)) +F(char *, strndup, (const char *s, size_t n), (s,n)) +F(size_t, strnlen, (const char *s, size_t n), (s,n)) +F(char *, strpbrk, (const char *s, const char *b), (s,b)) +F(char *, strptime, (const char *restrict s, const char *restrict f, struct tm *restrict tm), (s,f,tm)) +F(char *, strrchr, (const char *s, int c), (s,c)) +F(char *, strsep, (char **str, const char *sep), (str,sep)) +F(char *, strsignal, (int signum), (signum)) +F(size_t, strspn, (const char *s, const char *c), (s,c)) +F(char *, strstr, (const char *h, const char *n), (h,n)) +F(double, strtod, (const char *restrict s, char **restrict p), (s,p)) +F(float, strtof, (const char *restrict s, char **restrict p), (s,p)) +F(intmax_t, strtoimax, (const char *restrict s, char **restrict p, int base), (s,p,base)) +F(char *, strtok, (char *restrict s, const char *restrict sep), (s,sep)) +F(char *, strtok_r, (char *restrict s, const char *restrict sep, char **restrict p), (s,sep,p)) +F(long, strtol, (const char *restrict s, char **restrict p, int base), (s,p,base)) +F(long double, strtold, (const char *restrict s, char **restrict p), (s,p)) +F(long long, strtoll, (const char *restrict s, char **restrict p, int base), (s,p,base)) +F(unsigned long, strtoul, (const char *restrict s, char **restrict p, int base), (s,p,base)) +F(unsigned long long, strtoull, (const char *restrict s, char **restrict p, int base), (s,p,base)) +F(uintmax_t, strtoumax, (const char *restrict s, char **restrict p, int base), (s,p,base)) +F(int, strverscmp, (const char *l, const char *r), (l,r)) +F(size_t, strxfrm, (char *restrict dest, const char *restrict src, size_t n), (dest,src,n)) +V(void, swab, (const void *restrict _src, void *restrict _dest, ssize_t n), (_src,_dest,n)) +F(int, swapoff, (const char *path), (path)) +F(int, swapon, (const char *path, int flags), (path,flags)) +XF(int, swprintf, (wchar_t *restrict s, size_t n, const wchar_t *restrict fmt, ...)) +XF(int, swscanf, (const wchar_t *restrict s, const wchar_t *restrict fmt, ...)) +F(int, symlink, (const char *existing, const char *new), (existing,new)) +F(int, symlinkat, (const char *existing, int fd, const char *new), (existing,fd,new)) +V(void, sync, (void), ()) +F(int, sync_file_range, (int fd, off_t pos, off_t len, unsigned flags), (fd,pos,len,flags)) +V(void, syncfs, (int fd), (fd)) +XF(long, syscall, (long n, ...)) +F(long, sysconf, (int name), (name)) +F(int, sysinfo, (struct sysinfo *info), (info)) +XV(void, syslog, (int priority, const char *message, ...)) +F(int, system, (const char *cmd), (cmd)) +F(double, tan, (double x), (x)) +F(float, tanf, (float x), (x)) +F(double, tanh, (double x), (x)) +F(float, tanhf, (float x), (x)) +F(long double, tanhl, (long double x), (x)) +F(long double, tanl, (long double x), (x)) +F(int, tcdrain, (int fd), (fd)) +F(int, tcflow, (int fd, int action), (fd,action)) +F(int, tcflush, (int fd, int queue), (fd,queue)) +F(int, tcgetattr, (int fd, struct termios *tio), (fd,tio)) +F(pid_t, tcgetpgrp, (int fd), (fd)) +F(pid_t, tcgetsid, (int fd), (fd)) +F(int, tcsendbreak, (int fd, int dur), (fd,dur)) +F(int, tcsetattr, (int fd, int act, const struct termios *tio), (fd,act,tio)) +F(int, tcsetpgrp, (int fd, pid_t pgrp), (fd,pgrp)) +F(void *, tdelete, (const void *restrict key, void **restrict rootp, int(*compar)(const void *, const void *)), (key,rootp,compar)) +V(void, tdestroy, (void *root, void (*freekey)(void *)), (root,freekey)) +F(ssize_t, tee, (int src, int dest, size_t len, unsigned flags), (src,dest,len,flags)) +F(long, telldir, (DIR *dir), (dir)) +F(char *, tempnam, (const char *dir, const char *pfx), (dir,pfx)) +F(char *, textdomain, (const char *domainname), (domainname)) +F(void *, tfind, (const void *key, void *const *rootp, int(*compar)(const void *, const void *)), (key,rootp,compar)) +F(double, tgamma, (double x), (x)) +F(float, tgammaf, (float x), (x)) +F(long double, tgammal, (long double x), (x)) +F(time_t, time, (time_t *t), (t)) +F(time_t, timegm, (struct tm *tm), (tm)) +F(int, timer_create, (clockid_t clk, struct sigevent *restrict evp, timer_t *restrict res), (clk,evp,res)) +F(int, timer_delete, (timer_t t), (t)) +F(int, timer_getoverrun, (timer_t t), (t)) +F(int, timer_gettime, (timer_t t, struct itimerspec *val), (t,val)) +F(int, timer_settime, (timer_t t, int flags, const struct itimerspec *restrict val, struct itimerspec *restrict old), (t,flags,val,old)) +F(int, timerfd_create, (int clockid, int flags), (clockid,flags)) +F(int, timerfd_gettime, (int fd, struct itimerspec *cur), (fd,cur)) +F(int, timerfd_settime, (int fd, int flags, const struct itimerspec *new, struct itimerspec *old), (fd,flags,new,old)) +F(clock_t, times, (struct tms *tms), (tms)) +F(FILE *, tmpfile, (void), ()) +F(char *, tmpnam, (char *s), (s)) +F(int, toascii, (int c), (c)) +F(int, tolower, (int c), (c)) +F(int, tolower_l, (int c, locale_t l), (c,l)) +F(int, toupper, (int c), (c)) +F(int, toupper_l, (int c, locale_t l), (c,l)) +F(wint_t, towctrans, (wint_t wc, wctrans_t trans), (wc,trans)) +F(wint_t, towctrans_l, (wint_t c, wctrans_t t, locale_t l), (c,t,l)) +F(wint_t, towlower, (wint_t wc), (wc)) +F(wint_t, towlower_l, (wint_t c, locale_t l), (c,l)) +F(wint_t, towupper, (wint_t wc), (wc)) +F(wint_t, towupper_l, (wint_t c, locale_t l), (c,l)) +//F(void *, __tre_mem_alloc_impl, (tre_mem_t mem, int provided, void *provided_block, int zero, size_t size), (mem,provided,provided_block,zero,size)) +//V(void, __tre_mem_destroy, (tre_mem_t mem), (mem)) +//F(tre_mem_t, __tre_mem_new_impl, (int provided, void *provided_block), (provided,provided_block)) +F(double, trunc, (double x), (x)) +F(int, truncate, (const char *path, off_t length), (path,length)) +F(float, truncf, (float x), (x)) +F(long double, truncl, (long double x), (x)) +F(void *, tsearch, (const void *key, void **rootp, int (*compar)(const void *, const void *)), (key,rootp,compar)) +F(char *, ttyname, (int fd), (fd)) +F(int, ttyname_r, (int fd, char *name, size_t size), (fd,name,size)) +V(void, twalk, (const void *root, void (*action)(const void *, VISIT, int)), (root,action)) +F(unsigned, ualarm, (unsigned value, unsigned interval), (value,interval)) +F(int, ulckpwdf, (), ()) +XF(long, ulimit, (int cmd, ...)) +F(mode_t, umask, (mode_t mode), (mode)) +F(int, umount, (const char *special), (special)) +F(int, umount2, (const char *special, int flags), (special,flags)) +F(int, uname, (struct utsname *uts), (uts)) +F(int, ungetc, (int c, FILE *f), (c,f)) +F(wint_t, ungetwc, (wint_t c, FILE *f), (c,f)) +F(int, unlink, (const char *path), (path)) +F(int, unlinkat, (int fd, const char *path, int flag), (fd,path,flag)) +F(int, unlockpt, (int fd), (fd)) +F(int, unsetenv, (const char *name), (name)) +F(int, unshare, (int flags), (flags)) +V(void, updwtmpx, (const char *f, const struct utmpx *u), (f,u)) +F(locale_t, uselocale, (locale_t l), (l)) +F(int, usleep, (unsigned useconds), (useconds)) +F(int, utime, (const char *path, const struct utimbuf *times), (path,times)) +F(int, utimensat, (int fd, const char *path, const struct timespec times[2], int flags), (fd,path,times,flags)) +F(int, utimes, (const char *path, const struct timeval times[2]), (path,times)) +F(void *, valloc, (size_t size), (size)) +F(int, vasprintf, (char **s, const char *fmt, va_list ap), (s,fmt,ap)) +F(int, vdprintf, (int fd, const char *restrict fmt, va_list ap), (fd,fmt,ap)) +V(_Noreturn void, verr, (int status, const char *fmt, va_list ap), (status,fmt,ap)) +V(_Noreturn void, verrx, (int status, const char *fmt, va_list ap), (status,fmt,ap)) +F(int, versionsort, (const struct dirent **a, const struct dirent **b), (a,b)) +F(int, vfprintf, (FILE *restrict f, const char *restrict fmt, va_list ap), (f,fmt,ap)) +F(int, vfscanf, (FILE *restrict f, const char *restrict fmt, va_list ap), (f,fmt,ap)) +F(int, vfwprintf, (FILE *restrict f, const wchar_t *restrict fmt, va_list ap), (f,fmt,ap)) +F(int, vfwscanf, (FILE *restrict f, const wchar_t *restrict fmt, va_list ap), (f,fmt,ap)) +F(int, vhangup, (void), ()) +F(ssize_t, vmsplice, (int fd, const struct iovec *iov, size_t cnt, unsigned flags), (fd,iov,cnt,flags)) +F(int, vprintf, (const char *restrict fmt, va_list ap), (fmt,ap)) +F(int, vscanf, (const char *restrict fmt, va_list ap), (fmt,ap)) +F(int, vsnprintf, (char *restrict s, size_t n, const char *restrict fmt, va_list ap), (s,n,fmt,ap)) +F(int, vsprintf, (char *restrict s, const char *restrict fmt, va_list ap), (s,fmt,ap)) +F(int, vsscanf, (const char *restrict s, const char *restrict fmt, va_list ap), (s,fmt,ap)) +F(int, vswprintf, (wchar_t *restrict s, size_t n, const wchar_t *restrict fmt, va_list ap), (s,n,fmt,ap)) +F(int, vswscanf, (const wchar_t *restrict s, const wchar_t *restrict fmt, va_list ap), (s,fmt,ap)) +V(void, vwarn, (const char *fmt, va_list ap), (fmt,ap)) +V(void, vwarnx, (const char *fmt, va_list ap), (fmt,ap)) +F(int, vwprintf, (const wchar_t *restrict fmt, va_list ap), (fmt,ap)) +F(int, vwscanf, (const wchar_t *restrict fmt, va_list ap), (fmt,ap)) +F(pid_t, wait, (int *status), (status)) +F(pid_t, wait3, (int *status, int options, struct rusage *usage), (status,options,usage)) +F(pid_t, wait4, (pid_t pid, int *status, int options, struct rusage *usage), (pid,status,options,usage)) +F(int, waitid, (idtype_t type, id_t id, siginfo_t *info, int options), (type,id,info,options)) +F(pid_t, waitpid, (pid_t pid, int *status, int options), (pid,status,options)) +XV(void, warn, (const char *fmt, ...)) +XV(void, warnx, (const char *fmt, ...)) +F(wchar_t *, wcpcpy, (wchar_t *restrict d, const wchar_t *restrict s), (d,s)) +F(wchar_t *, wcpncpy, (wchar_t *restrict d, const wchar_t *restrict s, size_t n), (d,s,n)) +F(size_t, wcrtomb, (char *restrict s, wchar_t wc, mbstate_t *restrict st), (s,wc,st)) +F(int, wcscasecmp, (const wchar_t *l, const wchar_t *r), (l,r)) +F(int, wcscasecmp_l, (const wchar_t *l, const wchar_t *r, locale_t locale), (l,r,locale)) +F(wchar_t *, wcscat, (wchar_t *restrict dest, const wchar_t *restrict src), (dest,src)) +F(wchar_t *, wcschr, (const wchar_t *s, wchar_t c), (s,c)) +F(int, wcscmp, (const wchar_t *l, const wchar_t *r), (l,r)) +F(int, wcscoll, (const wchar_t *l, const wchar_t *r), (l,r)) +F(wchar_t *, wcscpy, (wchar_t *restrict d, const wchar_t *restrict s), (d,s)) +F(size_t, wcscspn, (const wchar_t *s, const wchar_t *c), (s,c)) +F(wchar_t *, wcsdup, (const wchar_t *s), (s)) +F(size_t, wcsftime, (wchar_t *restrict wcs, size_t n, const wchar_t *restrict f, const struct tm *restrict tm), (wcs,n,f,tm)) +F(size_t, wcslen, (const wchar_t *s), (s)) +F(int, wcsncasecmp, (const wchar_t *l, const wchar_t *r, size_t n), (l,r,n)) +F(int, wcsncasecmp_l, (const wchar_t *l, const wchar_t *r, size_t n, locale_t locale), (l,r,n,locale)) +F(wchar_t *, wcsncat, (wchar_t *restrict d, const wchar_t *restrict s, size_t n), (d,s,n)) +F(int, wcsncmp, (const wchar_t *l, const wchar_t *r, size_t n), (l,r,n)) +F(wchar_t *, wcsncpy, (wchar_t *restrict d, const wchar_t *restrict s, size_t n), (d,s,n)) +F(size_t, wcsnlen, (const wchar_t *s, size_t n), (s,n)) +F(size_t, wcsnrtombs, (char *restrict dst, const wchar_t **restrict wcs, size_t wn, size_t n, mbstate_t *restrict st), (dst,wcs,wn,n,st)) +F(wchar_t *, wcspbrk, (const wchar_t *s, const wchar_t *b), (s,b)) +F(wchar_t *, wcsrchr, (const wchar_t *s, wchar_t c), (s,c)) +F(size_t, wcsrtombs, (char *restrict s, const wchar_t **restrict ws, size_t n, mbstate_t *restrict st), (s,ws,n,st)) +F(size_t, wcsspn, (const wchar_t *s, const wchar_t *c), (s,c)) +F(wchar_t *, wcsstr, (const wchar_t *restrict h, const wchar_t *restrict n), (h,n)) +F(double, wcstod, (const wchar_t *restrict s, wchar_t **restrict p), (s,p)) +F(float, wcstof, (const wchar_t *restrict s, wchar_t **restrict p), (s,p)) +F(intmax_t, wcstoimax, (const wchar_t *restrict s, wchar_t **restrict p, int base), (s,p,base)) +F(wchar_t *, wcstok, (wchar_t *restrict s, const wchar_t *restrict sep, wchar_t **restrict p), (s,sep,p)) +F(long, wcstol, (const wchar_t *restrict s, wchar_t **restrict p, int base), (s,p,base)) +F(long double, wcstold, (const wchar_t *restrict s, wchar_t **restrict p), (s,p)) +F(long long, wcstoll, (const wchar_t *restrict s, wchar_t **restrict p, int base), (s,p,base)) +F(size_t, wcstombs, (char *restrict s, const wchar_t *restrict ws, size_t n), (s,ws,n)) +F(unsigned long, wcstoul, (const wchar_t *restrict s, wchar_t **restrict p, int base), (s,p,base)) +F(unsigned long long, wcstoull, (const wchar_t *restrict s, wchar_t **restrict p, int base), (s,p,base)) +F(uintmax_t, wcstoumax, (const wchar_t *restrict s, wchar_t **restrict p, int base), (s,p,base)) +F(wchar_t *, wcswcs, (const wchar_t *haystack, const wchar_t *needle), (haystack,needle)) +F(int, wcswidth, (const wchar_t *wcs, size_t n), (wcs,n)) +F(size_t, wcsxfrm, (wchar_t *restrict dest, const wchar_t *restrict src, size_t n), (dest,src,n)) +F(int, wctob, (wint_t c), (c)) +F(int, wctomb, (char *s, wchar_t wc), (s,wc)) +F(wctrans_t, wctrans, (const char *class), (class)) +F(wctrans_t, wctrans_l, (const char *s, locale_t l), (s,l)) +F(wctype_t, wctype, (const char *s), (s)) +F(wctype_t, wctype_l, (const char *s, locale_t l), (s,l)) +F(int, wcwidth, (wchar_t wc), (wc)) +F(wchar_t *, wmemchr, (const wchar_t *s, wchar_t c, size_t n), (s,c,n)) +F(int, wmemcmp, (const wchar_t *l, const wchar_t *r, size_t n), (l,r,n)) +F(wchar_t *, wmemcpy, (wchar_t *restrict d, const wchar_t *restrict s, size_t n), (d,s,n)) +F(wchar_t *, wmemmove, (wchar_t *d, const wchar_t *s, size_t n), (d,s,n)) +F(wchar_t *, wmemset, (wchar_t *d, wchar_t c, size_t n), (d,c,n)) +F(int, wordexp, (const char *restrict s, wordexp_t *restrict we, int flags), (s,we,flags)) +V(void, wordfree, (wordexp_t *we), (we)) +XF(int, wprintf, (const wchar_t *restrict fmt, ...)) +F(ssize_t, write, (int fd, const void *buf, size_t count), (fd,buf,count)) +F(ssize_t, writev, (int fd, const struct iovec *iov, int count), (fd,iov,count)) +XF(int, wscanf, (const wchar_t *restrict fmt, ...)) +F(double, y0, (double x), (x)) +F(float, y0f, (float x), (x)) +F(double, y1, (double x), (x)) +F(float, y1f, (float x), (x)) +F(double, yn, (int n, double x), (n,x)) +F(float, ynf, (int n, float x), (n,x)) diff --git a/head.h b/head.h new file mode 100644 index 0000000..5721905 --- /dev/null +++ b/head.h @@ -0,0 +1,164 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +//#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +//#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include diff --git a/hello.c b/hello.c new file mode 100644 index 0000000..b7804f3 --- /dev/null +++ b/hello.c @@ -0,0 +1,8 @@ +#include +#include +int main() +{ + fopen("/dev/null", "r"); + puts("hello"); +// exit(0); +} diff --git a/stress.c b/stress.c new file mode 100644 index 0000000..435d009 --- /dev/null +++ b/stress.c @@ -0,0 +1,11 @@ +int strcmp(const char *, const char *); + +int main() +{ + int i, j; + char * volatile p = ""; + char * volatile q = ""; + for (i=0; i<10000; i++) + j += strcmp(p,q); + return j; +} diff --git a/wrap.c b/wrap.c new file mode 100644 index 0000000..6149907 --- /dev/null +++ b/wrap.c @@ -0,0 +1,31 @@ +#define _GNU_SOURCE +#define _FILE_OFFSET_BITS 64 + +#include +#include + +#include "head.h" + +// dprintf and dlsym are not wrapped + +#define F(ret,name,args,args2) ret (name)args \ +{ \ + static ret (*p__)args; \ + dprintf(2, #name "\n"); \ + if (!p__) p__ = dlsym(RTLD_NEXT, #name); \ + return p__ args2; \ +} + +#define V(v,name,args,args2) v (name)args \ +{ \ + static v (*p__)args; \ + dprintf(2, #name "\n"); \ + if (!p__) p__ = dlsym(RTLD_NEXT, #name); \ + p__ args2; \ +} + +// vararg functions are not wrapped +#define XF(ret,name,args) +#define XV(v,name,args) + +#include "func.h" -- 2.20.1