1
+ #include <sys/types.h>
1
2
#include <wasi/api.h>
2
3
#include <wasi/wasi-helpers.h>
3
4
#include <emscripten/em_macros.h>
@@ -14,9 +15,9 @@ extern "C" {
14
15
15
16
int __syscall_link (intptr_t oldpath , intptr_t newpath );
16
17
int __syscall_chdir (intptr_t path );
17
- int __syscall_mknod (intptr_t path , int mode , int dev );
18
- int __syscall_chmod (intptr_t path , int mode );
19
- int __syscall_getpid (void );
18
+ int __syscall_mknod (intptr_t path , mode_t mode , dev_t dev );
19
+ int __syscall_chmod (intptr_t path , mode_t mode );
20
+ pid_t __syscall_getpid (void );
20
21
int __syscall_pause (void );
21
22
int __syscall_access (intptr_t path , int amode );
22
23
int __syscall_sync (void );
@@ -25,30 +26,30 @@ int __syscall_dup(int fd);
25
26
int __syscall_pipe (intptr_t fd );
26
27
int __syscall_acct (intptr_t filename );
27
28
int __syscall_ioctl (int fd , int request , ...);
28
- int __syscall_setpgid (int pid , int gpid );
29
- int __syscall_umask (int mask );
30
- int __syscall_getppid (void );
31
- int __syscall_getpgrp (void );
32
- int __syscall_setsid (void );
29
+ int __syscall_setpgid (pid_t pid , pid_t gpid );
30
+ mode_t __syscall_umask (mode_t mask );
31
+ pid_t __syscall_getppid (void );
32
+ pid_t __syscall_getpgrp (void );
33
+ pid_t __syscall_setsid (void );
33
34
int __syscall_setrlimit (int resource , intptr_t limit );
34
35
int __syscall_getrusage (int who , intptr_t usage );
35
36
int __syscall_symlink (intptr_t target , intptr_t linkpath );
36
37
int __syscall_munmap (intptr_t addr , size_t len );
37
- int __syscall_fchmod (int fd , int mode );
38
- int __syscall_getpriority (int which , int who );
39
- int __syscall_setpriority (int which , int who , int prio );
38
+ int __syscall_fchmod (int fd , mode_t mode );
39
+ int __syscall_getpriority (int which , id_t who );
40
+ int __syscall_setpriority (int which , id_t who , int prio );
40
41
int __syscall_socketcall (int call , intptr_t args );
41
42
int __syscall_setitimer (int which , intptr_t new_value , intptr_t old_value );
42
43
int __syscall_getitimer (int which , intptr_t old_value );
43
- int __syscall_wait4 (int pid , intptr_t wstatus , int options , int rusage );
44
+ pid_t __syscall_wait4 (pid_t pid , intptr_t wstatus , int options , int rusage );
44
45
int __syscall_setdomainname (intptr_t name , size_t size );
45
46
int __syscall_uname (intptr_t buf );
46
47
int __syscall_mprotect (size_t addr , size_t len , int prot );
47
- int __syscall_getpgid (int pid );
48
+ pid_t __syscall_getpgid (pid_t pid );
48
49
int __syscall_fchdir (int fd );
49
50
int __syscall__newselect (int nfds , intptr_t readfds , intptr_t writefds , intptr_t exceptfds , intptr_t timeout );
50
51
int __syscall_msync (intptr_t addr , size_t len , int flags );
51
- int __syscall_getsid (int pid );
52
+ pid_t __syscall_getsid (pid_t pid );
52
53
int __syscall_fdatasync (int fd );
53
54
int __syscall_mlock (intptr_t addr , size_t len );
54
55
int __syscall_munlock (intptr_t addr , size_t len );
@@ -59,51 +60,51 @@ int __syscall_poll(intptr_t fds, int nfds, int timeout);
59
60
int __syscall_getcwd (intptr_t buf , size_t size );
60
61
int __syscall_ugetrlimit (int resource , intptr_t rlim );
61
62
intptr_t __syscall_mmap2 (intptr_t addr , size_t len , int prot , int flags , int fd , size_t off );
62
- int __syscall_truncate64 (intptr_t path , uint64_t length );
63
- int __syscall_ftruncate64 (int fd , uint64_t length );
63
+ int __syscall_truncate64 (intptr_t path , off_t length );
64
+ int __syscall_ftruncate64 (int fd , off_t length );
64
65
int __syscall_stat64 (intptr_t path , intptr_t buf );
65
66
int __syscall_lstat64 (intptr_t path , intptr_t buf );
66
67
int __syscall_fstat64 (int fd , intptr_t buf );
67
- int __syscall_getuid32 (void );
68
- int __syscall_getgid32 (void );
69
- int __syscall_geteuid32 (void );
70
- int __syscall_getegid32 (void );
71
- int __syscall_setreuid32 (int ruid , int euid );
72
- int __syscall_setregid32 (int rgid , int egid );
73
- int __syscall_getgroups32 (int size , intptr_t list );
74
- int __syscall_fchown32 (int fd , int owner , int group );
75
- int __syscall_setresuid32 (int ruid , int euid , int suid );
68
+ uid_t __syscall_getuid32 (void );
69
+ gid_t __syscall_getgid32 (void );
70
+ uid_t __syscall_geteuid32 (void );
71
+ gid_t __syscall_getegid32 (void );
72
+ int __syscall_setreuid32 (uid_t ruid , uid_t euid );
73
+ int __syscall_setregid32 (gid_t rgid , gid_t egid );
74
+ int __syscall_getgroups32 (int count , intptr_t list );
75
+ int __syscall_fchown32 (int fd , uid_t owner , gid_t group );
76
+ int __syscall_setresuid32 (int ruid , uid_t euid , uid_t suid );
76
77
int __syscall_getresuid32 (intptr_t ruid , intptr_t euid , intptr_t suid );
77
- int __syscall_setresgid32 (int rgid , int egid , int sgid );
78
+ int __syscall_setresgid32 (int rgid , uid_t egid , uid_t sgid );
78
79
int __syscall_getresgid32 (intptr_t rgid , intptr_t egid , intptr_t sgid );
79
- int __syscall_setuid32 (int uid );
80
- int __syscall_setgid32 (int uid );
80
+ int __syscall_setuid32 (uid_t uid );
81
+ int __syscall_setgid32 (gid_t gid );
81
82
int __syscall_mincore (intptr_t addr , size_t length , intptr_t vec );
82
83
int __syscall_madvise (intptr_t addr , size_t length , int advice );
83
84
int __syscall_getdents64 (int fd , intptr_t dirp , size_t count );
84
85
int __syscall_fcntl64 (int fd , int cmd , ...);
85
86
int __syscall_statfs64 (intptr_t path , size_t size , intptr_t buf );
86
87
int __syscall_fstatfs64 (int fd , size_t size , intptr_t buf );
87
- int __syscall_fadvise64 (int fd , uint64_t offset , uint64_t length , int advice );
88
+ int __syscall_fadvise64 (int fd , off_t offset , off_t length , int advice );
88
89
int __syscall_openat (int dirfd , intptr_t path , int flags , ...); // mode is optional
89
- int __syscall_mkdirat (int dirfd , intptr_t path , int mode );
90
- int __syscall_mknodat (int dirfd , intptr_t path , int mode , int dev );
91
- int __syscall_fchownat (int dirfd , intptr_t path , int owner , int group , int flags );
90
+ int __syscall_mkdirat (int dirfd , intptr_t path , mode_t mode );
91
+ int __syscall_mknodat (int dirfd , intptr_t path , mode_t mode , dev_t dev );
92
+ int __syscall_fchownat (int dirfd , intptr_t path , uid_t owner , gid_t group , int flags );
92
93
int __syscall_newfstatat (int dirfd , intptr_t path , intptr_t buf , int flags );
93
94
int __syscall_unlinkat (int dirfd , intptr_t path , int flags );
94
95
int __syscall_renameat (int olddirfd , intptr_t oldpath , int newdirfd , intptr_t newpath );
95
96
int __syscall_linkat (int olddirfd , intptr_t oldpath , int newdirfd , intptr_t newpath , int flags );
96
97
int __syscall_symlinkat (intptr_t target , int newdirfd , intptr_t linkpath );
97
98
int __syscall_readlinkat (int dirfd , intptr_t path , intptr_t buf , size_t bufsize );
98
- int __syscall_fchmodat (int dirfd , intptr_t path , int mode , ...);
99
+ int __syscall_fchmodat (int dirfd , intptr_t path , mode_t mode , ...);
99
100
int __syscall_faccessat (int dirfd , intptr_t path , int amode , int flags );
100
101
int __syscall_pselect6 (int nfds , intptr_t readfds , intptr_t writefds , intptr_t exceptfds , intptr_t timeout , intptr_t sigmaks );
101
102
int __syscall_utimensat (int dirfd , intptr_t path , intptr_t times , int flags );
102
- int __syscall_fallocate (int fd , int mode , uint64_t off , uint64_t len );
103
+ int __syscall_fallocate (int fd , int mode , off_t off , off_t len );
103
104
int __syscall_dup3 (int fd , int suggestfd , int flags );
104
105
int __syscall_pipe2 (intptr_t fds , int flags );
105
106
int __syscall_recvmmsg (int sockfd , intptr_t msgvec , size_t vlen , int flags , ...);
106
- int __syscall_prlimit64 (int pid , int resource , intptr_t new_limit , intptr_t old_limit );
107
+ int __syscall_prlimit64 (pid_t pid , int resource , intptr_t new_limit , intptr_t old_limit );
107
108
int __syscall_sendmmsg (int sockfd , intptr_t msgvec , size_t vlen , int flags , ...);
108
109
int __syscall_socket (int domain , int type , int protocol , int dummy1 , int dummy2 , int dummy3 );
109
110
int __syscall_socketpair (int domain , int type , int protocol , intptr_t fds , int dummy , int dummy2 );
0 commit comments