This commit is contained in:
2025-09-27 22:09:23 +03:00
commit 914c0295ac
2468 changed files with 204262 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
# See ltrace.conf(5) for description of syntax of this file.
# sys/acl.h
int acl_add_perm(addr,uint);
int acl_calc_mask(addr);
int acl_clear_perms(addr);
int acl_copy_entry(addr,addr);
int acl_copy_ext(addr,addr,int);
addr acl_copy_int(addr);
int acl_create_entry(addr,addr);
int acl_delete_def_file(string);
int acl_delete_entry(addr,addr);
int acl_delete_perm(addr,uint);
addr acl_dup(addr);
int acl_free(addr);
addr acl_from_text(string);
int acl_get_entry(addr,int,addr);
addr acl_get_fd(int);
addr acl_get_file(string,int);
int acl_get_permset(addr,addr);
addr acl_get_qualifier(addr);
int acl_get_tag_type(addr,addr);
addr acl_init(int);
int acl_set_fd(int,addr);
int acl_set_file(string,int,addr);
int acl_set_permset(addr,addr);
int acl_set_qualifier(addr,addr);
int acl_set_tag_type(addr,int);
int acl_size(addr);
string acl_to_text(addr,addr);
int acl_valid(addr);
# acl/libacl.h
int acl_check(addr,addr);
int acl_cmp(addr,addr);
int acl_entries(addr);
int acl_equiv_mode(addr,addr);
string acl_error(int);
int acl_extended_fd(int);
int acl_extended_file(string);
addr acl_from_mode(octal);
int acl_get_perm(addr,uint);
string acl_to_any_text(addr,string,char,int);

View File

@@ -0,0 +1,71 @@
# XXX ltrace misses long double and long long support
typedef ldouble = double;
typedef llong = long;
typedef ullong = ulong;
# This should generally work, I'm not aware of any arch, where the
# parameter passing of complex arguments differs from that for
# structure of two floats.
typedef double_complex = struct(double, double);
typedef float_complex = struct(float, float);
typedef ldouble_complex = struct(ldouble, ldouble);
# arpa/inet.h
typedef in_addr = struct(hex(uint));
# dirent.h
# We can't portably rely on DIR internals at all. Ideally this would
# be implemented in a per-OS config file, but even on Linux, we don't
# know whether there's a lock in the structure or not. Luckily the
# one interesting datum, file descriptor, we can access reliably.
# Having the structure half-defined like this is potentially
# problematic as structure size influences parameter passing. But
# POSIX always uses pointer to the structure, so it's fine.
typedef DIR = struct(int);
typedef FILE = addr;
# XXX We can't represent the following portably without having either
# uulong, or directly uint64_t.'
typedef ino_t = ulong;
typedef ino_t64 = ulong;
typedef off_t = ulong;
typedef off_t64 = ulong;
typedef size_t = ulong;
typedef ssize_t = long;
typedef dirent = struct(ino_t, hide(off_t), hide(ushort), hide(char), string(array(char, zero(256))));
typedef dirent64 = struct(ino_t64, hide(off_t64), hide(ushort), hide(char), string(array(char, zero(256))));
# mntent.h
typedef mntent = struct(string, string, string, string, int, int);
# sched.h
typedef sched_param = struct(int);
typedef sched_policy_e = enum[int](SCHED_FIFO=1, SCHED_RR=2, SCHED_OTHER=0);
# signal.h
typedef signum = enum(SIGHUP=1, SIGINT=2, SIGQUIT=3, SIGILL=4, SIGTRAP=5, SIGABRT=6, SIGBUS=7, SIGFPE=8, SIGKILL=9, SIGUSR1=10, SIGSEGV=11, SIGUSR2=12, SIGPIPE=13, SIGALRM=14, SIGTERM=15, SIGSTKFLT=16, SIGCHLD=17, SIGCONT=18, SIGSTOP=19, SIGTSTP=20, SIGTTIN=21, SIGTTOU=22, SIGURG=23, SIGXCPU=24, SIGXFSZ=25, SIGVTALRM=26, SIGPROF=27, SIGWINCH=28, SIGIO=29, SIGPWR=30, SIGSYS=31, SIGRTMIN_0=32, SIGRTMIN_1=33, SIGRTMIN_2=34, SIGRTMIN_3=35, SIGRTMIN_4=36, SIGRTMIN_5=37, SIGRTMIN_6=38, SIGRTMIN_7=39, SIGRTMIN_8=40, SIGRTMIN_9=41, SIGRTMIN_10=42, SIGRTMIN_11=43, SIGRTMIN_12=44, SIGRTMIN_13=45, SIGRTMIN_14=46, SIGRTMIN_15=47, SIGRTMIN_16=48, SIGRTMIN_17=49, SIGRTMIN_18=50, SIGRTMIN_19=51, SIGRTMIN_20=52, SIGRTMIN_21=53, SIGRTMIN_22=54, SIGRTMIN_23=55, SIGRTMIN_24=56, SIGRTMIN_25=57, SIGRTMIN_26=58, SIGRTMIN_27=59, SIGRTMIN_28=60, SIGRTMIN_29=61, SIGRTMIN_30=62, SIGRTMIN_31=63);
typedef sigset_t = bitvec(ulong);
# elm3 should be flags
typedef sigaction = struct(addr, sigset_t, hex(int), addr);
# sys/mman.h
typedef mmap_flags_t = enum(MAP_SHARED=1, MAP_PRIVATE=2);
# time.h
typedef clockid_t = int;
# XXX in fact (time_t, long), which may be (llong, long) on 32-bit
# arches. We don't have llong as of this writing.
typedef timespec = struct(long, long);
# wchar.h
typedef wchar_t = string(uint);
typedef wint_t = string(int);
typedef wstring_t = string(array(uint, zero)*);
typedef wstring2_t = string(array(uint, zero(arg2))*);
typedef wstring3_t = string(array(uint, zero(arg3))*);
# xlocale.h
typedef locale_t = void*;

View File

@@ -0,0 +1,530 @@
# See ltrace.conf(5) for description of syntax of this file.
import "libc.so-types";
void __libc_start_main(hide(void*), hide(int), array(string, arg2));
# arpa/inet.h
int inet_aton(string, +in_addr*);
hex(uint) inet_addr(string);
hex(uint) inet_network(string);
string inet_ntoa(in_addr);
in_addr inet_makeaddr(hex(int), hex(int));
hex(uint) inet_lnaof(in_addr);
hex(uint) inet_netof(in_addr);
# bfd.h
void bfd_init();
int bfd_set_default_target(string);
addr bfd_scan_vma(string, addr, int);
addr bfd_openr(string,string);
int bfd_check_format(addr,int);
# ctype.h
char tolower(char);
char toupper(char);
addr __ctype_b_loc();
addr __ctype_tolower_loc();
addr __ctype_toupper_loc();
ulong __ctype_get_mb_cur_max();
# curses.h
int waddch(addr, char);
int mvprintw(int, int, format);
int wmove(addr, int, int);
int waddnstr(addr, string, int);
string tgoto(string, int, int);
# dirent.h
dirent *readdir(DIR *);
dirent64 *readdir64(DIR *);
int closedir(DIR *);
DIR *opendir(string);
DIR *fdopendir(int);
int dirfd(DIR *);
void rewinddir(DIR *);
long telldir(DIR *);
void seekdir(DIR *, long);
# dlfcn.h
addr dlopen(string, int);
string dlerror();
addr dlsym(addr, string);
int dlclose(addr);
# errno.h
addr __errno_location();
# fcntl.h
int open(string,int,octal); ; WARNING: 3rd argument may not be there
int open64(string,int,octal); ; WARNING: 3rd argument may not be there
# fnmatch.h
int fnmatch(string, string, int);
# getopt.h
int getopt_long(int,addr,string,addr,int*);
int getopt_long_only(int,addr,string,addr,addr);
# grp.h
void endgrent();
addr getgrnam(string);
void setgrent();
addr getgrent();
# libintl.h
string __dcgettext(string,string,int);
string bindtextdomain(string, string);
string textdomain(string);
# libio.h
char _IO_getc(file);
int _IO_putc(char,file);
# locale.h
string setlocale(enum(LC_CTYPE=0, LC_NUMERIC=1, LC_TIME=2, LC_COLLATE=3, LC_MONETARY=4, LC_MESSAGES=5, LC_ALL=6, LC_PAPER=7, LC_NAME=8, LC_ADDRESS=9, LC_TELEPHONE=10, LC_MEASUREMENT=11, LC_IDENTIFICATION=12), string);
# mcheck.h
void mtrace();
void muntrace();
# mqueue.h
int mq_open(string, int, octal, addr); ; WARNING: 3rd and 4th arguments may not be there
int mq_close(int);
int mq_unlink(string);
int mq_getattr(int, addr);
int mq_setattr(int, addr, addr);
int mq_notify(int, addr);
int mq_send(int, string3, ulong, uint);
int mq_timedsend(int, string3, ulong, uint, addr);
long mq_receive(int, +string0, ulong, addr);
long mq_timedreceive(int, +string0, ulong, addr, addr);
# netdb.h
void endhostent();
void endnetent();
void endnetgrent();
void endprotoent();
void endservent();
void freeaddrinfo(addr);
string gai_strerror(int);
int getaddrinfo(string, string, addr, addr);
addr gethostbyaddr(string, uint, int);
addr gethostbyname(string);
addr gethostent();
int getnameinfo(addr, uint, string, uint, string, uint, uint);
addr getnetbyaddr(uint, int);
addr getnetbyname(string);
addr getnetent();
int getnetgrent(addr, addr, addr);
addr getprotobyname(string);
addr getprotobynumber(int);
addr getprotoent();
addr getservbyname(string, string);
addr getservbyport(int, string);
addr getservent();
void herror(string);
string hstrerror(int);
int rcmd(addr, ushort, string, string, string, addr);
int rcmd_af(addr, ushort, string, string, string, addr, int);
int rexec(addr, int, string, string, string, addr);
int rexec_af(addr, int, string, string, string, addr, int);
int rresvport (addr);
int rresvport_af (addr, int);
int ruserok(string, int, string, string);
int ruserok_af(string, int, string, string, int);
void sethostent(int);
void setnetent(int);
int setnetgrent(string);
void setprotoent(int);
void setservent(int);
# netinet/in.h
uint ntohs(uint);
# pcap.h
string pcap_lookupdev(addr);
addr pcap_open_live(string, int, int, int, addr);
int pcap_snapshot(addr);
int pcap_lookupnet(string, addr, addr, addr);
int pcap_compile(addr, addr, string, int, addr);
# pwd.h
string getpass(string);
void endpwent();
addr getpwnam(string);
void setpwent();
# readline/readline.h
string readline(string);
# signal.h
int kill(int, signum);
int sigemptyset(+sigset_t*);
int sigaddset(+sigset_t*, signum);
int sigdelset(+sigset_t*, signum);
int sigfillset(+sigset_t*);
int sigismember(sigset_t*, signum);
addr signal(signum,addr);
int sigaction(signum, sigaction*, +sigaction*);
int sigprocmask(enum(SIG_BLOCK=1, SIG_UNBLOCK=2, SIG_SETMASK=3), sigset_t*, +sigset_t*);
int sigpending(+sigset_t*);
int sigsuspend(sigset_t*);
int sigisemptyset(sigset_t*);
int sigorset(+sigset_t*, sigset_t*, sigset_t*);
int sigandset(+sigset_t*, sigset_t*, sigset_t*);
# stdio.h
int fclose(file);
int feof(file);
int ferror(file);
int fflush(file);
char fgetc(file);
addr fgets(+string, int, file);
int fileno(file);
file fopen(string,string);
file fopen64(string,string);
file fdopen(int, string);
int fprintf(file,format);
int fputc(char,file);
int fputs(string,file);
ulong fread(addr,ulong,ulong,file);
ulong fread_unlocked(addr,ulong,ulong,file);
ulong fwrite(string,ulong,ulong,file);
ulong fwrite_unlocked(string,ulong,ulong,file);
int pclose(addr);
void perror(string);
addr popen(string, string);
int printf(format);
int puts(string);
int remove(string);
int snprintf(+string2,ulong,format);
int sprintf(+string,format);
string tempnam(string,string);
int vfprintf(file,string,addr);
int vsnprintf(+string2,ulong,string,addr);
int setvbuf(file,addr,int,ulong);
void setbuf(file,addr);
void setbuffer(file,addr,ulong);
void setlinebuf(file);
int rename(string,string);
# xlocale.h
locale_t newlocale(hex(int), string, locale_t);
# stdlib.h
long __strtol_internal(string, +string*, int);
ulong __strtoul_internal(string, +string*, int);
double strtod(string, +string*);
float strtof(string, +string*);
ldouble strtold(string, +string*);
double strtod_l(string, +string*, locale_t);
float strtof_l(string, +string*, locale_t);
ldouble strtold_l(string, +string*, locale_t);
int atexit(addr);
addr bsearch(string, addr, ulong, ulong, addr);
addr calloc(ulong, ulong);
void exit(int);
void free(addr);
string getenv(string);
int putenv(string);
int setenv(string,string,int);
void unsetenv(string);
addr malloc(ulong);
void qsort(addr,ulong,ulong,addr);
addr realloc(addr,ulong);
int system(string);
int rand();
int rand_r(uint*);
void srand(uint);
long random();
void srandom(uint);
void* initstate(uint, void*, ulong);
void* setstate(void*);
int random_r(void*, +int*);
int srandom_r(uint, void*);
int initstate_r(uint, void*, ulong, void*);
int setstate_r(void*, void*);
double drand48();
double erand48(+array(ushort,3)*);
long lrand48();
long nrand48(+array(ushort,3)*);
long mrand48();
long jrand48(+array(ushort,3)*);
void srand48(long);
array(ushort,3)* seed48(array(ushort,3)*);
void lcong48(array(ushort,7)*);
# string.h
void bcopy(addr,addr,ulong);
void bzero(addr,ulong);
string basename(string);
string index(string,char);
addr memchr(string,char,ulong);
addr memcpy(addr,string(array(char, arg3)*),ulong);
addr memmove(addr,string(array(char, arg3)*),ulong);
addr memset(addr,char,long);
string rindex(string,char);
addr stpcpy(addr,string);
int strcasecmp(string, string);
string strcat(string, string);
string strchr(string,char);
int strcoll(string,string);
ulong strlen(string);
int strcmp(string,string);
addr strcpy(addr,string);
addr strdup(string);
string strerror(int);
int strncmp(string,string,ulong);
addr strncpy(addr,string3,ulong);
string strrchr(string,char);
string strsep(addr,string);
ulong strspn(string,string);
ulong strcspn(string,string);
string strstr(string,string);
string strtok(string, string);
# sys/ioctl.h
int ioctl(int, int, addr);
# sys/socket.h
int socket(int,int,int);
# sys/stat.h
int __fxstat(int,int,addr);
int __xstat(int,string,addr);
int __lxstat(int,string,addr);
int __fxstat64(int,int,addr);
int __xstat64(int,string,addr);
int __lxstat64(int,string,addr);
int chmod(string,octal);
int fchmod(int,octal);
int mkfifo(string,octal);
octal umask(octal);
# sys/utsname.h
int uname(addr);
# sys/vfs.h
int statfs(string,addr);
# syslog.h
void closelog();
void openlog(string,int,int);
void syslog(int,format);
# term.h
int tputs(string, int, addr);
# termios.h
int tcgetattr(int,addr);
int tcsetattr(int,int,addr);
# time.h
string ctime(addr);
int gettimeofday(addr, addr);
addr gmtime(addr);
addr localtime(addr);
ulong strftime(+string2,ulong,string,addr);
long time(addr);
int nanosleep(timespec*, timespec*);
# unistd.h
void _exit(int);
int access(string, int);
uint alarm(uint);
int chdir(string);
int chown(string,int,int);
int close(int);
string crypt(string,string);
int dup2(int,int);
int execlp(string,string,addr,addr,addr);
int execv(string,addr);
int fchdir(int);
int fork();
int ftruncate(int,ulong);
string2 getcwd(addr,ulong);
int getdomainname(+string2,ulong);
int geteuid();
int getegid();
int getgid();
int gethostname(+string2,ulong);
string getlogin();
int getopt(int,addr,string);
int getpid();
int getppid();
int getuid();
int getpgrp();
int setpgrp();
int getpgid(int);
int isatty(int);
int link(string,string);
int mkdir(string,octal);
long read(int, +string[retval], ulong);
int rmdir(string);
int seteuid(uint);
int setgid(int);
int sethostname(+string2,ulong);
int setpgid(int,int);
int setreuid(uint, uint);
int setuid(int);
uint sleep(uint);
int symlink(string,string);
int sync();
int truncate(string,ulong);
string ttyname(int);
int unlink(string);
void usleep(uint);
long write(int, string3, ulong);
addr sbrk(long);
int getpagesize();
long lseek(int,long,int);
int pipe(addr);
# utmp.h
void endutent();
addr getutent();
void setutent();
# wchar.h
int fwide(FILE*, int);
wint_t btowc(int);
wint_t getwc(FILE *);
wint_t getwchar();
wint_t fgetwc(FILE*);
wstring_t fgetws(+wstring2_t, int, FILE*);
wint_t ungetwc(wint_t, FILE*);
wint_t fputwc(wchar_t, FILE*);
int fputws(wstring_t, FILE*);
wint_t putwc(wchar_t, FILE*);
wint_t putwchar(wchar_t);
int wprintf(format(wstring_t));
int fwprintf(FILE*, format(wstring_t));
int swprintf(+wstring2_t, ulong, format(wstring_t));
int vfwprintf(FILE*, wstring_t, addr);
int vwprintf(wstring_t, addr);
int vswprintf(+wstring2_t, ulong, wstring_t, addr);
; int wscanf(const wchar_t *restrict, ...);
; int fwscanf(FILE *restrict, const wchar_t *restrict, ...);
; int swscanf(const wchar_t *restrict, const wchar_t *restrict, ...);
; int vfwscanf(FILE *restrict, const wchar_t *restrict, va_list);
; int vswscanf(const wchar_t *restrict, const wchar_t *restrict, va_list);
; int vwscanf(const wchar_t *restrict, va_list);
int iswalnum(wint_t);
int iswalpha(wint_t);
int iswcntrl(wint_t);
int iswdigit(wint_t);
int iswgraph(wint_t);
int iswlower(wint_t);
int iswprint(wint_t);
int iswpunct(wint_t);
int iswspace(wint_t);
int iswupper(wint_t);
int iswxdigit(wint_t);
uint wctype(string);
int iswctype(wint_t, uint);
ulong mbrlen(string, ulong, addr);
ulong mbrtowc(+wchar_t*, string[arg3], ulong, addr);
ulong mbsrtowcs(+wstring3_t, string*, ulong, addr);
ulong wctomb(+string0, wchar_t);
ulong wcrtomb(+string0, wchar_t, addr);
ulong wcsrtombs(+string3, wstring_t*, ulong, addr);
int mbsinit(addr);
wint_t towlower(wint_t);
wint_t towupper(wint_t);
wstring_t wcscat(wstring_t, wstring_t);
wstring_t wcsncat(wstring3_t, wstring_t, ulong);
wstring_t wcschr(wstring_t, wchar_t);
wstring_t wcsrchr(wstring_t, wchar_t);
int wcscmp(wstring_t, wstring_t);
int wcsncmp(wstring3_t, wstring3_t, ulong);
int wcscoll(wstring_t, wstring_t);
addr wcscpy(addr, wstring_t);
addr wcsncpy(addr, wstring_t, ulong);
ulong wcslen(wstring_t);
wstring_t wcsstr(wstring_t, wstring_t);
wstring_t wcswcs(wstring_t, wstring_t);
ulong wcscspn(wstring_t, wstring_t);
ulong wcsspn(wstring_t, wstring_t);
wstring_t wcspbrk(wstring_t, wstring_t);
wstring_t wcstok(wstring_t, wstring_t, +wstring_t*);
ulong wcsftime(+wstring2_t, ulong, wstring_t, addr);
double wcstod(wstring_t, +wstring_t*);
float wcstof(wstring_t, +wstring_t*);
ldouble wcstold(wstring_t, +wstring_t*);
long wcstol(wstring_t, +wstring_t*, int);
llong wcstoll(wstring_t, +wstring_t*, int);
ulong wcstoul(wstring_t, +wstring_t*, int);
ullong wcstoull(wstring_t, +wstring_t*, int);
int wcwidth(wchar_t);
int wcswidth(wstring2_t, ulong);
wstring_t wmemchr(wstring3_t, wchar_t, ulong);
int wmemcmp(wstring3_t, wstring3_t, ulong);
int wctob(wint_t);
wstring3_t wmemcpy(addr, wstring3_t, ulong);
wstring3_t wmemmove(addr, wstring3_t, ulong);
wstring3_t wmemset(addr, wchar_t, ulong);
# sys/wait.h
int wait(addr);
int waitpid(int,addr,int);
# other symbols not included above
long a64l(string);
string l64a(long);
void abort();
int abs(int);
long labs(long);
int addmntent(file, mntent*);
int endmntent(file);
int __endmntent(file);
file setmntent(string,string);
file __setmntent(string,string);
mntent *getmntent(addr);
mntent *getmntent_r(file, +mntent*, string, int);
mntent *__getmntent_r(file, +mntent*, string, int);
string hasmntopt(mntent*, string);
# XXX the third argument is a bitfield
addr mmap(addr, size_t, hex(int), mmap_flags_t, int, off_t);
addr mmap64(addr, size_t, hex(int), mmap_flags_t, int, off_t64);
void munmap(addr, size_t);
int mprotect(addr, ulong, hex(int));
int msync(addr, size_t, hex(int));
int madvise(addr, size_t, enum(MADV_NORMAL=0, MADV_RANDOM=1, MADV_SEQUENTIAL=2, MADV_WILLNEED=3, MADV_DONTNEED=4, MADV_REMOVE=9, MADV_DONTFORK=10, MADV_DOFORK=11, MADV_MERGEABLE=12, MADV_UNMERGEABLE=13, MADV_HUGEPAGE=14, MADV_NOHUGEPAGE=15, MADV_DONTDUMP=16, MADV_DODUMP=17, MADV_HWPOISON=100));
int posix_madvise (addr, size_t, enum(POSIX_MADV_NORMAL=0, POSIX_MADV_RANDOM=1, POSIX_MADV_SEQUENTIAL=2, POSIX_MADV_WILLNEED=3, POSIX_MADV_DONTNEED=4));
int mlock(addr, size_t);
int munlock(addr, size_t);
int mlockall(hex(int));
int munlockall();
# XXX the 16 should really be (arg2 + 4095 / 4096), but ltrace can't
# express that
int mincore(addr, size_t, +array(hex(char), 16)*);
addr mremap(addr, size_t, size_t, hex(int));
int remap_file_pages(addr, size_t, int, size_t, mmap_flags_t);
int shm_open(string, hex(int), oct(int));
int shm_unlink(string);
# libc.so defines several functions from libpthread.so.
# Rather than cherrypick, just import them all.
import "libpthread.so";

View File

@@ -0,0 +1,417 @@
import "libc.so-types";
double sin(double);
float sinf(float);
ldouble sinl(ldouble);
double cos(double);
float cosf(float);
ldouble cosl(ldouble);
void sincos(double, +double*, double*);
void sincosf(float, +float*, float*);
void sincosl(ldouble, +ldouble*, ldouble*);
double tan(double);
float tanf(float);
ldouble tanl(ldouble);
double asin(double);
float asinf(float);
ldouble asinl(ldouble);
double acos(double);
float acosf(float);
ldouble acosl(ldouble);
double atan(double);
float atanf(float);
ldouble atanl(ldouble);
double atan2(double, double);
float atan2f(float, float);
ldouble atan2l(ldouble, ldouble);
double sinh(double);
float sinhf(float);
ldouble sinhl(ldouble);
double cosh(double);
float coshf(float);
ldouble coshl(ldouble);
double tanh(double);
float tanhf(float);
ldouble tanhl(ldouble);
double asinh(double);
float asinhf(float);
ldouble asinhl(ldouble);
double acosh(double);
float acoshf(float);
ldouble acoshl(ldouble);
double atanh(double);
float atanhf(float);
ldouble atanhl(ldouble);
double_complex csin(double_complex);
float_complex csinf(float_complex);
ldouble_complex csinl(ldouble_complex);
double_complex ccos(double_complex);
float_complex ccosf(float_complex);
ldouble_complex ccosl(ldouble_complex);
double_complex ctan(double_complex);
float_complex ctanf(float_complex);
ldouble_complex ctanl(ldouble_complex);
double_complex casin(double_complex);
float_complex casinf(float_complex);
ldouble_complex casinl(ldouble_complex);
double_complex cacos(double_complex);
float_complex cacosf(float_complex);
ldouble_complex cacosl(ldouble_complex);
double_complex catan(double_complex);
float_complex catanf(float_complex);
ldouble_complex catanl(ldouble_complex);
double_complex csinh(double_complex);
float_complex csinhf(float_complex);
ldouble_complex csinhl(ldouble_complex);
double_complex ccosh(double_complex);
float_complex ccoshf(float_complex);
ldouble_complex ccoshl(ldouble_complex);
double_complex ctanh(double_complex);
float_complex ctanhf(float_complex);
ldouble_complex ctanhl(ldouble_complex);
double_complex casinh(double_complex);
float_complex casinhf(float_complex);
ldouble_complex casinhl(ldouble_complex);
double_complex cacosh(double_complex);
float_complex cacoshf(float_complex);
ldouble_complex cacoshl(ldouble_complex);
double_complex catanh(double_complex);
float_complex catanhf(float_complex);
ldouble_complex catanhl(ldouble_complex);
double creal(double_complex);
float crealf(float_complex);
ldouble creall(ldouble_complex);
double cimag(double_complex);
float cimagf(float_complex);
ldouble cimagl(ldouble_complex);
double round(double);
float roundf(float);
ldouble roundl(ldouble);
long lround(double);
long lroundf(float);
long lroundl(ldouble);
llong llround(double);
llong llroundf(float);
llong llroundl(ldouble);
double trunc(double);
float truncf(float);
ldouble truncl(ldouble);
double floor(double);
float floorf(float);
ldouble floorl(ldouble);
double ceil(double);
float ceilf(float);
ldouble ceill(ldouble);
double pow(double, double);
float powf(float, float);
ldouble powl(ldouble, ldouble);
double_complex cpow(double_complex, double_complex);
float_complex cpowf(float_complex, float_complex);
ldouble_complex cpowl(ldouble_complex, ldouble_complex);
double pow10(double);
float pow10f(float);
ldouble pow10l(ldouble);
double sqrt(double);
float sqrtf(float);
ldouble sqrtl(ldouble);
double_complex csqrt(double_complex);
float_complex csqrtf(float_complex);
ldouble_complex csqrtl(ldouble_complex);
double cbrt(double);
float cbrtf(float);
ldouble cbrtl(ldouble);
double log(double);
float logf(float);
ldouble logl(ldouble);
double log10(double);
float log10f(float);
ldouble log10l(ldouble);
double log2(double);
float log2f(float);
ldouble log2l(ldouble);
double logb(double);
float logbf(float);
ldouble logbl(ldouble);
int ilogb(double);
int ilogbf(float);
int ilogbl(ldouble);
double log1p(double);
float log1pf(float);
ldouble log1pl(ldouble);
double_complex clog(double_complex);
float_complex clogf(float_complex);
ldouble_complex clogl(ldouble_complex);
double_complex clog10(double_complex);
float_complex clog10f(float_complex);
ldouble_complex clog10l(ldouble_complex);
double gamma(double);
float gammaf(float);
ldouble gammal(ldouble);
double lgamma(double);
float lgammaf(float);
ldouble lgammal(ldouble);
double lgamma_r(double, +int*);
float lgammaf_r(float, +int*);
ldouble lgammal_r(ldouble, +int*);
double tgamma(double);
float tgammaf(float);
ldouble tgammal(ldouble);
double j0(double);
float j0f(float);
ldouble j0l(ldouble);
double j1(double);
float j1f(float);
ldouble j1l(ldouble);
double jn(int, double);
float jnf(int, float);
ldouble jnl(int, ldouble);
double y0(double);
float y0f(float);
ldouble y0l(ldouble);
double y1(double);
float y1f(float);
ldouble y1l(ldouble);
double yn(int, double);
float ynf(int, float);
ldouble ynl(int, ldouble);
double fdim(double, double);
float fdimf(float, float);
ldouble fdiml(ldouble, ldouble);
double remainder(double, double);
float remainderf(float, float);
ldouble remainderl(ldouble, ldouble);
double drem(double, double);
float dremf(float, float);
ldouble dreml(ldouble, ldouble);
double nearbyint(double);
float nearbyintf(float);
ldouble nearbyintl(ldouble);
double rint(double);
float rintf(float);
ldouble rintl(ldouble);
long lrint(double);
long lrintf(float);
long lrintl(ldouble);
llong llrint(double);
llong llrintf(float);
llong llrintl(ldouble);
double exp(double);
float expf(float);
ldouble expl(ldouble);
double exp10(double);
float exp10f(float);
ldouble exp10l(ldouble);
double exp2(double);
float exp2f(float);
ldouble exp2l(ldouble);
double expm1(double);
float expm1f(float);
ldouble expm1l(ldouble);
double frexp(double, +int *);
float frexpf(float, +int *);
ldouble frexpl(ldouble, +int *);
double ldexp(double, int);
float ldexpf(float, int);
ldouble ldexpl(ldouble, int);
double_complex cexp(double_complex);
float_complex cexpf(float_complex);
ldouble_complex cexpl(ldouble_complex);
double significand(double);
float significandf(float);
ldouble significandl(ldouble);
int finite(double);
int finitef(float);
int finitel(ldouble);
int isinf(double);
int isinff(float);
int isinfl(ldouble);
int isnan(double);
int isnanf(float);
int isnanl(ldouble);
double nan(string);
float nanf(string);
ldouble nanl(string);
double fabs(double);
float fabsf(float);
ldouble fabsl(ldouble);
double cabs(double_complex);
float cabsf(float_complex);
ldouble cabsl(ldouble_complex);
double modf(double, +double *);
float modff(float, +float *);
ldouble modfl(ldouble, +ldouble *);
double fmod(double, double);
float fmodf(float, float);
ldouble fmodl(ldouble, ldouble);
double remquo(double, double, +int *);
float remquof(float, float, +int *);
ldouble remquol(ldouble, ldouble, +int *);
double erf(double);
float erff(float);
ldouble erfl(ldouble);
double erfc(double);
float erfcf(float);
ldouble erfcl(ldouble);
double fmax(double, double);
float fmaxf(float, float);
ldouble fmaxl(ldouble, ldouble);
double fmin(double, double);
float fminf(float, float);
ldouble fminl(ldouble, ldouble);
double carg(double_complex);
float cargf(float_complex);
ldouble cargl(ldouble_complex);
double hypot(double, double);
float hypotf(float, float);
ldouble hypotl(ldouble, ldouble);
double scalb(double, double);
float scalbf(float, double);
ldouble scalbl(ldouble, double);
double scalbn(double, int);
float scalbnf(float, int);
ldouble scalbnl(ldouble, int);
double scalbln(double, long);
float scalblnf(float, long);
ldouble scalblnl(ldouble, long);
double fma(double, double, double);
float fmaf(float, float, float);
ldouble fmal(ldouble, ldouble, ldouble);
double_complex cproj(double_complex);
float_complex cprojf(float_complex);
ldouble_complex cprojl(ldouble_complex);
double copysign(double, double);
float copysignf(float, float);
ldouble copysignl(ldouble, ldouble);
double nextafter(double, double);
float nextafterf(float, float);
ldouble nextafterl(ldouble, ldouble);
double nexttoward(double, ldouble);
float nexttowardf(float, ldouble);
ldouble nexttowardl(ldouble, ldouble);
double_complex conj(double_complex);
float_complex conjf(float_complex);
ldouble_complex conjl(ldouble_complex);
; 15: 000000000003c000 15 FUNC GLOBAL DEFAULT 13 __finitel@@GLIBC_2.2.5
; 44: 0000000000027be0 286 FUNC GLOBAL DEFAULT 13 __clog10@@GLIBC_2.2.5
; 50: 00000000000068d0 85 FUNC GLOBAL DEFAULT 13 feholdexcept@@GLIBC_2.2.5
; 56: 0000000000028900 10 FUNC GLOBAL DEFAULT 13 __signbit@@GLIBC_2.2.5
; 61: 0000000000006ae0 53 FUNC GLOBAL DEFAULT 13 feenableexcept@@GLIBC_2.2.5
; 65: 0000000000006760 29 FUNC GLOBAL DEFAULT 13 fegetexceptflag@@GLIBC_2.2.5
; 68: 0000000000006a60 52 FUNC GLOBAL DEFAULT 13 feupdateenv@@GLIBC_2.2.5
; 75: 0000000000006840 25 FUNC GLOBAL DEFAULT 13 fetestexcept@@GLIBC_2.2.5
; 89: 0000000000025500 80 FUNC GLOBAL DEFAULT 13 __fpclassify@@GLIBC_2.2.5
; 99: 0000000000033370 310 FUNC GLOBAL DEFAULT 13 __clog10f@@GLIBC_2.2.5
; 104: 000000000003b600 307 FUNC GLOBAL DEFAULT 13 __clog10l@@GLIBC_2.2.5
; 127: 0000000000028560 29 FUNC GLOBAL DEFAULT 13 __finite@@GLIBC_2.2.5
; 134: 0000000000006870 66 FUNC GLOBAL DEFAULT 13 fesetround@@GLIBC_2.2.5
; 136: 0000000000006780 99 FUNC GLOBAL DEFAULT 13 feraiseexcept@@GLIBC_2.2.5
; 146: 0000000000006aa0 49 FUNC GLOBAL DEFAULT 13 fedisableexcept@@GLIBC_2.2.5
; 155: 0000000000006730 40 FUNC GLOBAL DEFAULT 13 feclearexcept@@GLIBC_2.2.5
; 175: 0000000000006860 14 FUNC GLOBAL DEFAULT 13 fegetround@@GLIBC_2.2.5
; 199: 0000000000006b20 16 FUNC GLOBAL DEFAULT 13 fegetexcept@@GLIBC_2.2.5
; 213: 00000000000067f0 71 FUNC GLOBAL DEFAULT 13 fesetexceptflag@@GLIBC_2.2.5
; 229: 00000000000068c0 9 FUNC GLOBAL DEFAULT 13 fegetenv@@GLIBC_2.2.5
; 249: 0000000000006930 303 FUNC GLOBAL DEFAULT 13 fesetenv@@GLIBC_2.2.5
; 256: 00000000000308c0 56 FUNC GLOBAL DEFAULT 13 __fpclassifyf@@GLIBC_2.2.5
; 261: 0000000000039020 94 FUNC GLOBAL DEFAULT 13 __fpclassifyl@@GLIBC_2.2.5
; 263: 0000000000033a80 8 FUNC GLOBAL DEFAULT 13 __signbitf@@GLIBC_2.2.5
; 267: 000000000003c2f0 29 FUNC GLOBAL DEFAULT 13 __signbitl@@GLIBC_2.2.5
; 318: 0000000000006720 3 FUNC WEAK DEFAULT 13 matherr@@GLIBC_2.2.5
; 328: 00000000000337f0 18 FUNC GLOBAL DEFAULT 13 __finitef@@GLIBC_2.2.5

View File

@@ -0,0 +1,25 @@
typedef pthread_t = ulong;
typedef pthread_attr_t = void;
typedef pthread_barrier_t = void;
typedef pthread_barrierattr_t = void;
typedef pthread_cond_t = void;
typedef pthread_condattr_t = void;
typedef pthread_key_t = uint;
typedef pthread_mutex_t = void;
typedef pthread_mutexattr_t = void;
typedef pthread_once_t = void;
typedef pthread_rwlock_t = void;
typedef pthread_rwlockattr_t = void;
typedef pthread_spinlock_t = void;
typedef pthread_barrier_e = enum[int](PTHREAD_BARRIER_SERIAL_THREAD=-1);
typedef pthread_cancel_state_e = enum[int](PTHREAD_CANCEL_DISABLE=1, PTHREAD_CANCEL_ENABLE=0);
typedef pthread_cancel_type_e = enum[int](PTHREAD_CANCEL_ASYNCHRONOUS=1, PTHREAD_CANCEL_DEFERRED=0);
typedef pthread_detach_state_e = enum[int](PTHREAD_CREATE_DETACHED=1, PTHREAD_CREATE_JOINABLE=0);
typedef pthread_inherit_sched_e = enum[int](PTHREAD_EXPLICIT_SCHED=1, PTHREAD_INHERIT_SCHED=0);
typedef pthread_mutex_protocol_e = enum[int](PTHREAD_PRIO_INHERIT=1, PTHREAD_PRIO_NONE=0, PTHREAD_PRIO_PROTECT=2);
typedef pthread_mutex_robust_e = enum[int](PTHREAD_MUTEX_ROBUST=1, PTHREAD_MUTEX_STALLED=0);
typedef pthread_mutex_type_e = enum[int](PTHREAD_MUTEX_ADAPTIVE_NP=3, PTHREAD_MUTEX_ERRORCHECK=2, PTHREAD_MUTEX_NORMAL=0, PTHREAD_MUTEX_RECURSIVE=1);
typedef pthread_pshared_e = enum[int](PTHREAD_PROCESS_SHARED=1, PTHREAD_PROCESS_PRIVATE=0);
typedef pthread_rwlock_kind_e = enum[int](PTHREAD_RWLOCK_PREFER_READER_NP=0, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP=2, PTHREAD_RWLOCK_PREFER_WRITER_NP=1);
typedef pthread_scope_e = enum[int](PTHREAD_SCOPE_PROCESS=1, PTHREAD_SCOPE_SYSTEM=0);

View File

@@ -0,0 +1,141 @@
import "libc.so-types";
import "libpthread.so-types";
# <pthread.h>
int pthread_atfork(void *, void *, void *);
int pthread_attr_destroy(pthread_attr_t *);
int pthread_attr_getaffinity_np(pthread_attr_t *, size_t, void *);
int pthread_attr_getdetachstate(pthread_attr_t *, +pthread_detach_state_e *);
int pthread_attr_getguardsize(pthread_attr_t *, +size_t *);
int pthread_attr_getinheritsched(pthread_attr_t *, +pthread_inherit_sched_e *);
int pthread_attr_getschedparam(pthread_attr_t *, +sched_param *);
int pthread_attr_getschedpolicy(pthread_attr_t *, +sched_policy_e *);
int pthread_attr_getscope(pthread_attr_t *, +pthread_scope_e *);
int pthread_attr_getstack(pthread_attr_t *, +void **, +size_t *);
int pthread_attr_getstacksize(pthread_attr_t *, +size_t *);
int pthread_attr_init(pthread_attr_t *);
int pthread_attr_setaffinity_np(pthread_attr_t *, size_t, void *);
int pthread_attr_setdetachstate(pthread_attr_t *, pthread_detach_state_e);
int pthread_attr_setguardsize(pthread_attr_t *, size_t);
int pthread_attr_setinheritsched(pthread_attr_t *, pthread_inherit_sched_e);
int pthread_attr_setschedparam(pthread_attr_t *, sched_param *);
int pthread_attr_setschedpolicy(pthread_attr_t *, sched_policy_e);
int pthread_attr_setscope(pthread_attr_t *, pthread_scope_e);
int pthread_attr_setstack(pthread_attr_t *, void *, size_t);
int pthread_attr_setstacksize(pthread_attr_t *, size_t);
int pthread_barrier_destroy(pthread_barrier_t *);
int pthread_barrier_init(pthread_barrier_t *, pthread_barrierattr_t *, uint);
pthread_barrier_e pthread_barrier_wait(pthread_barrier_t *);
int pthread_barrierattr_destroy(pthread_barrierattr_t *);
int pthread_barrierattr_getpshared(pthread_barrierattr_t *, +pthread_pshared_e *);
int pthread_barrierattr_init(pthread_barrierattr_t *);
int pthread_barrierattr_setpshared(pthread_barrierattr_t *, pthread_pshared_e);
int pthread_cancel(pthread_t);
int pthread_cond_broadcast(pthread_cond_t *);
int pthread_cond_destroy(pthread_cond_t *);
int pthread_cond_init(pthread_cond_t *, pthread_condattr_t *);
int pthread_cond_signal(pthread_cond_t *);
int pthread_cond_timedwait(pthread_cond_t *, pthread_mutex_t *, timespec *);
int pthread_cond_wait(pthread_cond_t *, pthread_mutex_t *);
int pthread_condattr_destroy(pthread_condattr_t *);
int pthread_condattr_getclock(pthread_condattr_t *, +clockid_t *);
int pthread_condattr_getpshared(pthread_condattr_t *, +pthread_pshared_e *);
int pthread_condattr_init(pthread_condattr_t *);
int pthread_condattr_setclock(pthread_condattr_t *, clockid_t);
int pthread_condattr_setpshared(pthread_condattr_t *, pthread_pshared_e);
int pthread_create(+pthread_t *, pthread_attr_t *, void *, void *);
int pthread_detach(pthread_t);
int pthread_equal(pthread_t, pthread_t);
void pthread_exit(void *);
int pthread_getaffinity_np(pthread_t, size_t, void *);
int pthread_getattr_default_np(pthread_attr_t *);
int pthread_getattr_np(pthread_t, pthread_attr_t *);
int pthread_getconcurrency();
int pthread_getcpuclockid(pthread_t, +clockid_t *);
int pthread_getname_np(pthread_t, +string, size_t);
int pthread_getschedparam(pthread_t, +sched_policy_e *, +sched_param *);
void *pthread_getspecific(pthread_key_t);
int pthread_join(pthread_t, +void **);
int pthread_key_create(+pthread_key_t *, void *);
int pthread_key_delete(pthread_key_t);
int pthread_mutex_consistent(pthread_mutex_t *);
int pthread_mutex_consistent_np(pthread_mutex_t *);
int pthread_mutex_destroy(pthread_mutex_t *);
int pthread_mutex_getprioceiling(pthread_mutex_t *, +int *);
int pthread_mutex_init(pthread_mutex_t *, pthread_mutexattr_t *);
int pthread_mutex_lock(pthread_mutex_t *);
int pthread_mutex_setprioceiling(pthread_mutex_t *, int, +int *);
int pthread_mutex_timedlock(pthread_mutex_t *, timespec *);
int pthread_mutex_trylock(pthread_mutex_t *);
int pthread_mutex_unlock(pthread_mutex_t *);
int pthread_mutexattr_destroy(pthread_mutexattr_t *);
int pthread_mutexattr_getprioceiling(pthread_mutexattr_t *, +int *);
int pthread_mutexattr_getprotocol(pthread_mutexattr_t *, +pthread_mutex_protocol_e *);
int pthread_mutexattr_getpshared(pthread_mutexattr_t *, +pthread_pshared_e *);
int pthread_mutexattr_getrobust(pthread_mutexattr_t *, +pthread_mutex_robust_e *);
int pthread_mutexattr_getrobust_np(pthread_mutexattr_t *, +pthread_mutex_robust_e *);
int pthread_mutexattr_gettype(pthread_mutexattr_t *, +pthread_mutex_type_e *);
int pthread_mutexattr_init(pthread_mutexattr_t *);
int pthread_mutexattr_setprioceiling(pthread_mutexattr_t *, int);
int pthread_mutexattr_setprotocol(pthread_mutexattr_t *, pthread_mutex_protocol_e);
int pthread_mutexattr_setpshared(pthread_mutexattr_t *, pthread_pshared_e);
int pthread_mutexattr_setrobust(pthread_mutexattr_t *, pthread_mutex_robust_e);
int pthread_mutexattr_setrobust_np(pthread_mutexattr_t *, pthread_mutex_robust_e);
int pthread_mutexattr_settype(pthread_mutexattr_t *, pthread_mutex_type_e);
int pthread_once(pthread_once_t *, void *);
int pthread_rwlock_destroy(pthread_rwlock_t *);
int pthread_rwlock_init(pthread_rwlock_t *, pthread_rwlockattr_t *);
int pthread_rwlock_rdlock(pthread_rwlock_t *);
int pthread_rwlock_timedrdlock(pthread_rwlock_t *, timespec *);
int pthread_rwlock_timedwrlock(pthread_rwlock_t *, timespec *);
int pthread_rwlock_tryrdlock(pthread_rwlock_t *);
int pthread_rwlock_trywrlock(pthread_rwlock_t *);
int pthread_rwlock_unlock(pthread_rwlock_t *);
int pthread_rwlock_wrlock(pthread_rwlock_t *);
int pthread_rwlockattr_destroy(pthread_rwlockattr_t *);
int pthread_rwlockattr_getkind_np(pthread_rwlockattr_t *, +pthread_rwlock_kind_e *);
int pthread_rwlockattr_getpshared(pthread_rwlockattr_t *, +pthread_pshared_e *);
int pthread_rwlockattr_init(pthread_rwlockattr_t *);
int pthread_rwlockattr_setkind_np(pthread_rwlockattr_t *, pthread_rwlock_kind_e);
int pthread_rwlockattr_setpshared(pthread_rwlockattr_t *, pthread_pshared_e);
pthread_t pthread_self();
int pthread_setaffinity_np(pthread_t, size_t, void *);
int pthread_setattr_default_np(pthread_attr_t *);
int pthread_setcancelstate(pthread_cancel_state_e, +pthread_cancel_state_e *);
int pthread_setcanceltype(pthread_cancel_type_e, +pthread_cancel_type_e *);
int pthread_setconcurrency(int);
int pthread_setname_np (pthread_t, string);
int pthread_setschedparam(pthread_t, sched_policy_e, sched_param *);
int pthread_setschedprio(pthread_t, int);
int pthread_setspecific(pthread_key_t, void *);
int pthread_spin_destroy(pthread_spinlock_t *);
int pthread_spin_init(pthread_spinlock_t *, pthread_pshared_e);
int pthread_spin_lock(pthread_spinlock_t *);
int pthread_spin_trylock(pthread_spinlock_t *);
int pthread_spin_unlock(pthread_spinlock_t *);
void pthread_testcancel();
int pthread_timedjoin_np(pthread_t, +void **, timespec *);
int pthread_tryjoin_np(pthread_t, +void **);
# <signal.h>
int pthread_kill(pthread_t, signum);
int pthread_sigmask(int, sigset_t *, +sigset_t *);

View File

@@ -0,0 +1,146 @@
# syscall.conf -- system call prototypes
# See ltrace.conf(5) for description of syntax of this file.
# Special value used to indicate the *at functions should use the
# current working directory.
typedef at_dirfd_t = enum[int](AT_FDCWD=-100);
addr brk(addr);
int close(int);
int execve(string,addr,addr);
void exit(int);
void exit_group(int);
int fork();
int getcwd(+string2,ulong);
int getpid();
# XXX the last argument should be off_t
addr mmap(addr,ulong,int,int,int,long);
int munmap(addr,ulong);
int open(string, hex(uint), oct(uint));
int personality(uint);
long read(int,+string0,ulong);
int stat(string,addr);
octal umask(octal);
int uname(addr);
long write(int,string3,ulong);
int sync();
int setxattr(string,string,addr,uint,int);
int lsetxattr(string,string,addr,uint,int);
int fsetxattr(int,string,addr,uint,int);
int getxattr(string,string,addr,uint);
int lgetxattr(string,string,addr,uint);
int fgetxattr(int,string,addr,uint);
int listxattr(string,addr,uint);
int llistxattr(string,addr,uint);
int flistxattr(int,addr,uint);
int removexattr(string,string);
int lremovexattr(string,string);
int fremovexattr(int,string);
int chdir(string);
int fchdir(int);
int chmod(string,octal);
int fchmod(int,octal);
int chown(string,int,int);
int fchown(int,int,int);
int lchown(string,int,int);
int chroot(string);
int dup(int);
int dup2(int,int);
int fdatasync(int);
int fsync(int);
int getpriority(int,int);
int setpriority(int,int,int);
int getrlimit(int,addr);
int setrlimit(int,addr);
int gettimeofday(addr,addr);
int settimeofday(addr,addr);
int setfsgid(int);
int setfsuid(int);
int getuid();
int setuid(int);
int getgid();
int setgid(int);
int getsid(int);
int setsid(int);
int setreuid(int,int);
int setregid(int,int);
int geteuid();
int getegid();
int setpgid(int,int);
int getresuid(addr,addr,addr);
int setresuid(int,int,int);
int getresgid(addr,addr,addr);
int setresgid(int,int,int);
int kill(int,int);
int link(string,string);
int madvise(addr,ulong,int);
int mkdir(string,octal);
int mknod(string,octal,int);
int msync(addr,ulong,int);
int nice(int);
int poll(addr,uint,int);
int readdir(uint,addr,uint);
int readlink(string,string,ulong);
int reboot(int,int,int,addr);
int rename(string,string);
int rmdir(string);
int sigaltstack(addr,addr);
int statfs(string,addr);
int fstatfs(int,addr);
int fstat(int,addr);
int lstat(string,addr);
int stime(addr);
int symlink(string, string);
int sysinfo(addr);
int syslog(int,string,int);
int truncate(string,long);
int ftruncate(int,long);
int mount(string,string,string,ulong,addr);
int umount(string);
int umount2(string,int);
int unlink(string);
int utime(string,addr);
long lseek(int,long,int);
addr signal(int,addr);
int sigaction(int,addr,addr);
int pause();
int sigpending(addr);
int sigprocmask(int,addr,addr);
int sigqueue(int,int,addr);
int sigsuspend(addr);
int wait(addr);
int waitpid(int,addr,int);
ulong readv(int,addr,int);
ulong writev(int,addr,int);
int mprotect(addr,int,int);
int access(string,octal);
int getdents(uint, void *, uint);
int openat(at_dirfd_t, string, hex(uint), oct(uint));
int mknodat(at_dirfd_t, string, oct(uint), ushort)
int mkdirat(at_dirfd_t, string, oct(uint));
int unlinkat(at_dirfd_t, string, hex(uint));
int symlinkat(string, at_dirfd_t, string);
int linkat(at_dirfd_t, string, at_dirfd_t, string, hex(uint));
int renameat(at_dirfd_t, string, at_dirfd_t, string);
int faccessat(at_dirfd_t, string, oct(uint), hex(uint));
int fchmodat(at_dirfd_t, string, oct(uint), hex(uint));
int fchownat(at_dirfd_t, string, int, int, hex(uint));
int readlinkat(at_dirfd_t, string, +string[arg4], ulong);
int fstatat(at_dirfd_t, string, addr, hex(uint));
int utimensat(at_dirfd_t, string, addr, hex(uint));
int futimens(int, addr);
int futimesat(at_dirfd_t, string, addr);
addr shmat(int, addr, hex(uint));
int shmdt(addr);
typedef fid_type = enum(FILEID_ROOT=0, FILEID_INO32_GEN=1, FILEID_INO32_GEN_PARENT=2, FILEID_BTRFS_WITHOUT_PARENT=0x4d, FILEID_BTRFS_WITH_PARENT=0x4e, FILEID_BTRFS_WITH_PARENT_ROOT=0x4f, FILEID_UDF_WITHOUT_PARENT=0x51, FILEID_UDF_WITH_PARENT=0x52, FILEID_NILFS_WITHOUT_PARENT=0x61, FILEID_NILFS_WITH_PARENT=0x62);
typedef file_handle = struct(uint, fid_type, array(hex(char), elt1)*);
int name_to_handle_at(at_dirfd_t, string, file_handle, int*, hex(uint));
int open_by_handle_at(at_dirfd_t, file_handle, hex(uint));
int newfstatat(at_dirfd_t, string, addr, hex(uint));
int creat(string, oct(int));
int ustat(ushort, addr);