]>
git.proxmox.com Git - rustc.git/blob - vendor/libc/src/wasi.rs
8 pub type c_short
= i16;
9 pub type c_ushort
= u16;
10 pub type c_long
= i32;
11 pub type c_ulong
= u32;
12 pub type c_longlong
= i64;
13 pub type c_ulonglong
= u64;
14 pub type intmax_t
= i64;
15 pub type uintmax_t
= u64;
16 pub type size_t
= usize;
17 pub type ssize_t
= isize;
18 pub type ptrdiff_t
= isize;
19 pub type intptr_t
= isize;
20 pub type uintptr_t
= usize;
23 pub type clock_t
= c_longlong
;
24 pub type time_t
= c_longlong
;
25 pub type c_double
= f64;
26 pub type c_float
= f32;
28 pub type sigset_t
= c_uchar
;
29 pub type suseconds_t
= c_longlong
;
30 pub type mode_t
= u32;
34 pub type nlink_t
= u64;
35 pub type blksize_t
= c_long
;
36 pub type blkcnt_t
= i64;
37 pub type nfds_t
= c_ulong
;
38 pub type wchar_t
= i32;
40 pub type __wasi_rights_t
= u64;
42 #[allow(missing_copy_implementations)]
43 #[cfg_attr(feature = "extra_traits", derive(Debug))]
45 #[allow(missing_copy_implementations)]
46 #[cfg_attr(feature = "extra_traits", derive(Debug))]
48 #[allow(missing_copy_implementations)]
49 #[cfg_attr(feature = "extra_traits", derive(Debug))]
50 pub enum __locale_struct {}
52 pub type locale_t
= *mut __locale_struct
;
70 pub __tm_gmtoff
: c_int
,
71 pub __tm_zone
: *const c_char
,
77 pub tv_usec
: suseconds_t
,
86 pub tms_utime
: clock_t
,
87 pub tms_stime
: clock_t
,
88 pub tms_cutime
: clock_t
,
89 pub tms_cstime
: clock_t
,
92 pub struct itimerspec
{
93 pub it_interval
: timespec
,
94 pub it_value
: timespec
,
98 pub iov_base
: *mut c_void
,
103 pub decimal_point
: *mut c_char
,
104 pub thousands_sep
: *mut c_char
,
105 pub grouping
: *mut c_char
,
106 pub int_curr_symbol
: *mut c_char
,
107 pub currency_symbol
: *mut c_char
,
108 pub mon_decimal_point
: *mut c_char
,
109 pub mon_thousands_sep
: *mut c_char
,
110 pub mon_grouping
: *mut c_char
,
111 pub positive_sign
: *mut c_char
,
112 pub negative_sign
: *mut c_char
,
113 pub int_frac_digits
: c_char
,
114 pub frac_digits
: c_char
,
115 pub p_cs_precedes
: c_char
,
116 pub p_sep_by_space
: c_char
,
117 pub n_cs_precedes
: c_char
,
118 pub n_sep_by_space
: c_char
,
119 pub p_sign_posn
: c_char
,
120 pub n_sign_posn
: c_char
,
121 pub int_p_cs_precedes
: c_char
,
122 pub int_p_sep_by_space
: c_char
,
123 pub int_n_cs_precedes
: c_char
,
124 pub int_n_sep_by_space
: c_char
,
125 pub int_p_sign_posn
: c_char
,
126 pub int_n_sign_posn
: c_char
,
132 pub revents
: c_short
,
136 pub ru_utime
: timeval
,
137 pub ru_stime
: timeval
,
143 pub st_nlink
: nlink_t
,
150 pub st_blksize
: blksize_t
,
151 pub st_blocks
: blkcnt_t
,
152 pub st_atim
: timespec
,
153 pub st_mtim
: timespec
,
154 pub st_ctim
: timespec
,
155 __reserved
: [c_longlong
; 3],
159 // Declare dirent outside of s! so that it doesn't implement Copy, Eq, Hash,
160 // etc., since it contains a flexible array member with a dynamic size.
162 #[allow(missing_copy_implementations)]
163 #[cfg_attr(feature = "extra_traits", derive(Debug))]
167 /// d_name is declared in WASI libc as a flexible array member, which
168 /// can't be directly expressed in Rust. As an imperfect workaround,
169 /// declare it as a zero-length array instead.
170 pub d_name
: [c_char
; 0],
173 pub const EXIT_SUCCESS
: c_int
= 0;
174 pub const EXIT_FAILURE
: c_int
= 1;
175 pub const STDIN_FILENO
: c_int
= 0;
176 pub const STDOUT_FILENO
: c_int
= 1;
177 pub const STDERR_FILENO
: c_int
= 2;
178 pub const SEEK_SET
: c_int
= 0;
179 pub const SEEK_CUR
: c_int
= 1;
180 pub const SEEK_END
: c_int
= 2;
181 pub const _IOFBF
: c_int
= 0;
182 pub const _IONBF
: c_int
= 2;
183 pub const _IOLBF
: c_int
= 1;
184 pub const F_GETFD
: c_int
= 1;
185 pub const F_SETFD
: c_int
= 2;
186 pub const F_GETFL
: c_int
= 3;
187 pub const F_SETFL
: c_int
= 4;
188 pub const FD_CLOEXEC
: c_int
= 1;
189 pub const FD_SETSIZE
: size_t
= 1024;
190 pub const O_APPEND
: c_int
= 0x0001;
191 pub const O_DSYNC
: c_int
= 0x0002;
192 pub const O_NONBLOCK
: c_int
= 0x0004;
193 pub const O_RSYNC
: c_int
= 0x0008;
194 pub const O_SYNC
: c_int
= 0x0010;
195 pub const O_CREAT
: c_int
= 0x0001 << 12;
196 pub const O_DIRECTORY
: c_int
= 0x0002 << 12;
197 pub const O_EXCL
: c_int
= 0x0004 << 12;
198 pub const O_TRUNC
: c_int
= 0x0008 << 12;
199 pub const O_NOFOLLOW
: c_int
= 0x01000000;
200 pub const O_EXEC
: c_int
= 0x02000000;
201 pub const O_RDONLY
: c_int
= 0x04000000;
202 pub const O_SEARCH
: c_int
= 0x08000000;
203 pub const O_WRONLY
: c_int
= 0x10000000;
204 pub const O_RDWR
: c_int
= O_WRONLY
| O_RDONLY
;
205 pub const O_ACCMODE
: c_int
= O_EXEC
| O_RDWR
| O_SEARCH
;
206 pub const O_NOCTTY
: c_int
= 0x0;
207 pub const POSIX_FADV_DONTNEED
: c_int
= 4;
208 pub const POSIX_FADV_NOREUSE
: c_int
= 5;
209 pub const POSIX_FADV_NORMAL
: c_int
= 0;
210 pub const POSIX_FADV_RANDOM
: c_int
= 2;
211 pub const POSIX_FADV_SEQUENTIAL
: c_int
= 1;
212 pub const POSIX_FADV_WILLNEED
: c_int
= 3;
213 pub const AT_FDCWD
: ::c_int
= -2;
214 pub const AT_EACCESS
: c_int
= 0x0;
215 pub const AT_SYMLINK_NOFOLLOW
: c_int
= 0x1;
216 pub const AT_SYMLINK_FOLLOW
: c_int
= 0x2;
217 pub const AT_REMOVEDIR
: c_int
= 0x4;
218 pub const UTIME_OMIT
: c_long
= 0xfffffffe;
219 pub const UTIME_NOW
: c_long
= 0xffffffff;
220 pub const S_IFIFO
: mode_t
= 49152;
221 pub const S_IFCHR
: mode_t
= 8192;
222 pub const S_IFBLK
: mode_t
= 24576;
223 pub const S_IFDIR
: mode_t
= 16384;
224 pub const S_IFREG
: mode_t
= 32768;
225 pub const S_IFLNK
: mode_t
= 40960;
226 pub const S_IFSOCK
: mode_t
= 49152;
227 pub const S_IFMT
: mode_t
= 57344;
228 pub const DT_UNKNOWN
: u8 = 0;
229 pub const DT_BLK
: u8 = 1;
230 pub const DT_CHR
: u8 = 2;
231 pub const DT_DIR
: u8 = 3;
232 pub const DT_REG
: u8 = 4;
233 pub const DT_LNK
: u8 = 7;
234 pub const FIONREAD
: c_int
= 1;
235 pub const FIONBIO
: c_int
= 2;
236 pub const F_OK
: ::c_int
= 0;
237 pub const R_OK
: ::c_int
= 4;
238 pub const W_OK
: ::c_int
= 2;
239 pub const X_OK
: ::c_int
= 1;
240 pub const POLLIN
: ::c_short
= 0x1;
241 pub const POLLOUT
: ::c_short
= 0x2;
242 pub const POLLERR
: ::c_short
= 0x1000;
243 pub const POLLHUP
: ::c_short
= 0x2000;
244 pub const POLLNVAL
: ::c_short
= 0x4000;
245 pub const POLLRDNORM
: ::c_short
= 0x1;
246 pub const POLLWRNORM
: ::c_short
= 0x2;
248 pub const E2BIG
: c_int
= 1;
249 pub const EACCES
: c_int
= 2;
250 pub const EADDRINUSE
: c_int
= 3;
251 pub const EADDRNOTAVAIL
: c_int
= 4;
252 pub const EAFNOSUPPORT
: c_int
= 5;
253 pub const EAGAIN
: c_int
= 6;
254 pub const EALREADY
: c_int
= 7;
255 pub const EBADF
: c_int
= 8;
256 pub const EBADMSG
: c_int
= 9;
257 pub const EBUSY
: c_int
= 10;
258 pub const ECANCELED
: c_int
= 11;
259 pub const ECHILD
: c_int
= 12;
260 pub const ECONNABORTED
: c_int
= 13;
261 pub const ECONNREFUSED
: c_int
= 14;
262 pub const ECONNRESET
: c_int
= 15;
263 pub const EDEADLK
: c_int
= 16;
264 pub const EDESTADDRREQ
: c_int
= 17;
265 pub const EDOM
: c_int
= 18;
266 pub const EDQUOT
: c_int
= 19;
267 pub const EEXIST
: c_int
= 20;
268 pub const EFAULT
: c_int
= 21;
269 pub const EFBIG
: c_int
= 22;
270 pub const EHOSTUNREACH
: c_int
= 23;
271 pub const EIDRM
: c_int
= 24;
272 pub const EILSEQ
: c_int
= 25;
273 pub const EINPROGRESS
: c_int
= 26;
274 pub const EINTR
: c_int
= 27;
275 pub const EINVAL
: c_int
= 28;
276 pub const EIO
: c_int
= 29;
277 pub const EISCONN
: c_int
= 30;
278 pub const EISDIR
: c_int
= 31;
279 pub const ELOOP
: c_int
= 32;
280 pub const EMFILE
: c_int
= 33;
281 pub const EMLINK
: c_int
= 34;
282 pub const EMSGSIZE
: c_int
= 35;
283 pub const EMULTIHOP
: c_int
= 36;
284 pub const ENAMETOOLONG
: c_int
= 37;
285 pub const ENETDOWN
: c_int
= 38;
286 pub const ENETRESET
: c_int
= 39;
287 pub const ENETUNREACH
: c_int
= 40;
288 pub const ENFILE
: c_int
= 41;
289 pub const ENOBUFS
: c_int
= 42;
290 pub const ENODEV
: c_int
= 43;
291 pub const ENOENT
: c_int
= 44;
292 pub const ENOEXEC
: c_int
= 45;
293 pub const ENOLCK
: c_int
= 46;
294 pub const ENOLINK
: c_int
= 47;
295 pub const ENOMEM
: c_int
= 48;
296 pub const ENOMSG
: c_int
= 49;
297 pub const ENOPROTOOPT
: c_int
= 50;
298 pub const ENOSPC
: c_int
= 51;
299 pub const ENOSYS
: c_int
= 52;
300 pub const ENOTCONN
: c_int
= 53;
301 pub const ENOTDIR
: c_int
= 54;
302 pub const ENOTEMPTY
: c_int
= 55;
303 pub const ENOTRECOVERABLE
: c_int
= 56;
304 pub const ENOTSOCK
: c_int
= 57;
305 pub const ENOTSUP
: c_int
= 58;
306 pub const ENOTTY
: c_int
= 59;
307 pub const ENXIO
: c_int
= 60;
308 pub const EOVERFLOW
: c_int
= 61;
309 pub const EOWNERDEAD
: c_int
= 62;
310 pub const EPERM
: c_int
= 63;
311 pub const EPIPE
: c_int
= 64;
312 pub const EPROTO
: c_int
= 65;
313 pub const EPROTONOSUPPORT
: c_int
= 66;
314 pub const EPROTOTYPE
: c_int
= 67;
315 pub const ERANGE
: c_int
= 68;
316 pub const EROFS
: c_int
= 69;
317 pub const ESPIPE
: c_int
= 70;
318 pub const ESRCH
: c_int
= 71;
319 pub const ESTALE
: c_int
= 72;
320 pub const ETIMEDOUT
: c_int
= 73;
321 pub const ETXTBSY
: c_int
= 74;
322 pub const EXDEV
: c_int
= 75;
323 pub const ENOTCAPABLE
: c_int
= 76;
324 pub const EOPNOTSUPP
: c_int
= ENOTSUP
;
325 pub const EWOULDBLOCK
: c_int
= EAGAIN
;
327 pub const _SC_PAGESIZE
: c_int
= 30;
328 pub const _SC_PAGE_SIZE
: ::c_int
= _SC_PAGESIZE
;
329 pub const _SC_IOV_MAX
: c_int
= 60;
330 pub const _SC_SYMLOOP_MAX
: c_int
= 173;
333 feature
= "rustc-dep-of-std",
334 link(name
= "c", kind
= "static", cfg(target_feature
= "crt-static"))
337 feature
= "rustc-dep-of-std",
338 link(name
= "c", cfg(not(target_feature
= "crt-static")))
341 pub fn _Exit(code
: c_int
) -> !;
342 pub fn _exit(code
: c_int
) -> !;
344 pub fn aligned_alloc(a
: size_t
, b
: size_t
) -> *mut c_void
;
345 pub fn calloc(amt
: size_t
, amt2
: size_t
) -> *mut c_void
;
346 pub fn exit(code
: c_int
) -> !;
347 pub fn free(ptr
: *mut c_void
);
348 pub fn getenv(s
: *const c_char
) -> *mut c_char
;
349 pub fn malloc(amt
: size_t
) -> *mut c_void
;
350 pub fn malloc_usable_size(ptr
: *mut c_void
) -> size_t
;
351 pub fn sbrk(increment
: ::intptr_t
) -> *mut ::c_void
;
352 pub fn rand() -> c_int
;
353 pub fn read(fd
: c_int
, ptr
: *mut c_void
, size
: size_t
) -> ssize_t
;
354 pub fn realloc(ptr
: *mut c_void
, amt
: size_t
) -> *mut c_void
;
355 pub fn setenv(k
: *const c_char
, v
: *const c_char
, a
: c_int
) -> c_int
;
356 pub fn unsetenv(k
: *const c_char
) -> c_int
;
357 pub fn clearenv() -> ::c_int
;
358 pub fn write(fd
: c_int
, ptr
: *const c_void
, size
: size_t
) -> ssize_t
;
359 pub static mut environ
: *mut *mut c_char
;
360 pub fn fopen(a
: *const c_char
, b
: *const c_char
) -> *mut FILE
;
366 pub fn fclose(f
: *mut FILE
) -> c_int
;
367 pub fn remove(a
: *const c_char
) -> c_int
;
368 pub fn rename(a
: *const c_char
, b
: *const c_char
) -> c_int
;
369 pub fn feof(f
: *mut FILE
) -> c_int
;
370 pub fn ferror(f
: *mut FILE
) -> c_int
;
371 pub fn fflush(f
: *mut FILE
) -> c_int
;
372 pub fn clearerr(f
: *mut FILE
);
373 pub fn fseek(f
: *mut FILE
, b
: c_long
, c
: c_int
) -> c_int
;
374 pub fn ftell(f
: *mut FILE
) -> c_long
;
375 pub fn rewind(f
: *mut FILE
);
376 pub fn fgetpos(f
: *mut FILE
, pos
: *mut fpos_t
) -> c_int
;
377 pub fn fsetpos(f
: *mut FILE
, pos
: *const fpos_t
) -> c_int
;
390 pub fn fgetc(f
: *mut FILE
) -> c_int
;
391 pub fn getc(f
: *mut FILE
) -> c_int
;
392 pub fn getchar() -> c_int
;
393 pub fn ungetc(a
: c_int
, f
: *mut FILE
) -> c_int
;
394 pub fn fputc(a
: c_int
, f
: *mut FILE
) -> c_int
;
395 pub fn putc(a
: c_int
, f
: *mut FILE
) -> c_int
;
396 pub fn putchar(a
: c_int
) -> c_int
;
397 pub fn fputs(a
: *const c_char
, f
: *mut FILE
) -> c_int
;
398 pub fn puts(a
: *const c_char
) -> c_int
;
399 pub fn perror(a
: *const c_char
);
400 pub fn srand(a
: c_uint
);
401 pub fn atexit(a
: extern "C" fn()) -> c_int
;
402 pub fn at_quick_exit(a
: extern "C" fn()) -> c_int
;
403 pub fn quick_exit(a
: c_int
) -> !;
404 pub fn posix_memalign(a
: *mut *mut c_void
, b
: size_t
, c
: size_t
) -> c_int
;
405 pub fn rand_r(a
: *mut c_uint
) -> c_int
;
406 pub fn random() -> c_long
;
407 pub fn srandom(a
: c_uint
);
408 pub fn putenv(a
: *mut c_char
) -> c_int
;
409 pub fn clock() -> clock_t
;
410 pub fn time(a
: *mut time_t
) -> time_t
;
411 pub fn difftime(a
: time_t
, b
: time_t
) -> c_double
;
412 pub fn mktime(a
: *mut tm
) -> time_t
;
419 pub fn gmtime(a
: *const time_t
) -> *mut tm
;
420 pub fn gmtime_r(a
: *const time_t
, b
: *mut tm
) -> *mut tm
;
421 pub fn localtime(a
: *const time_t
) -> *mut tm
;
422 pub fn localtime_r(a
: *const time_t
, b
: *mut tm
) -> *mut tm
;
423 pub fn asctime_r(a
: *const tm
, b
: *mut c_char
) -> *mut c_char
;
424 pub fn ctime_r(a
: *const time_t
, b
: *mut c_char
) -> *mut c_char
;
426 pub fn nanosleep(a
: *const timespec
, b
: *mut timespec
) -> c_int
;
427 // pub fn clock_getres(a: clockid_t, b: *mut timespec) -> c_int;
428 // pub fn clock_gettime(a: clockid_t, b: *mut timespec) -> c_int;
429 // pub fn clock_nanosleep(
432 // b: *const timespec,
436 pub fn isalnum(c
: c_int
) -> c_int
;
437 pub fn isalpha(c
: c_int
) -> c_int
;
438 pub fn iscntrl(c
: c_int
) -> c_int
;
439 pub fn isdigit(c
: c_int
) -> c_int
;
440 pub fn isgraph(c
: c_int
) -> c_int
;
441 pub fn islower(c
: c_int
) -> c_int
;
442 pub fn isprint(c
: c_int
) -> c_int
;
443 pub fn ispunct(c
: c_int
) -> c_int
;
444 pub fn isspace(c
: c_int
) -> c_int
;
445 pub fn isupper(c
: c_int
) -> c_int
;
446 pub fn isxdigit(c
: c_int
) -> c_int
;
447 pub fn isblank(c
: c_int
) -> c_int
;
448 pub fn tolower(c
: c_int
) -> c_int
;
449 pub fn toupper(c
: c_int
) -> c_int
;
456 pub fn setbuf(stream
: *mut FILE
, buf
: *mut c_char
);
457 pub fn fgets(buf
: *mut c_char
, n
: c_int
, stream
: *mut FILE
)
459 pub fn atoi(s
: *const c_char
) -> c_int
;
460 pub fn atof(s
: *const c_char
) -> c_double
;
461 pub fn strtod(s
: *const c_char
, endp
: *mut *mut c_char
) -> c_double
;
464 endp
: *mut *mut c_char
,
469 endp
: *mut *mut c_char
,
473 pub fn strcpy(dst
: *mut c_char
, src
: *const c_char
) -> *mut c_char
;
479 pub fn strcat(s
: *mut c_char
, ct
: *const c_char
) -> *mut c_char
;
485 pub fn strcmp(cs
: *const c_char
, ct
: *const c_char
) -> c_int
;
486 pub fn strncmp(cs
: *const c_char
, ct
: *const c_char
, n
: size_t
) -> c_int
;
487 pub fn strcoll(cs
: *const c_char
, ct
: *const c_char
) -> c_int
;
488 pub fn strchr(cs
: *const c_char
, c
: c_int
) -> *mut c_char
;
489 pub fn strrchr(cs
: *const c_char
, c
: c_int
) -> *mut c_char
;
490 pub fn strspn(cs
: *const c_char
, ct
: *const c_char
) -> size_t
;
491 pub fn strcspn(cs
: *const c_char
, ct
: *const c_char
) -> size_t
;
492 pub fn strdup(cs
: *const c_char
) -> *mut c_char
;
493 pub fn strndup(cs
: *const c_char
, n
: size_t
) -> *mut c_char
;
494 pub fn strpbrk(cs
: *const c_char
, ct
: *const c_char
) -> *mut c_char
;
495 pub fn strstr(cs
: *const c_char
, ct
: *const c_char
) -> *mut c_char
;
496 pub fn strcasecmp(s1
: *const c_char
, s2
: *const c_char
) -> c_int
;
502 pub fn strlen(cs
: *const c_char
) -> size_t
;
503 pub fn strnlen(cs
: *const c_char
, maxlen
: size_t
) -> size_t
;
504 pub fn strerror(n
: c_int
) -> *mut c_char
;
505 pub fn strtok(s
: *mut c_char
, t
: *const c_char
) -> *mut c_char
;
506 pub fn strxfrm(s
: *mut c_char
, ct
: *const c_char
, n
: size_t
) -> size_t
;
508 pub fn memchr(cx
: *const c_void
, c
: c_int
, n
: size_t
) -> *mut c_void
;
509 pub fn memcmp(cx
: *const c_void
, ct
: *const c_void
, n
: size_t
) -> c_int
;
520 pub fn memset(dest
: *mut c_void
, c
: c_int
, n
: size_t
) -> *mut c_void
;
524 format
: *const ::c_char
,
527 pub fn printf(format
: *const ::c_char
, ...) -> ::c_int
;
531 format
: *const ::c_char
,
534 pub fn sprintf(s
: *mut ::c_char
, format
: *const ::c_char
, ...) -> ::c_int
;
537 format
: *const ::c_char
,
540 pub fn scanf(format
: *const ::c_char
, ...) -> ::c_int
;
541 pub fn sscanf(s
: *const ::c_char
, format
: *const ::c_char
, ...)
543 pub fn getchar_unlocked() -> ::c_int
;
544 pub fn putchar_unlocked(c
: ::c_int
) -> ::c_int
;
546 pub fn shutdown(socket
: ::c_int
, how
: ::c_int
) -> ::c_int
;
547 pub fn fstat(fildes
: ::c_int
, buf
: *mut stat
) -> ::c_int
;
548 pub fn mkdir(path
: *const c_char
, mode
: mode_t
) -> ::c_int
;
549 pub fn stat(path
: *const c_char
, buf
: *mut stat
) -> ::c_int
;
550 pub fn fdopen(fd
: ::c_int
, mode
: *const c_char
) -> *mut ::FILE
;
551 pub fn fileno(stream
: *mut ::FILE
) -> ::c_int
;
552 pub fn open(path
: *const c_char
, oflag
: ::c_int
, ...) -> ::c_int
;
553 pub fn creat(path
: *const c_char
, mode
: mode_t
) -> ::c_int
;
554 pub fn fcntl(fd
: ::c_int
, cmd
: ::c_int
, ...) -> ::c_int
;
555 pub fn opendir(dirname
: *const c_char
) -> *mut ::DIR
;
556 pub fn fdopendir(fd
: ::c_int
) -> *mut ::DIR
;
557 pub fn readdir(dirp
: *mut ::DIR
) -> *mut ::dirent
;
558 pub fn closedir(dirp
: *mut ::DIR
) -> ::c_int
;
559 pub fn rewinddir(dirp
: *mut ::DIR
);
560 pub fn dirfd(dirp
: *mut ::DIR
) -> ::c_int
;
561 pub fn seekdir(dirp
: *mut ::DIR
, loc
: ::c_long
);
562 pub fn telldir(dirp
: *mut ::DIR
) -> ::c_long
;
566 pathname
: *const ::c_char
,
572 pathname
: *const ::c_char
,
578 oldpath
: *const ::c_char
,
580 newpath
: *const ::c_char
,
585 pathname
: *const ::c_char
,
590 pathname
: *const ::c_char
,
596 oldpath
: *const ::c_char
,
598 newpath
: *const ::c_char
,
601 target
: *const ::c_char
,
603 linkpath
: *const ::c_char
,
607 pathname
: *const ::c_char
,
611 pub fn access(path
: *const c_char
, amode
: ::c_int
) -> ::c_int
;
612 pub fn close(fd
: ::c_int
) -> ::c_int
;
613 pub fn fpathconf(filedes
: ::c_int
, name
: ::c_int
) -> c_long
;
616 argv
: *const *mut c_char
,
617 optstr
: *const c_char
,
619 pub fn isatty(fd
: ::c_int
) -> ::c_int
;
620 pub fn link(src
: *const c_char
, dst
: *const c_char
) -> ::c_int
;
621 pub fn lseek(fd
: ::c_int
, offset
: off_t
, whence
: ::c_int
) -> off_t
;
622 pub fn pathconf(path
: *const c_char
, name
: ::c_int
) -> c_long
;
623 pub fn rmdir(path
: *const c_char
) -> ::c_int
;
624 pub fn sleep(secs
: ::c_uint
) -> ::c_uint
;
625 pub fn unlink(c
: *const c_char
) -> ::c_int
;
634 buf
: *const ::c_void
,
639 pub fn lstat(path
: *const c_char
, buf
: *mut stat
) -> ::c_int
;
641 pub fn fsync(fd
: ::c_int
) -> ::c_int
;
642 pub fn fdatasync(fd
: ::c_int
) -> ::c_int
;
644 pub fn symlink(path1
: *const c_char
, path2
: *const c_char
) -> ::c_int
;
646 pub fn truncate(path
: *const c_char
, length
: off_t
) -> ::c_int
;
647 pub fn ftruncate(fd
: ::c_int
, length
: off_t
) -> ::c_int
;
649 pub fn getrusage(resource
: ::c_int
, usage
: *mut rusage
) -> ::c_int
;
651 pub fn gettimeofday(tp
: *mut ::timeval
, tz
: *mut ::c_void
) -> ::c_int
;
652 pub fn times(buf
: *mut ::tms
) -> ::clock_t
;
660 pub fn usleep(secs
: ::c_uint
) -> ::c_int
;
663 buf
: *const ::c_void
,
673 pub fn poll(fds
: *mut pollfd
, nfds
: nfds_t
, timeout
: ::c_int
) -> ::c_int
;
676 locale
: *const ::c_char
,
678 pub fn localeconv() -> *mut lconv
;
686 pub fn timegm(tm
: *mut ::tm
) -> time_t
;
688 pub fn sysconf(name
: ::c_int
) -> ::c_long
;
690 pub fn ioctl(fd
: ::c_int
, request
: ::c_int
, ...) -> ::c_int
;
697 pub fn ftello(stream
: *mut ::FILE
) -> ::off_t
;
698 pub fn posix_fallocate(
704 pub fn strcasestr(cs
: *const c_char
, ct
: *const c_char
) -> *mut c_char
;
706 lineptr
: *mut *mut c_char
,
713 pathname
: *const ::c_char
,
739 pub fn posix_fadvise(
745 pub fn futimens(fd
: ::c_int
, times
: *const ::timespec
) -> ::c_int
;
748 path
: *const ::c_char
,
749 times
: *const ::timespec
,
752 pub fn getentropy(buf
: *mut ::c_void
, buflen
: ::size_t
) -> ::c_int
;
758 pub fn abs(i
: c_int
) -> c_int
;
759 pub fn labs(i
: c_long
) -> c_long
;
760 pub fn duplocale(base
: ::locale_t
) -> ::locale_t
;
761 pub fn freelocale(loc
: ::locale_t
);
764 locale
: *const ::c_char
,
767 pub fn uselocale(loc
: ::locale_t
) -> ::locale_t
;
768 pub fn sched_yield() -> ::c_int
;
770 pub fn __wasilibc_register_preopened_fd(
774 pub fn __wasilibc_fd_renumber(fd
: c_int
, newfd
: c_int
) -> c_int
;
775 pub fn __wasilibc_unlinkat(fd
: c_int
, path
: *const c_char
) -> c_int
;
776 pub fn __wasilibc_rmdirat(fd
: c_int
, path
: *const c_char
) -> c_int
;
777 pub fn __wasilibc_find_relpath(
779 abs_prefix
: *mut *const c_char
,
780 relative_path
: *mut *mut c_char
,
781 relative_path_len
: usize,
783 pub fn __wasilibc_tell(fd
: c_int
) -> ::off_t
;
784 pub fn __wasilibc_nocwd___wasilibc_unlinkat(
788 pub fn __wasilibc_nocwd___wasilibc_rmdirat(
792 pub fn __wasilibc_nocwd_linkat(
794 oldpath
: *const c_char
,
796 newpath
: *const c_char
,
799 pub fn __wasilibc_nocwd_symlinkat(
800 target
: *const c_char
,
804 pub fn __wasilibc_nocwd_readlinkat(
810 pub fn __wasilibc_nocwd_faccessat(
816 pub fn __wasilibc_nocwd_renameat(
818 oldpath
: *const c_char
,
820 newpath
: *const c_char
,
822 pub fn __wasilibc_nocwd_openat_nomode(
827 pub fn __wasilibc_nocwd_fstatat(
833 pub fn __wasilibc_nocwd_mkdirat_nomode(
837 pub fn __wasilibc_nocwd_utimensat(
840 times
: *const ::timespec
,
843 pub fn __wasilibc_nocwd_opendirat(
847 pub fn __wasilibc_access(
848 pathname
: *const c_char
,
852 pub fn __wasilibc_stat(
853 pathname
: *const c_char
,
857 pub fn __wasilibc_utimens(
858 pathname
: *const c_char
,
859 times
: *const ::timespec
,
862 pub fn __wasilibc_link(
863 oldpath
: *const c_char
,
864 newpath
: *const c_char
,
867 pub fn __wasilibc_link_oldat(
869 oldpath
: *const c_char
,
870 newpath
: *const c_char
,
873 pub fn __wasilibc_link_newat(
874 oldpath
: *const c_char
,
876 newpath
: *const c_char
,
879 pub fn __wasilibc_rename_oldat(
881 oldpath
: *const c_char
,
882 newpath
: *const c_char
,
884 pub fn __wasilibc_rename_newat(
885 oldpath
: *const c_char
,
887 newpath
: *const c_char
,
890 pub fn arc4random() -> u32;
891 pub fn arc4random_buf(a
: *mut c_void
, b
: size_t
);
892 pub fn arc4random_uniform(a
: u32) -> u32;