aboutsummaryrefslogtreecommitdiff
path: root/libc/src/fuchsia
diff options
context:
space:
mode:
authorDaniel Mueller <deso@posteo.net>2019-11-01 07:42:33 -0700
committerDaniel Mueller <deso@posteo.net>2019-11-01 07:42:33 -0700
commit49be10a8179165d24bbb8eb3490c4ca6f94b42c4 (patch)
tree642978648e57ba8b162a7378e8754df85ca83b37 /libc/src/fuchsia
parent9f3991a74fa5124e298582afa60b229dd005be40 (diff)
downloadnitrocli-49be10a8179165d24bbb8eb3490c4ca6f94b42c4.tar.gz
nitrocli-49be10a8179165d24bbb8eb3490c4ca6f94b42c4.tar.bz2
Update libc crate to 0.2.66
This change updates the libc crate to version 0.2.66. Import subrepo libc/:libc at 4f11029a68040c90acf771976b019c1ef273a8cd
Diffstat (limited to 'libc/src/fuchsia')
-rw-r--r--libc/src/fuchsia/align.rs2
-rw-r--r--libc/src/fuchsia/mod.rs1601
-rw-r--r--libc/src/fuchsia/no_align.rs2
3 files changed, 915 insertions, 690 deletions
diff --git a/libc/src/fuchsia/align.rs b/libc/src/fuchsia/align.rs
index bc97275..3409bf0 100644
--- a/libc/src/fuchsia/align.rs
+++ b/libc/src/fuchsia/align.rs
@@ -138,5 +138,5 @@ macro_rules! expand_align {
}
}
}
- }
+ };
}
diff --git a/libc/src/fuchsia/mod.rs b/libc/src/fuchsia/mod.rs
index f2f9844..7d23e67 100644
--- a/libc/src/fuchsia/mod.rs
+++ b/libc/src/fuchsia/mod.rs
@@ -95,20 +95,26 @@ pub type c_ulong = u64;
pub enum timezone {}
impl ::Copy for timezone {}
impl ::Clone for timezone {
- fn clone(&self) -> timezone { *self }
+ fn clone(&self) -> timezone {
+ *self
+ }
}
#[cfg_attr(feature = "extra_traits", derive(Debug))]
pub enum DIR {}
impl ::Copy for DIR {}
impl ::Clone for DIR {
- fn clone(&self) -> DIR { *self }
+ fn clone(&self) -> DIR {
+ *self
+ }
}
#[cfg_attr(feature = "extra_traits", derive(Debug))]
pub enum fpos64_t {} // TODO: fill this out with a struct
impl ::Copy for fpos64_t {}
impl ::Clone for fpos64_t {
- fn clone(&self) -> fpos64_t { *self }
+ fn clone(&self) -> fpos64_t {
+ *self
+ }
}
// PUB_STRUCT
@@ -1261,7 +1267,8 @@ cfg_if! {
self.sigev_value == other.sigev_value
&& self.sigev_signo == other.sigev_signo
&& self.sigev_notify == other.sigev_notify
- && self.sigev_notify_function == other.sigev_notify_function
+ && self.sigev_notify_function
+ == other.sigev_notify_function
&& self.sigev_notify_attributes
== other.sigev_notify_attributes
}
@@ -1853,13 +1860,13 @@ pub const TCOON: ::c_int = 1;
pub const TCIFLUSH: ::c_int = 0;
pub const TCOFLUSH: ::c_int = 1;
pub const TCIOFLUSH: ::c_int = 2;
-pub const NL0: ::c_int = 0x00000000;
-pub const NL1: ::c_int = 0x00000100;
+pub const NL0: ::c_int = 0x00000000;
+pub const NL1: ::c_int = 0x00000100;
pub const TAB0: ::c_int = 0x00000000;
-pub const CR0: ::c_int = 0x00000000;
-pub const FF0: ::c_int = 0x00000000;
-pub const BS0: ::c_int = 0x00000000;
-pub const VT0: ::c_int = 0x00000000;
+pub const CR0: ::c_int = 0x00000000;
+pub const FF0: ::c_int = 0x00000000;
+pub const BS0: ::c_int = 0x00000000;
+pub const VT0: ::c_int = 0x00000000;
pub const VERASE: usize = 2;
pub const VKILL: usize = 3;
pub const VINTR: usize = 0;
@@ -1880,11 +1887,11 @@ pub const OPOST: ::tcflag_t = 0x1;
pub const CS5: ::tcflag_t = 0x00000000;
pub const CRTSCTS: ::tcflag_t = 0x80000000;
pub const ECHO: ::tcflag_t = 0x00000008;
-pub const OCRNL: ::tcflag_t = 0o000010;
-pub const ONOCR: ::tcflag_t = 0o000020;
+pub const OCRNL: ::tcflag_t = 0o000010;
+pub const ONOCR: ::tcflag_t = 0o000020;
pub const ONLRET: ::tcflag_t = 0o000040;
-pub const OFILL: ::tcflag_t = 0o000100;
-pub const OFDEL: ::tcflag_t = 0o000200;
+pub const OFILL: ::tcflag_t = 0o000100;
+pub const OFDEL: ::tcflag_t = 0o000200;
pub const CLONE_VM: ::c_int = 0x100;
pub const CLONE_FS: ::c_int = 0x200;
@@ -2649,7 +2656,7 @@ pub const SFD_CLOEXEC: ::c_int = 0x080000;
pub const NCCS: usize = 32;
-pub const O_TRUNC: ::c_int = 0x00040000;
+pub const O_TRUNC: ::c_int = 0x00040000;
pub const O_NOATIME: ::c_int = 0x00002000;
pub const O_CLOEXEC: ::c_int = 0x00000100;
pub const O_TMPFILE: ::c_int = 0x00004000;
@@ -2778,12 +2785,12 @@ pub const CBAUD: ::tcflag_t = 0o0010017;
pub const TAB1: ::c_int = 0x00000800;
pub const TAB2: ::c_int = 0x00001000;
pub const TAB3: ::c_int = 0x00001800;
-pub const CR1: ::c_int = 0x00000200;
-pub const CR2: ::c_int = 0x00000400;
-pub const CR3: ::c_int = 0x00000600;
-pub const FF1: ::c_int = 0x00008000;
-pub const BS1: ::c_int = 0x00002000;
-pub const VT1: ::c_int = 0x00004000;
+pub const CR1: ::c_int = 0x00000200;
+pub const CR2: ::c_int = 0x00000400;
+pub const CR3: ::c_int = 0x00000600;
+pub const FF1: ::c_int = 0x00008000;
+pub const BS1: ::c_int = 0x00002000;
+pub const VT1: ::c_int = 0x00004000;
pub const VWERASE: usize = 14;
pub const VREPRINT: usize = 12;
pub const VSUSP: usize = 10;
@@ -2817,14 +2824,14 @@ pub const NOFLSH: ::tcflag_t = 0x00000080;
pub const CIBAUD: ::tcflag_t = 0o02003600000;
pub const CBAUDEX: ::tcflag_t = 0o010000;
pub const VSWTC: usize = 7;
-pub const OLCUC: ::tcflag_t = 0o000002;
-pub const NLDLY: ::tcflag_t = 0o000400;
-pub const CRDLY: ::tcflag_t = 0o003000;
+pub const OLCUC: ::tcflag_t = 0o000002;
+pub const NLDLY: ::tcflag_t = 0o000400;
+pub const CRDLY: ::tcflag_t = 0o003000;
pub const TABDLY: ::tcflag_t = 0o014000;
-pub const BSDLY: ::tcflag_t = 0o020000;
-pub const FFDLY: ::tcflag_t = 0o100000;
-pub const VTDLY: ::tcflag_t = 0o040000;
-pub const XTABS: ::tcflag_t = 0o014000;
+pub const BSDLY: ::tcflag_t = 0o020000;
+pub const FFDLY: ::tcflag_t = 0o100000;
+pub const VTDLY: ::tcflag_t = 0o040000;
+pub const XTABS: ::tcflag_t = 0o014000;
pub const B0: ::speed_t = 0o000000;
pub const B50: ::speed_t = 0o000001;
@@ -2882,13 +2889,13 @@ pub const RLIMIT_NPROC: ::c_int = 6;
pub const RLIMIT_MEMLOCK: ::c_int = 8;
pub const O_APPEND: ::c_int = 0x00100000;
-pub const O_CREAT: ::c_int = 0x00010000;
-pub const O_EXCL: ::c_int = 0x00020000;
+pub const O_CREAT: ::c_int = 0x00010000;
+pub const O_EXCL: ::c_int = 0x00020000;
pub const O_NOCTTY: ::c_int = 0x00000200;
pub const O_NONBLOCK: ::c_int = 0x00000010;
-pub const O_SYNC: ::c_int = (0x00000040 | O_DSYNC);
-pub const O_RSYNC: ::c_int = O_SYNC;
-pub const O_DSYNC: ::c_int = 0x00000020;
+pub const O_SYNC: ::c_int = (0x00000040 | O_DSYNC);
+pub const O_RSYNC: ::c_int = O_SYNC;
+pub const O_DSYNC: ::c_int = 0x00000020;
pub const SOCK_NONBLOCK: ::c_int = 2048;
@@ -3113,9 +3120,9 @@ pub const TIOCM_CD: ::c_int = TIOCM_CAR;
pub const TIOCM_RI: ::c_int = TIOCM_RNG;
pub const O_DIRECTORY: ::c_int = 0x00080000;
-pub const O_DIRECT: ::c_int = 0x00000800;
+pub const O_DIRECT: ::c_int = 0x00000800;
pub const O_LARGEFILE: ::c_int = 0x00001000;
-pub const O_NOFOLLOW: ::c_int = 0x00000080;
+pub const O_NOFOLLOW: ::c_int = 0x00000080;
// intentionally not public, only used for fd_set
cfg_if! {
@@ -3255,22 +3262,26 @@ f! {
#[link(name = "c")]
#[link(name = "fdio")]
-extern {}
+extern "C" {}
#[cfg_attr(feature = "extra_traits", derive(Debug))]
pub enum FILE {}
impl ::Copy for FILE {}
impl ::Clone for FILE {
- fn clone(&self) -> FILE { *self }
+ fn clone(&self) -> FILE {
+ *self
+ }
}
#[cfg_attr(feature = "extra_traits", derive(Debug))]
pub enum fpos_t {} // TODO: fill this out with a struct
impl ::Copy for fpos_t {}
impl ::Clone for fpos_t {
- fn clone(&self) -> fpos_t { *self }
+ fn clone(&self) -> fpos_t {
+ *self
+ }
}
-extern {
+extern "C" {
pub fn isalnum(c: c_int) -> c_int;
pub fn isalpha(c: c_int) -> c_int;
pub fn iscntrl(c: c_int) -> c_int;
@@ -3282,31 +3293,48 @@ extern {
pub fn isspace(c: c_int) -> c_int;
pub fn isupper(c: c_int) -> c_int;
pub fn isxdigit(c: c_int) -> c_int;
+ pub fn isblank(c: c_int) -> c_int;
pub fn tolower(c: c_int) -> c_int;
pub fn toupper(c: c_int) -> c_int;
pub fn fopen(filename: *const c_char, mode: *const c_char) -> *mut FILE;
- pub fn freopen(filename: *const c_char, mode: *const c_char,
- file: *mut FILE) -> *mut FILE;
+ pub fn freopen(
+ filename: *const c_char,
+ mode: *const c_char,
+ file: *mut FILE,
+ ) -> *mut FILE;
pub fn fflush(file: *mut FILE) -> c_int;
pub fn fclose(file: *mut FILE) -> c_int;
pub fn remove(filename: *const c_char) -> c_int;
pub fn rename(oldname: *const c_char, newname: *const c_char) -> c_int;
pub fn tmpfile() -> *mut FILE;
- pub fn setvbuf(stream: *mut FILE, buffer: *mut c_char, mode: c_int,
- size: size_t) -> c_int;
+ pub fn setvbuf(
+ stream: *mut FILE,
+ buffer: *mut c_char,
+ mode: c_int,
+ size: size_t,
+ ) -> c_int;
pub fn setbuf(stream: *mut FILE, buf: *mut c_char);
pub fn getchar() -> c_int;
pub fn putchar(c: c_int) -> c_int;
pub fn fgetc(stream: *mut FILE) -> c_int;
- pub fn fgets(buf: *mut c_char, n: c_int, stream: *mut FILE) -> *mut c_char;
+ pub fn fgets(buf: *mut c_char, n: c_int, stream: *mut FILE)
+ -> *mut c_char;
pub fn fputc(c: c_int, stream: *mut FILE) -> c_int;
pub fn fputs(s: *const c_char, stream: *mut FILE) -> c_int;
pub fn puts(s: *const c_char) -> c_int;
pub fn ungetc(c: c_int, stream: *mut FILE) -> c_int;
- pub fn fread(ptr: *mut c_void, size: size_t, nobj: size_t,
- stream: *mut FILE) -> size_t;
- pub fn fwrite(ptr: *const c_void, size: size_t, nobj: size_t,
- stream: *mut FILE) -> size_t;
+ pub fn fread(
+ ptr: *mut c_void,
+ size: size_t,
+ nobj: size_t,
+ stream: *mut FILE,
+ ) -> size_t;
+ pub fn fwrite(
+ ptr: *const c_void,
+ size: size_t,
+ nobj: size_t,
+ stream: *mut FILE,
+ ) -> size_t;
pub fn fseek(stream: *mut FILE, offset: c_long, whence: c_int) -> c_int;
pub fn ftell(stream: *mut FILE) -> c_long;
pub fn rewind(stream: *mut FILE);
@@ -3317,10 +3345,16 @@ extern {
pub fn perror(s: *const c_char);
pub fn atoi(s: *const c_char) -> c_int;
pub fn strtod(s: *const c_char, endp: *mut *mut c_char) -> c_double;
- pub fn strtol(s: *const c_char, endp: *mut *mut c_char,
- base: c_int) -> c_long;
- pub fn strtoul(s: *const c_char, endp: *mut *mut c_char,
- base: c_int) -> c_ulong;
+ pub fn strtol(
+ s: *const c_char,
+ endp: *mut *mut c_char,
+ base: c_int,
+ ) -> c_long;
+ pub fn strtoul(
+ s: *const c_char,
+ endp: *mut *mut c_char,
+ base: c_int,
+ ) -> c_ulong;
pub fn calloc(nobj: size_t, size: size_t) -> *mut c_void;
pub fn malloc(size: size_t) -> *mut c_void;
pub fn realloc(p: *mut c_void, size: size_t) -> *mut c_void;
@@ -3328,16 +3362,22 @@ extern {
pub fn abort() -> !;
pub fn exit(status: c_int) -> !;
pub fn _exit(status: c_int) -> !;
- pub fn atexit(cb: extern fn()) -> c_int;
+ pub fn atexit(cb: extern "C" fn()) -> c_int;
pub fn system(s: *const c_char) -> c_int;
pub fn getenv(s: *const c_char) -> *mut c_char;
pub fn strcpy(dst: *mut c_char, src: *const c_char) -> *mut c_char;
- pub fn strncpy(dst: *mut c_char, src: *const c_char,
- n: size_t) -> *mut c_char;
+ pub fn strncpy(
+ dst: *mut c_char,
+ src: *const c_char,
+ n: size_t,
+ ) -> *mut c_char;
pub fn strcat(s: *mut c_char, ct: *const c_char) -> *mut c_char;
- pub fn strncat(s: *mut c_char, ct: *const c_char,
- n: size_t) -> *mut c_char;
+ pub fn strncat(
+ s: *mut c_char,
+ ct: *const c_char,
+ n: size_t,
+ ) -> *mut c_char;
pub fn strcmp(cs: *const c_char, ct: *const c_char) -> c_int;
pub fn strncmp(cs: *const c_char, ct: *const c_char, n: size_t) -> c_int;
pub fn strcoll(cs: *const c_char, ct: *const c_char) -> c_int;
@@ -3354,15 +3394,24 @@ extern {
pub fn strtok(s: *mut c_char, t: *const c_char) -> *mut c_char;
pub fn strxfrm(s: *mut c_char, ct: *const c_char, n: size_t) -> size_t;
pub fn wcslen(buf: *const wchar_t) -> size_t;
- pub fn wcstombs(dest: *mut c_char, src: *const wchar_t,
- n: size_t) -> ::size_t;
+ pub fn wcstombs(
+ dest: *mut c_char,
+ src: *const wchar_t,
+ n: size_t,
+ ) -> ::size_t;
pub fn memchr(cx: *const c_void, c: c_int, n: size_t) -> *mut c_void;
pub fn memcmp(cx: *const c_void, ct: *const c_void, n: size_t) -> c_int;
- pub fn memcpy(dest: *mut c_void, src: *const c_void,
- n: size_t) -> *mut c_void;
- pub fn memmove(dest: *mut c_void, src: *const c_void,
- n: size_t) -> *mut c_void;
+ pub fn memcpy(
+ dest: *mut c_void,
+ src: *const c_void,
+ n: size_t,
+ ) -> *mut c_void;
+ pub fn memmove(
+ dest: *mut c_void,
+ src: *const c_void,
+ n: size_t,
+ ) -> *mut c_void;
pub fn memset(dest: *mut c_void, c: c_int, n: size_t) -> *mut c_void;
pub fn abs(i: c_int) -> c_int;
@@ -3374,36 +3423,73 @@ extern {
pub fn getpwnam(name: *const ::c_char) -> *mut passwd;
pub fn getpwuid(uid: ::uid_t) -> *mut passwd;
- pub fn fprintf(stream: *mut ::FILE,
- format: *const ::c_char, ...) -> ::c_int;
+ pub fn fprintf(
+ stream: *mut ::FILE,
+ format: *const ::c_char,
+ ...
+ ) -> ::c_int;
pub fn printf(format: *const ::c_char, ...) -> ::c_int;
- pub fn snprintf(s: *mut ::c_char, n: ::size_t,
- format: *const ::c_char, ...) -> ::c_int;
+ pub fn snprintf(
+ s: *mut ::c_char,
+ n: ::size_t,
+ format: *const ::c_char,
+ ...
+ ) -> ::c_int;
pub fn sprintf(s: *mut ::c_char, format: *const ::c_char, ...) -> ::c_int;
- pub fn fscanf(stream: *mut ::FILE, format: *const ::c_char, ...) -> ::c_int;
+ pub fn fscanf(
+ stream: *mut ::FILE,
+ format: *const ::c_char,
+ ...
+ ) -> ::c_int;
pub fn scanf(format: *const ::c_char, ...) -> ::c_int;
- pub fn sscanf(s: *const ::c_char, format: *const ::c_char, ...) -> ::c_int;
+ pub fn sscanf(s: *const ::c_char, format: *const ::c_char, ...)
+ -> ::c_int;
pub fn getchar_unlocked() -> ::c_int;
pub fn putchar_unlocked(c: ::c_int) -> ::c_int;
pub fn socket(domain: ::c_int, ty: ::c_int, protocol: ::c_int) -> ::c_int;
- pub fn connect(socket: ::c_int, address: *const sockaddr,
- len: socklen_t) -> ::c_int;
+ pub fn connect(
+ socket: ::c_int,
+ address: *const sockaddr,
+ len: socklen_t,
+ ) -> ::c_int;
pub fn listen(socket: ::c_int, backlog: ::c_int) -> ::c_int;
- pub fn accept(socket: ::c_int, address: *mut sockaddr,
- address_len: *mut socklen_t) -> ::c_int;
- pub fn getpeername(socket: ::c_int, address: *mut sockaddr,
- address_len: *mut socklen_t) -> ::c_int;
- pub fn getsockname(socket: ::c_int, address: *mut sockaddr,
- address_len: *mut socklen_t) -> ::c_int;
- pub fn setsockopt(socket: ::c_int, level: ::c_int, name: ::c_int,
- value: *const ::c_void,
- option_len: socklen_t) -> ::c_int;
- pub fn socketpair(domain: ::c_int, type_: ::c_int, protocol: ::c_int,
- socket_vector: *mut ::c_int) -> ::c_int;
- pub fn sendto(socket: ::c_int, buf: *const ::c_void, len: ::size_t,
- flags: ::c_int, addr: *const sockaddr,
- addrlen: socklen_t) -> ::ssize_t;
+ pub fn accept(
+ socket: ::c_int,
+ address: *mut sockaddr,
+ address_len: *mut socklen_t,
+ ) -> ::c_int;
+ pub fn getpeername(
+ socket: ::c_int,
+ address: *mut sockaddr,
+ address_len: *mut socklen_t,
+ ) -> ::c_int;
+ pub fn getsockname(
+ socket: ::c_int,
+ address: *mut sockaddr,
+ address_len: *mut socklen_t,
+ ) -> ::c_int;
+ pub fn setsockopt(
+ socket: ::c_int,
+ level: ::c_int,
+ name: ::c_int,
+ value: *const ::c_void,
+ option_len: socklen_t,
+ ) -> ::c_int;
+ pub fn socketpair(
+ domain: ::c_int,
+ type_: ::c_int,
+ protocol: ::c_int,
+ socket_vector: *mut ::c_int,
+ ) -> ::c_int;
+ pub fn sendto(
+ socket: ::c_int,
+ buf: *const ::c_void,
+ len: ::size_t,
+ flags: ::c_int,
+ addr: *const sockaddr,
+ addrlen: socklen_t,
+ ) -> ::ssize_t;
pub fn shutdown(socket: ::c_int, how: ::c_int) -> ::c_int;
pub fn chmod(path: *const c_char, mode: mode_t) -> ::c_int;
@@ -3425,73 +3511,114 @@ extern {
pub fn opendir(dirname: *const c_char) -> *mut ::DIR;
pub fn readdir(dirp: *mut ::DIR) -> *mut ::dirent;
- pub fn readdir_r(dirp: *mut ::DIR, entry: *mut ::dirent,
- result: *mut *mut ::dirent) -> ::c_int;
+ pub fn readdir_r(
+ dirp: *mut ::DIR,
+ entry: *mut ::dirent,
+ result: *mut *mut ::dirent,
+ ) -> ::c_int;
pub fn closedir(dirp: *mut ::DIR) -> ::c_int;
pub fn rewinddir(dirp: *mut ::DIR);
- pub fn openat(dirfd: ::c_int, pathname: *const ::c_char,
- flags: ::c_int, ...) -> ::c_int;
- pub fn fchmodat(dirfd: ::c_int, pathname: *const ::c_char,
- mode: ::mode_t, flags: ::c_int) -> ::c_int;
- pub fn fchown(fd: ::c_int,
- owner: ::uid_t,
- group: ::gid_t) -> ::c_int;
- pub fn fchownat(dirfd: ::c_int, pathname: *const ::c_char,
- owner: ::uid_t, group: ::gid_t,
- flags: ::c_int) -> ::c_int;
- pub fn fstatat(dirfd: ::c_int, pathname: *const ::c_char,
- buf: *mut stat, flags: ::c_int) -> ::c_int;
- pub fn linkat(olddirfd: ::c_int, oldpath: *const ::c_char,
- newdirfd: ::c_int, newpath: *const ::c_char,
- flags: ::c_int) -> ::c_int;
- pub fn mkdirat(dirfd: ::c_int, pathname: *const ::c_char,
- mode: ::mode_t) -> ::c_int;
- pub fn readlinkat(dirfd: ::c_int, pathname: *const ::c_char,
- buf: *mut ::c_char, bufsiz: ::size_t) -> ::ssize_t;
- pub fn renameat(olddirfd: ::c_int, oldpath: *const ::c_char,
- newdirfd: ::c_int, newpath: *const ::c_char)
- -> ::c_int;
- pub fn symlinkat(target: *const ::c_char, newdirfd: ::c_int,
- linkpath: *const ::c_char) -> ::c_int;
- pub fn unlinkat(dirfd: ::c_int, pathname: *const ::c_char,
- flags: ::c_int) -> ::c_int;
+ pub fn openat(
+ dirfd: ::c_int,
+ pathname: *const ::c_char,
+ flags: ::c_int,
+ ...
+ ) -> ::c_int;
+ pub fn fchmodat(
+ dirfd: ::c_int,
+ pathname: *const ::c_char,
+ mode: ::mode_t,
+ flags: ::c_int,
+ ) -> ::c_int;
+ pub fn fchown(fd: ::c_int, owner: ::uid_t, group: ::gid_t) -> ::c_int;
+ pub fn fchownat(
+ dirfd: ::c_int,
+ pathname: *const ::c_char,
+ owner: ::uid_t,
+ group: ::gid_t,
+ flags: ::c_int,
+ ) -> ::c_int;
+ pub fn fstatat(
+ dirfd: ::c_int,
+ pathname: *const ::c_char,
+ buf: *mut stat,
+ flags: ::c_int,
+ ) -> ::c_int;
+ pub fn linkat(
+ olddirfd: ::c_int,
+ oldpath: *const ::c_char,
+ newdirfd: ::c_int,
+ newpath: *const ::c_char,
+ flags: ::c_int,
+ ) -> ::c_int;
+ pub fn mkdirat(
+ dirfd: ::c_int,
+ pathname: *const ::c_char,
+ mode: ::mode_t,
+ ) -> ::c_int;
+ pub fn readlinkat(
+ dirfd: ::c_int,
+ pathname: *const ::c_char,
+ buf: *mut ::c_char,
+ bufsiz: ::size_t,
+ ) -> ::ssize_t;
+ pub fn renameat(
+ olddirfd: ::c_int,
+ oldpath: *const ::c_char,
+ newdirfd: ::c_int,
+ newpath: *const ::c_char,
+ ) -> ::c_int;
+ pub fn symlinkat(
+ target: *const ::c_char,
+ newdirfd: ::c_int,
+ linkpath: *const ::c_char,
+ ) -> ::c_int;
+ pub fn unlinkat(
+ dirfd: ::c_int,
+ pathname: *const ::c_char,
+ flags: ::c_int,
+ ) -> ::c_int;
pub fn access(path: *const c_char, amode: ::c_int) -> ::c_int;
pub fn alarm(seconds: ::c_uint) -> ::c_uint;
pub fn chdir(dir: *const c_char) -> ::c_int;
- pub fn fchdir(dirfd: ::c_int) -> ::c_int;
- pub fn chown(path: *const c_char, uid: uid_t,
- gid: gid_t) -> ::c_int;
- pub fn lchown(path: *const c_char, uid: uid_t,
- gid: gid_t) -> ::c_int;
+ pub fn chown(path: *const c_char, uid: uid_t, gid: gid_t) -> ::c_int;
+ pub fn lchown(path: *const c_char, uid: uid_t, gid: gid_t) -> ::c_int;
pub fn close(fd: ::c_int) -> ::c_int;
pub fn dup(fd: ::c_int) -> ::c_int;
pub fn dup2(src: ::c_int, dst: ::c_int) -> ::c_int;
- pub fn execl(path: *const c_char,
- arg0: *const c_char, ...) -> ::c_int;
- pub fn execle(path: *const ::c_char,
- arg0: *const ::c_char, ...) -> ::c_int;
- pub fn execlp(file: *const ::c_char,
- arg0: *const ::c_char, ...) -> ::c_int;
- pub fn execv(prog: *const c_char,
- argv: *const *const c_char) -> ::c_int;
- pub fn execve(prog: *const c_char, argv: *const *const c_char,
- envp: *const *const c_char)
- -> ::c_int;
- pub fn execvp(c: *const c_char,
- argv: *const *const c_char) -> ::c_int;
+ pub fn execl(path: *const c_char, arg0: *const c_char, ...) -> ::c_int;
+ pub fn execle(
+ path: *const ::c_char,
+ arg0: *const ::c_char,
+ ...
+ ) -> ::c_int;
+ pub fn execlp(
+ file: *const ::c_char,
+ arg0: *const ::c_char,
+ ...
+ ) -> ::c_int;
+ pub fn execv(prog: *const c_char, argv: *const *const c_char) -> ::c_int;
+ pub fn execve(
+ prog: *const c_char,
+ argv: *const *const c_char,
+ envp: *const *const c_char,
+ ) -> ::c_int;
+ pub fn execvp(c: *const c_char, argv: *const *const c_char) -> ::c_int;
pub fn fork() -> pid_t;
pub fn fpathconf(filedes: ::c_int, name: ::c_int) -> c_long;
pub fn getcwd(buf: *mut c_char, size: ::size_t) -> *mut c_char;
pub fn getegid() -> gid_t;
pub fn geteuid() -> uid_t;
pub fn getgid() -> gid_t;
- pub fn getgroups(ngroups_max: ::c_int, groups: *mut gid_t)
- -> ::c_int;
+ pub fn getgroups(ngroups_max: ::c_int, groups: *mut gid_t) -> ::c_int;
pub fn getlogin() -> *mut c_char;
- pub fn getopt(argc: ::c_int, argv: *const *mut c_char,
- optstr: *const c_char) -> ::c_int;
+ pub fn getopt(
+ argc: ::c_int,
+ argv: *const *mut c_char,
+ optstr: *const c_char,
+ ) -> ::c_int;
pub fn getpgid(pid: pid_t) -> pid_t;
pub fn getpgrp() -> pid_t;
pub fn getpid() -> pid_t;
@@ -3503,11 +3630,13 @@ extern {
pub fn pathconf(path: *const c_char, name: ::c_int) -> c_long;
pub fn pause() -> ::c_int;
pub fn pipe(fds: *mut ::c_int) -> ::c_int;
- pub fn posix_memalign(memptr: *mut *mut ::c_void,
- align: ::size_t,
- size: ::size_t) -> ::c_int;
+ pub fn posix_memalign(
+ memptr: *mut *mut ::c_void,
+ align: ::size_t,
+ size: ::size_t,
+ ) -> ::c_int;
pub fn read(fd: ::c_int, buf: *mut ::c_void, count: ::size_t)
- -> ::ssize_t;
+ -> ::ssize_t;
pub fn rmdir(path: *const c_char) -> ::c_int;
pub fn seteuid(uid: uid_t) -> ::c_int;
pub fn setegid(gid: gid_t) -> ::c_int;
@@ -3516,21 +3645,34 @@ extern {
pub fn setsid() -> pid_t;
pub fn setuid(uid: uid_t) -> ::c_int;
pub fn sleep(secs: ::c_uint) -> ::c_uint;
- pub fn nanosleep(rqtp: *const timespec,
- rmtp: *mut timespec) -> ::c_int;
+ pub fn nanosleep(rqtp: *const timespec, rmtp: *mut timespec) -> ::c_int;
pub fn tcgetpgrp(fd: ::c_int) -> pid_t;
pub fn tcsetpgrp(fd: ::c_int, pgrp: ::pid_t) -> ::c_int;
pub fn ttyname(fd: ::c_int) -> *mut c_char;
pub fn unlink(c: *const c_char) -> ::c_int;
pub fn wait(status: *mut ::c_int) -> pid_t;
- pub fn waitpid(pid: pid_t, status: *mut ::c_int, options: ::c_int)
- -> pid_t;
- pub fn write(fd: ::c_int, buf: *const ::c_void, count: ::size_t)
- -> ::ssize_t;
- pub fn pread(fd: ::c_int, buf: *mut ::c_void, count: ::size_t,
- offset: off_t) -> ::ssize_t;
- pub fn pwrite(fd: ::c_int, buf: *const ::c_void, count: ::size_t,
- offset: off_t) -> ::ssize_t;
+ pub fn waitpid(
+ pid: pid_t,
+ status: *mut ::c_int,
+ options: ::c_int,
+ ) -> pid_t;
+ pub fn write(
+ fd: ::c_int,
+ buf: *const ::c_void,
+ count: ::size_t,
+ ) -> ::ssize_t;
+ pub fn pread(
+ fd: ::c_int,
+ buf: *mut ::c_void,
+ count: ::size_t,
+ offset: off_t,
+ ) -> ::ssize_t;
+ pub fn pwrite(
+ fd: ::c_int,
+ buf: *const ::c_void,
+ count: ::size_t,
+ offset: off_t,
+ ) -> ::ssize_t;
pub fn umask(mask: mode_t) -> mode_t;
pub fn utime(file: *const c_char, buf: *const utimbuf) -> ::c_int;
@@ -3542,128 +3684,167 @@ extern {
pub fn mlockall(flags: ::c_int) -> ::c_int;
pub fn munlockall() -> ::c_int;
- pub fn mmap(addr: *mut ::c_void,
- len: ::size_t,
- prot: ::c_int,
- flags: ::c_int,
- fd: ::c_int,
- offset: off_t)
- -> *mut ::c_void;
+ pub fn mmap(
+ addr: *mut ::c_void,
+ len: ::size_t,
+ prot: ::c_int,
+ flags: ::c_int,
+ fd: ::c_int,
+ offset: off_t,
+ ) -> *mut ::c_void;
pub fn munmap(addr: *mut ::c_void, len: ::size_t) -> ::c_int;
pub fn if_nametoindex(ifname: *const c_char) -> ::c_uint;
- pub fn if_indextoname(ifindex: ::c_uint,
- ifname: *mut ::c_char) -> *mut ::c_char;
+ pub fn if_indextoname(
+ ifindex: ::c_uint,
+ ifname: *mut ::c_char,
+ ) -> *mut ::c_char;
pub fn lstat(path: *const c_char, buf: *mut stat) -> ::c_int;
pub fn fsync(fd: ::c_int) -> ::c_int;
- pub fn setenv(name: *const c_char, val: *const c_char,
- overwrite: ::c_int) -> ::c_int;
+ pub fn setenv(
+ name: *const c_char,
+ val: *const c_char,
+ overwrite: ::c_int,
+ ) -> ::c_int;
pub fn unsetenv(name: *const c_char) -> ::c_int;
- pub fn symlink(path1: *const c_char,
- path2: *const c_char) -> ::c_int;
+ pub fn symlink(path1: *const c_char, path2: *const c_char) -> ::c_int;
pub fn ftruncate(fd: ::c_int, length: off_t) -> ::c_int;
pub fn signal(signum: ::c_int, handler: sighandler_t) -> sighandler_t;
- pub fn getrlimit(resource: ::c_int, rlim: *mut rlimit) -> ::c_int;
- pub fn setrlimit(resource: ::c_int, rlim: *const rlimit) -> ::c_int;
- pub fn getrusage(resource: ::c_int, usage: *mut rusage) -> ::c_int;
-
- pub fn realpath(pathname: *const ::c_char, resolved: *mut ::c_char)
- -> *mut ::c_char;
+ pub fn realpath(
+ pathname: *const ::c_char,
+ resolved: *mut ::c_char,
+ ) -> *mut ::c_char;
pub fn flock(fd: ::c_int, operation: ::c_int) -> ::c_int;
- pub fn gettimeofday(tp: *mut ::timeval,
- tz: *mut ::c_void) -> ::c_int;
+ pub fn gettimeofday(tp: *mut ::timeval, tz: *mut ::c_void) -> ::c_int;
pub fn times(buf: *mut ::tms) -> ::clock_t;
pub fn pthread_self() -> ::pthread_t;
- pub fn pthread_join(native: ::pthread_t,
- value: *mut *mut ::c_void) -> ::c_int;
- pub fn pthread_exit(value: *mut ::c_void);
+ pub fn pthread_join(
+ native: ::pthread_t,
+ value: *mut *mut ::c_void,
+ ) -> ::c_int;
+ pub fn pthread_exit(value: *mut ::c_void) -> !;
pub fn pthread_attr_init(attr: *mut ::pthread_attr_t) -> ::c_int;
pub fn pthread_attr_destroy(attr: *mut ::pthread_attr_t) -> ::c_int;
- pub fn pthread_attr_setstacksize(attr: *mut ::pthread_attr_t,
- stack_size: ::size_t) -> ::c_int;
- pub fn pthread_attr_setdetachstate(attr: *mut ::pthread_attr_t,
- state: ::c_int) -> ::c_int;
+ pub fn pthread_attr_setstacksize(
+ attr: *mut ::pthread_attr_t,
+ stack_size: ::size_t,
+ ) -> ::c_int;
+ pub fn pthread_attr_setdetachstate(
+ attr: *mut ::pthread_attr_t,
+ state: ::c_int,
+ ) -> ::c_int;
pub fn pthread_detach(thread: ::pthread_t) -> ::c_int;
pub fn sched_yield() -> ::c_int;
- pub fn pthread_key_create(key: *mut pthread_key_t,
- dtor: ::Option<unsafe extern fn(*mut ::c_void)>)
- -> ::c_int;
+ pub fn pthread_key_create(
+ key: *mut pthread_key_t,
+ dtor: ::Option<unsafe extern "C" fn(*mut ::c_void)>,
+ ) -> ::c_int;
pub fn pthread_key_delete(key: pthread_key_t) -> ::c_int;
pub fn pthread_getspecific(key: pthread_key_t) -> *mut ::c_void;
- pub fn pthread_setspecific(key: pthread_key_t, value: *const ::c_void)
- -> ::c_int;
- pub fn pthread_mutex_init(lock: *mut pthread_mutex_t,
- attr: *const pthread_mutexattr_t) -> ::c_int;
+ pub fn pthread_setspecific(
+ key: pthread_key_t,
+ value: *const ::c_void,
+ ) -> ::c_int;
+ pub fn pthread_mutex_init(
+ lock: *mut pthread_mutex_t,
+ attr: *const pthread_mutexattr_t,
+ ) -> ::c_int;
pub fn pthread_mutex_destroy(lock: *mut pthread_mutex_t) -> ::c_int;
pub fn pthread_mutex_lock(lock: *mut pthread_mutex_t) -> ::c_int;
pub fn pthread_mutex_trylock(lock: *mut pthread_mutex_t) -> ::c_int;
pub fn pthread_mutex_unlock(lock: *mut pthread_mutex_t) -> ::c_int;
pub fn pthread_mutexattr_init(attr: *mut pthread_mutexattr_t) -> ::c_int;
- pub fn pthread_mutexattr_destroy(attr: *mut pthread_mutexattr_t) -> ::c_int;
- pub fn pthread_mutexattr_settype(attr: *mut pthread_mutexattr_t,
- _type: ::c_int) -> ::c_int;
-
- pub fn pthread_cond_init(cond: *mut pthread_cond_t,
- attr: *const pthread_condattr_t) -> ::c_int;
- pub fn pthread_cond_wait(cond: *mut pthread_cond_t,
- lock: *mut pthread_mutex_t) -> ::c_int;
- pub fn pthread_cond_timedwait(cond: *mut pthread_cond_t,
- lock: *mut pthread_mutex_t,
- abstime: *const ::timespec) -> ::c_int;
+ pub fn pthread_mutexattr_destroy(
+ attr: *mut pthread_mutexattr_t,
+ ) -> ::c_int;
+ pub fn pthread_mutexattr_settype(
+ attr: *mut pthread_mutexattr_t,
+ _type: ::c_int,
+ ) -> ::c_int;
+
+ pub fn pthread_cond_init(
+ cond: *mut pthread_cond_t,
+ attr: *const pthread_condattr_t,
+ ) -> ::c_int;
+ pub fn pthread_cond_wait(
+ cond: *mut pthread_cond_t,
+ lock: *mut pthread_mutex_t,
+ ) -> ::c_int;
+ pub fn pthread_cond_timedwait(
+ cond: *mut pthread_cond_t,
+ lock: *mut pthread_mutex_t,
+ abstime: *const ::timespec,
+ ) -> ::c_int;
pub fn pthread_cond_signal(cond: *mut pthread_cond_t) -> ::c_int;
pub fn pthread_cond_broadcast(cond: *mut pthread_cond_t) -> ::c_int;
pub fn pthread_cond_destroy(cond: *mut pthread_cond_t) -> ::c_int;
pub fn pthread_condattr_init(attr: *mut pthread_condattr_t) -> ::c_int;
pub fn pthread_condattr_destroy(attr: *mut pthread_condattr_t) -> ::c_int;
- pub fn pthread_rwlock_init(lock: *mut pthread_rwlock_t,
- attr: *const pthread_rwlockattr_t) -> ::c_int;
+ pub fn pthread_rwlock_init(
+ lock: *mut pthread_rwlock_t,
+ attr: *const pthread_rwlockattr_t,
+ ) -> ::c_int;
pub fn pthread_rwlock_destroy(lock: *mut pthread_rwlock_t) -> ::c_int;
pub fn pthread_rwlock_rdlock(lock: *mut pthread_rwlock_t) -> ::c_int;
pub fn pthread_rwlock_tryrdlock(lock: *mut pthread_rwlock_t) -> ::c_int;
pub fn pthread_rwlock_wrlock(lock: *mut pthread_rwlock_t) -> ::c_int;
pub fn pthread_rwlock_trywrlock(lock: *mut pthread_rwlock_t) -> ::c_int;
pub fn pthread_rwlock_unlock(lock: *mut pthread_rwlock_t) -> ::c_int;
- pub fn pthread_rwlockattr_init(attr: *mut pthread_rwlockattr_t) -> ::c_int;
- pub fn pthread_rwlockattr_destroy(attr: *mut pthread_rwlockattr_t)
- -> ::c_int;
- pub fn strerror_r(errnum: ::c_int, buf: *mut c_char,
- buflen: ::size_t) -> ::c_int;
-
- pub fn getsockopt(sockfd: ::c_int,
- level: ::c_int,
- optname: ::c_int,
- optval: *mut ::c_void,
- optlen: *mut ::socklen_t) -> ::c_int;
+ pub fn pthread_rwlockattr_init(attr: *mut pthread_rwlockattr_t)
+ -> ::c_int;
+ pub fn pthread_rwlockattr_destroy(
+ attr: *mut pthread_rwlockattr_t,
+ ) -> ::c_int;
+ pub fn strerror_r(
+ errnum: ::c_int,
+ buf: *mut c_char,
+ buflen: ::size_t,
+ ) -> ::c_int;
+
+ pub fn getsockopt(
+ sockfd: ::c_int,
+ level: ::c_int,
+ optname: ::c_int,
+ optval: *mut ::c_void,
+ optlen: *mut ::socklen_t,
+ ) -> ::c_int;
pub fn raise(signum: ::c_int) -> ::c_int;
- pub fn sigaction(signum: ::c_int,
- act: *const sigaction,
- oldact: *mut sigaction) -> ::c_int;
-
- pub fn utimes(filename: *const ::c_char,
- times: *const ::timeval) -> ::c_int;
- pub fn dlopen(filename: *const ::c_char,
- flag: ::c_int) -> *mut ::c_void;
+ pub fn sigaction(
+ signum: ::c_int,
+ act: *const sigaction,
+ oldact: *mut sigaction,
+ ) -> ::c_int;
+
+ pub fn utimes(
+ filename: *const ::c_char,
+ times: *const ::timeval,
+ ) -> ::c_int;
+ pub fn dlopen(filename: *const ::c_char, flag: ::c_int) -> *mut ::c_void;
pub fn dlerror() -> *mut ::c_char;
- pub fn dlsym(handle: *mut ::c_void,
- symbol: *const ::c_char) -> *mut ::c_void;
+ pub fn dlsym(
+ handle: *mut ::c_void,
+ symbol: *const ::c_char,
+ ) -> *mut ::c_void;
pub fn dlclose(handle: *mut ::c_void) -> ::c_int;
pub fn dladdr(addr: *const ::c_void, info: *mut Dl_info) -> ::c_int;
- pub fn getaddrinfo(node: *const c_char,
- service: *const c_char,
- hints: *const addrinfo,
- res: *mut *mut addrinfo) -> ::c_int;
+ pub fn getaddrinfo(
+ node: *const c_char,
+ service: *const c_char,
+ hints: *const addrinfo,
+ res: *mut *mut addrinfo,
+ ) -> ::c_int;
pub fn freeaddrinfo(res: *mut addrinfo);
pub fn gai_strerror(errcode: ::c_int) -> *const ::c_char;
pub fn res_init() -> ::c_int;
@@ -3675,46 +3856,64 @@ extern {
pub fn gmtime(time_p: *const time_t) -> *mut tm;
pub fn localtime(time_p: *const time_t) -> *mut tm;
- pub fn mknod(pathname: *const ::c_char, mode: ::mode_t,
- dev: ::dev_t) -> ::c_int;
+ pub fn mknod(
+ pathname: *const ::c_char,
+ mode: ::mode_t,
+ dev: ::dev_t,
+ ) -> ::c_int;
pub fn uname(buf: *mut ::utsname) -> ::c_int;
pub fn gethostname(name: *mut ::c_char, len: ::size_t) -> ::c_int;
- pub fn getservbyname(name: *const ::c_char,
- proto: *const ::c_char) -> *mut servent;
+ pub fn getservbyname(
+ name: *const ::c_char,
+ proto: *const ::c_char,
+ ) -> *mut servent;
pub fn getprotobyname(name: *const ::c_char) -> *mut protoent;
pub fn getprotobynumber(proto: ::c_int) -> *mut protoent;
- pub fn chroot(name: *const ::c_char) -> ::c_int;
pub fn usleep(secs: ::c_uint) -> ::c_int;
- pub fn send(socket: ::c_int, buf: *const ::c_void, len: ::size_t,
- flags: ::c_int) -> ::ssize_t;
- pub fn recv(socket: ::c_int, buf: *mut ::c_void, len: ::size_t,
- flags: ::c_int) -> ::ssize_t;
+ pub fn send(
+ socket: ::c_int,
+ buf: *const ::c_void,
+ len: ::size_t,
+ flags: ::c_int,
+ ) -> ::ssize_t;
+ pub fn recv(
+ socket: ::c_int,
+ buf: *mut ::c_void,
+ len: ::size_t,
+ flags: ::c_int,
+ ) -> ::ssize_t;
pub fn putenv(string: *mut c_char) -> ::c_int;
pub fn poll(fds: *mut pollfd, nfds: nfds_t, timeout: ::c_int) -> ::c_int;
- pub fn select(nfds: ::c_int,
- readfs: *mut fd_set,
- writefds: *mut fd_set,
- errorfds: *mut fd_set,
- timeout: *mut timeval) -> ::c_int;
- pub fn setlocale(category: ::c_int,
- locale: *const ::c_char) -> *mut ::c_char;
+ pub fn select(
+ nfds: ::c_int,
+ readfs: *mut fd_set,
+ writefds: *mut fd_set,
+ errorfds: *mut fd_set,
+ timeout: *mut timeval,
+ ) -> ::c_int;
+ pub fn setlocale(
+ category: ::c_int,
+ locale: *const ::c_char,
+ ) -> *mut ::c_char;
pub fn localeconv() -> *mut lconv;
pub fn sem_destroy(sem: *mut sem_t) -> ::c_int;
pub fn sem_wait(sem: *mut sem_t) -> ::c_int;
pub fn sem_trywait(sem: *mut sem_t) -> ::c_int;
pub fn sem_post(sem: *mut sem_t) -> ::c_int;
- pub fn sem_init(sem: *mut sem_t,
- pshared: ::c_int,
- value: ::c_uint)
- -> ::c_int;
+ pub fn sem_init(
+ sem: *mut sem_t,
+ pshared: ::c_int,
+ value: ::c_uint,
+ ) -> ::c_int;
pub fn statvfs(path: *const c_char, buf: *mut statvfs) -> ::c_int;
pub fn fstatvfs(fd: ::c_int, buf: *mut statvfs) -> ::c_int;
- pub fn readlink(path: *const c_char,
- buf: *mut c_char,
- bufsz: ::size_t)
- -> ::ssize_t;
+ pub fn readlink(
+ path: *const c_char,
+ buf: *mut c_char,
+ bufsz: ::size_t,
+ ) -> ::ssize_t;
pub fn sigemptyset(set: *mut sigset_t) -> ::c_int;
pub fn sigaddset(set: *mut sigset_t, signum: ::c_int) -> ::c_int;
@@ -3722,10 +3921,11 @@ extern {
pub fn sigdelset(set: *mut sigset_t, signum: ::c_int) -> ::c_int;
pub fn sigismember(set: *const sigset_t, signum: ::c_int) -> ::c_int;
- pub fn sigprocmask(how: ::c_int,
- set: *const sigset_t,
- oldset: *mut sigset_t)
- -> ::c_int;
+ pub fn sigprocmask(
+ how: ::c_int,
+ set: *const sigset_t,
+ oldset: *mut sigset_t,
+ ) -> ::c_int;
pub fn sigpending(set: *mut sigset_t) -> ::c_int;
pub fn timegm(tm: *mut ::tm) -> time_t;
@@ -3736,15 +3936,19 @@ extern {
pub fn mkfifo(path: *const c_char, mode: mode_t) -> ::c_int;
- pub fn pselect(nfds: ::c_int,
- readfs: *mut fd_set,
- writefds: *mut fd_set,
- errorfds: *mut fd_set,
- timeout: *const timespec,
- sigmask: *const sigset_t) -> ::c_int;
- pub fn fseeko(stream: *mut ::FILE,
- offset: ::off_t,
- whence: ::c_int) -> ::c_int;
+ pub fn pselect(
+ nfds: ::c_int,
+ readfs: *mut fd_set,
+ writefds: *mut fd_set,
+ errorfds: *mut fd_set,
+ timeout: *const timespec,
+ sigmask: *const sigset_t,
+ ) -> ::c_int;
+ pub fn fseeko(
+ stream: *mut ::FILE,
+ offset: ::off_t,
+ whence: ::c_int,
+ ) -> ::c_int;
pub fn ftello(stream: *mut ::FILE) -> ::off_t;
pub fn tcdrain(fd: ::c_int) -> ::c_int;
pub fn cfgetispeed(termios: *const ::termios) -> ::speed_t;
@@ -3754,9 +3958,11 @@ extern {
pub fn cfsetospeed(termios: *mut ::termios, speed: ::speed_t) -> ::c_int;
pub fn cfsetspeed(termios: *mut ::termios, speed: ::speed_t) -> ::c_int;
pub fn tcgetattr(fd: ::c_int, termios: *mut ::termios) -> ::c_int;
- pub fn tcsetattr(fd: ::c_int,
- optional_actions: ::c_int,
- termios: *const ::termios) -> ::c_int;
+ pub fn tcsetattr(
+ fd: ::c_int,
+ optional_actions: ::c_int,
+ termios: *const ::termios,
+ ) -> ::c_int;
pub fn tcflow(fd: ::c_int, action: ::c_int) -> ::c_int;
pub fn tcflush(fd: ::c_int, action: ::c_int) -> ::c_int;
pub fn tcgetsid(fd: ::c_int) -> ::pid_t;
@@ -3770,7 +3976,6 @@ extern {
pub fn closelog();
pub fn setlogmask(maskpri: ::c_int) -> ::c_int;
pub fn syslog(priority: ::c_int, message: *const ::c_char, ...);
- pub fn nice(incr: ::c_int) -> ::c_int;
pub fn grantpt(fd: ::c_int) -> ::c_int;
pub fn posix_openpt(flags: ::c_int) -> ::c_int;
@@ -3778,527 +3983,547 @@ extern {
pub fn unlockpt(fd: ::c_int) -> ::c_int;
pub fn fdatasync(fd: ::c_int) -> ::c_int;
- pub fn mincore(addr: *mut ::c_void, len: ::size_t,
- vec: *mut ::c_uchar) -> ::c_int;
pub fn clock_getres(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int;
pub fn clock_gettime(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int;
- pub fn clock_settime(clk_id: ::clockid_t, tp: *const ::timespec) -> ::c_int;
+ pub fn clock_settime(
+ clk_id: ::clockid_t,
+ tp: *const ::timespec,
+ ) -> ::c_int;
pub fn dirfd(dirp: *mut ::DIR) -> ::c_int;
- pub fn pthread_getattr_np(native: ::pthread_t,
- attr: *mut ::pthread_attr_t) -> ::c_int;
- pub fn pthread_attr_getstack(attr: *const ::pthread_attr_t,
- stackaddr: *mut *mut ::c_void,
- stacksize: *mut ::size_t) -> ::c_int;
+ pub fn pthread_getattr_np(
+ native: ::pthread_t,
+ attr: *mut ::pthread_attr_t,
+ ) -> ::c_int;
+ pub fn pthread_attr_getstack(
+ attr: *const ::pthread_attr_t,
+ stackaddr: *mut *mut ::c_void,
+ stacksize: *mut ::size_t,
+ ) -> ::c_int;
pub fn memalign(align: ::size_t, size: ::size_t) -> *mut ::c_void;
- pub fn setgroups(ngroups: ::size_t,
- ptr: *const ::gid_t) -> ::c_int;
+ pub fn setgroups(ngroups: ::size_t, ptr: *const ::gid_t) -> ::c_int;
pub fn pipe2(fds: *mut ::c_int, flags: ::c_int) -> ::c_int;
pub fn statfs(path: *const ::c_char, buf: *mut statfs) -> ::c_int;
- pub fn statfs64(path: *const ::c_char, buf: *mut statfs64) -> ::c_int;
pub fn fstatfs(fd: ::c_int, buf: *mut statfs) -> ::c_int;
- pub fn fstatfs64(fd: ::c_int, buf: *mut statfs64) -> ::c_int;
- pub fn statvfs64(path: *const ::c_char, buf: *mut statvfs64) -> ::c_int;
- pub fn fstatvfs64(fd: ::c_int, buf: *mut statvfs64) -> ::c_int;
- pub fn memrchr(cx: *const ::c_void,
- c: ::c_int,
- n: ::size_t) -> *mut ::c_void;
-
- pub fn posix_fadvise(fd: ::c_int, offset: ::off_t, len: ::off_t,
- advise: ::c_int) -> ::c_int;
+ pub fn memrchr(
+ cx: *const ::c_void,
+ c: ::c_int,
+ n: ::size_t,
+ ) -> *mut ::c_void;
+
+ pub fn posix_fadvise(
+ fd: ::c_int,
+ offset: ::off_t,
+ len: ::off_t,
+ advise: ::c_int,
+ ) -> ::c_int;
pub fn futimens(fd: ::c_int, times: *const ::timespec) -> ::c_int;
- pub fn utimensat(dirfd: ::c_int, path: *const ::c_char,
- times: *const ::timespec, flag: ::c_int) -> ::c_int;
+ pub fn utimensat(
+ dirfd: ::c_int,
+ path: *const ::c_char,
+ times: *const ::timespec,
+ flag: ::c_int,
+ ) -> ::c_int;
pub fn duplocale(base: ::locale_t) -> ::locale_t;
pub fn freelocale(loc: ::locale_t);
- pub fn newlocale(mask: ::c_int,
- locale: *const ::c_char,
- base: ::locale_t) -> ::locale_t;
+ pub fn newlocale(
+ mask: ::c_int,
+ locale: *const ::c_char,
+ base: ::locale_t,
+ ) -> ::locale_t;
pub fn uselocale(loc: ::locale_t) -> ::locale_t;
- pub fn creat64(path: *const c_char, mode: mode_t) -> ::c_int;
- pub fn fstat64(fildes: ::c_int, buf: *mut stat64) -> ::c_int;
- pub fn fstatat64(dirfd: ::c_int, pathname: *const c_char,
- buf: *mut stat64, flags: ::c_int) -> ::c_int;
- pub fn ftruncate64(fd: ::c_int, length: off64_t) -> ::c_int;
- pub fn getrlimit64(resource: ::c_int, rlim: *mut rlimit64) -> ::c_int;
- pub fn lseek64(fd: ::c_int, offset: off64_t, whence: ::c_int) -> off64_t;
- pub fn lstat64(path: *const c_char, buf: *mut stat64) -> ::c_int;
- pub fn mmap64(addr: *mut ::c_void,
- len: ::size_t,
- prot: ::c_int,
- flags: ::c_int,
- fd: ::c_int,
- offset: off64_t)
- -> *mut ::c_void;
- pub fn open64(path: *const c_char, oflag: ::c_int, ...) -> ::c_int;
- pub fn openat64(fd: ::c_int,
- path: *const c_char,
- oflag: ::c_int, ...) -> ::c_int;
- pub fn pread64(fd: ::c_int, buf: *mut ::c_void, count: ::size_t,
- offset: off64_t) -> ::ssize_t;
- pub fn preadv64(fd: ::c_int,
- iov: *const ::iovec,
- iovcnt: ::c_int,
- offset: ::off64_t) -> ::ssize_t;
- pub fn pwrite64(fd: ::c_int, buf: *const ::c_void, count: ::size_t,
- offset: off64_t) -> ::ssize_t;
- pub fn pwritev64(fd: ::c_int,
- iov: *const ::iovec,
- iovcnt: ::c_int,
- offset: ::off64_t) -> ::ssize_t;
- pub fn readdir64(dirp: *mut ::DIR) -> *mut ::dirent64;
- pub fn readdir64_r(dirp: *mut ::DIR, entry: *mut ::dirent64,
- result: *mut *mut ::dirent64) -> ::c_int;
- pub fn setrlimit64(resource: ::c_int, rlim: *const rlimit64) -> ::c_int;
- pub fn stat64(path: *const c_char, buf: *mut stat64) -> ::c_int;
- pub fn truncate64(path: *const c_char, length: off64_t) -> ::c_int;
pub fn fdopendir(fd: ::c_int) -> *mut ::DIR;
- pub fn mknodat(dirfd: ::c_int, pathname: *const ::c_char,
- mode: ::mode_t, dev: dev_t) -> ::c_int;
- pub fn pthread_condattr_getclock(attr: *const pthread_condattr_t,
- clock_id: *mut clockid_t) -> ::c_int;
- pub fn pthread_condattr_setclock(attr: *mut pthread_condattr_t,
- clock_id: ::clockid_t) -> ::c_int;
- pub fn pthread_condattr_setpshared(attr: *mut pthread_condattr_t,
- pshared: ::c_int) -> ::c_int;
- pub fn accept4(fd: ::c_int, addr: *mut ::sockaddr, len: *mut ::socklen_t,
- flg: ::c_int) -> ::c_int;
- pub fn pthread_mutexattr_setpshared(attr: *mut pthread_mutexattr_t,
- pshared: ::c_int) -> ::c_int;
- pub fn pthread_rwlockattr_getpshared(attr: *const pthread_rwlockattr_t,
- val: *mut ::c_int) -> ::c_int;
- pub fn pthread_rwlockattr_setpshared(attr: *mut pthread_rwlockattr_t,
- val: ::c_int) -> ::c_int;
- pub fn ptsname_r(fd: ::c_int,
- buf: *mut ::c_char,
- buflen: ::size_t) -> ::c_int;
+ pub fn mknodat(
+ dirfd: ::c_int,
+ pathname: *const ::c_char,
+ mode: ::mode_t,
+ dev: dev_t,
+ ) -> ::c_int;
+ pub fn pthread_condattr_getclock(
+ attr: *const pthread_condattr_t,
+ clock_id: *mut clockid_t,
+ ) -> ::c_int;
+ pub fn pthread_condattr_setclock(
+ attr: *mut pthread_condattr_t,
+ clock_id: ::clockid_t,
+ ) -> ::c_int;
+ pub fn accept4(
+ fd: ::c_int,
+ addr: *mut ::sockaddr,
+ len: *mut ::socklen_t,
+ flg: ::c_int,
+ ) -> ::c_int;
+ pub fn ptsname_r(
+ fd: ::c_int,
+ buf: *mut ::c_char,
+ buflen: ::size_t,
+ ) -> ::c_int;
pub fn clearenv() -> ::c_int;
- pub fn waitid(idtype: idtype_t, id: id_t, infop: *mut ::siginfo_t,
- options: ::c_int) -> ::c_int;
+ pub fn waitid(
+ idtype: idtype_t,
+ id: id_t,
+ infop: *mut ::siginfo_t,
+ options: ::c_int,
+ ) -> ::c_int;
pub fn setreuid(ruid: ::uid_t, euid: ::uid_t) -> ::c_int;
pub fn setregid(rgid: ::gid_t, egid: ::gid_t) -> ::c_int;
- pub fn getresuid(ruid: *mut ::uid_t, euid: *mut ::uid_t,
- suid: *mut ::uid_t) -> ::c_int;
- pub fn getresgid(rgid: *mut ::gid_t, egid: *mut ::gid_t,
- sgid: *mut ::gid_t) -> ::c_int;
+ pub fn getresuid(
+ ruid: *mut ::uid_t,
+ euid: *mut ::uid_t,
+ suid: *mut ::uid_t,
+ ) -> ::c_int;
+ pub fn getresgid(
+ rgid: *mut ::gid_t,
+ egid: *mut ::gid_t,
+ sgid: *mut ::gid_t,
+ ) -> ::c_int;
pub fn acct(filename: *const ::c_char) -> ::c_int;
pub fn brk(addr: *mut ::c_void) -> ::c_int;
- pub fn sbrk(increment: ::intptr_t) -> *mut ::c_void;
- pub fn vfork() -> ::pid_t;
pub fn setresgid(rgid: ::gid_t, egid: ::gid_t, sgid: ::gid_t) -> ::c_int;
pub fn setresuid(ruid: ::uid_t, euid: ::uid_t, suid: ::uid_t) -> ::c_int;
- pub fn wait4(pid: ::pid_t, status: *mut ::c_int, options: ::c_int,
- rusage: *mut ::rusage) -> ::pid_t;
- pub fn openpty(amaster: *mut ::c_int,
- aslave: *mut ::c_int,
- name: *mut ::c_char,
- termp: *const termios,
- winp: *const ::winsize) -> ::c_int;
- pub fn execvpe(file: *const ::c_char, argv: *const *const ::c_char,
- envp: *const *const ::c_char) -> ::c_int;
- pub fn fexecve(fd: ::c_int, argv: *const *const ::c_char,
- envp: *const *const ::c_char)
- -> ::c_int;
+ pub fn openpty(
+ amaster: *mut ::c_int,
+ aslave: *mut ::c_int,
+ name: *mut ::c_char,
+ termp: *const termios,
+ winp: *const ::winsize,
+ ) -> ::c_int;
+ pub fn execvpe(
+ file: *const ::c_char,
+ argv: *const *const ::c_char,
+ envp: *const *const ::c_char,
+ ) -> ::c_int;
+ pub fn fexecve(
+ fd: ::c_int,
+ argv: *const *const ::c_char,
+ envp: *const *const ::c_char,
+ ) -> ::c_int;
pub fn ioctl(fd: ::c_int, request: ::c_int, ...) -> ::c_int;
- pub fn ptrace(request: ::c_int, ...) -> ::c_long;
- pub fn getpriority(which: ::c_int, who: ::id_t) -> ::c_int;
- pub fn setpriority(which: ::c_int, who: ::id_t, prio: ::c_int) -> ::c_int;
-
- pub fn aio_read(aiocbp: *mut aiocb) -> ::c_int;
- pub fn aio_write(aiocbp: *mut aiocb) -> ::c_int;
- pub fn aio_fsync(op: ::c_int, aiocbp: *mut aiocb) -> ::c_int;
- pub fn aio_error(aiocbp: *const aiocb) -> ::c_int;
- pub fn aio_return(aiocbp: *mut aiocb) -> ::ssize_t;
- pub fn aio_suspend(aiocb_list: *const *const aiocb, nitems: ::c_int,
- timeout: *const ::timespec) -> ::c_int;
- pub fn aio_cancel(fd: ::c_int, aiocbp: *mut aiocb) -> ::c_int;
- pub fn lio_listio(mode: ::c_int, aiocb_list: *const *mut aiocb,
- nitems: ::c_int, sevp: *mut ::sigevent) -> ::c_int;
pub fn lutimes(file: *const ::c_char, times: *const ::timeval) -> ::c_int;
pub fn setpwent();
pub fn endpwent();
pub fn getpwent() -> *mut passwd;
- pub fn setspent();
- pub fn endspent();
- pub fn getspent() -> *mut spwd;
- pub fn getspnam(__name: *const ::c_char) -> *mut spwd;
- pub fn shm_open(name: *const c_char, oflag: ::c_int,
- mode: mode_t) -> ::c_int;
+ pub fn shm_open(
+ name: *const c_char,
+ oflag: ::c_int,
+ mode: mode_t,
+ ) -> ::c_int;
// System V IPC
pub fn shmget(key: ::key_t, size: ::size_t, shmflg: ::c_int) -> ::c_int;
- pub fn shmat(shmid: ::c_int,
- shmaddr: *const ::c_void,
- shmflg: ::c_int) -> *mut ::c_void;
+ pub fn shmat(
+ shmid: ::c_int,
+ shmaddr: *const ::c_void,
+ shmflg: ::c_int,
+ ) -> *mut ::c_void;
pub fn shmdt(shmaddr: *const ::c_void) -> ::c_int;
- pub fn shmctl(shmid: ::c_int,
- cmd: ::c_int,
- buf: *mut ::shmid_ds) -> ::c_int;
+ pub fn shmctl(
+ shmid: ::c_int,
+ cmd: ::c_int,
+ buf: *mut ::shmid_ds,
+ ) -> ::c_int;
pub fn ftok(pathname: *const ::c_char, proj_id: ::c_int) -> ::key_t;
pub fn semget(key: ::key_t, nsems: ::c_int, semflag: ::c_int) -> ::c_int;
- pub fn semop(semid: ::c_int,
- sops: *mut ::sembuf, nsops: ::size_t) -> ::c_int;
- pub fn semctl(semid: ::c_int,
- semnum: ::c_int, cmd: ::c_int, ...) -> ::c_int;
- pub fn msgctl(msqid: ::c_int, cmd: ::c_int, buf: *mut msqid_ds) -> ::c_int;
+ pub fn semop(
+ semid: ::c_int,
+ sops: *mut ::sembuf,
+ nsops: ::size_t,
+ ) -> ::c_int;
+ pub fn semctl(
+ semid: ::c_int,
+ semnum: ::c_int,
+ cmd: ::c_int,
+ ...
+ ) -> ::c_int;
+ pub fn msgctl(msqid: ::c_int, cmd: ::c_int, buf: *mut msqid_ds)
+ -> ::c_int;
pub fn msgget(key: ::key_t, msgflg: ::c_int) -> ::c_int;
- pub fn msgrcv(msqid: ::c_int, msgp: *mut ::c_void, msgsz: ::size_t,
- msgtyp: ::c_long, msgflg: ::c_int) -> ::ssize_t;
- pub fn msgsnd(msqid: ::c_int, msgp: *const ::c_void, msgsz: ::size_t,
- msgflg: ::c_int) -> ::c_int;
+ pub fn msgrcv(
+ msqid: ::c_int,
+ msgp: *mut ::c_void,
+ msgsz: ::size_t,
+ msgtyp: ::c_long,
+ msgflg: ::c_int,
+ ) -> ::ssize_t;
+ pub fn msgsnd(
+ msqid: ::c_int,
+ msgp: *const ::c_void,
+ msgsz: ::size_t,
+ msgflg: ::c_int,
+ ) -> ::c_int;
- pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int)
- -> ::c_int;
+ pub fn mprotect(
+ addr: *mut ::c_void,
+ len: ::size_t,
+ prot: ::c_int,
+ ) -> ::c_int;
pub fn __errno_location() -> *mut ::c_int;
- pub fn fopen64(filename: *const c_char,
- mode: *const c_char) -> *mut ::FILE;
- pub fn freopen64(filename: *const c_char, mode: *const c_char,
- file: *mut ::FILE) -> *mut ::FILE;
- pub fn tmpfile64() -> *mut ::FILE;
- pub fn fgetpos64(stream: *mut ::FILE, ptr: *mut fpos64_t) -> ::c_int;
- pub fn fsetpos64(stream: *mut ::FILE, ptr: *const fpos64_t) -> ::c_int;
- pub fn fseeko64(stream: *mut ::FILE,
- offset: ::off64_t,
- whence: ::c_int) -> ::c_int;
- pub fn ftello64(stream: *mut ::FILE) -> ::off64_t;
- pub fn fallocate(fd: ::c_int, mode: ::c_int,
- offset: ::off_t, len: ::off_t) -> ::c_int;
- pub fn posix_fallocate(fd: ::c_int, offset: ::off_t,
- len: ::off_t) -> ::c_int;
- pub fn readahead(fd: ::c_int, offset: ::off64_t,
- count: ::size_t) -> ::ssize_t;
- pub fn getxattr(path: *const c_char, name: *const c_char,
- value: *mut ::c_void, size: ::size_t) -> ::ssize_t;
- pub fn lgetxattr(path: *const c_char, name: *const c_char,
- value: *mut ::c_void, size: ::size_t) -> ::ssize_t;
- pub fn fgetxattr(filedes: ::c_int, name: *const c_char,
- value: *mut ::c_void, size: ::size_t) -> ::ssize_t;
- pub fn setxattr(path: *const c_char, name: *const c_char,
- value: *const ::c_void, size: ::size_t,
- flags: ::c_int) -> ::c_int;
- pub fn lsetxattr(path: *const c_char, name: *const c_char,
- value: *const ::c_void, size: ::size_t,
- flags: ::c_int) -> ::c_int;
- pub fn fsetxattr(filedes: ::c_int, name: *const c_char,
- value: *const ::c_void, size: ::size_t,
- flags: ::c_int) -> ::c_int;
- pub fn listxattr(path: *const c_char, list: *mut c_char,
- size: ::size_t) -> ::ssize_t;
- pub fn llistxattr(path: *const c_char, list: *mut c_char,
- size: ::size_t) -> ::ssize_t;
- pub fn flistxattr(filedes: ::c_int, list: *mut c_char,
- size: ::size_t) -> ::ssize_t;
- pub fn removexattr(path: *const c_char, name: *const c_char) -> ::c_int;
- pub fn lremovexattr(path: *const c_char, name: *const c_char) -> ::c_int;
- pub fn fremovexattr(filedes: ::c_int, name: *const c_char) -> ::c_int;
- pub fn signalfd(fd: ::c_int,
- mask: *const ::sigset_t,
- flags: ::c_int) -> ::c_int;
+ pub fn fallocate(
+ fd: ::c_int,
+ mode: ::c_int,
+ offset: ::off_t,
+ len: ::off_t,
+ ) -> ::c_int;
+ pub fn posix_fallocate(
+ fd: ::c_int,
+ offset: ::off_t,
+ len: ::off_t,
+ ) -> ::c_int;
+ pub fn readahead(
+ fd: ::c_int,
+ offset: ::off64_t,
+ count: ::size_t,
+ ) -> ::ssize_t;
+ pub fn signalfd(
+ fd: ::c_int,
+ mask: *const ::sigset_t,
+ flags: ::c_int,
+ ) -> ::c_int;
pub fn timerfd_create(clockid: ::c_int, flags: ::c_int) -> ::c_int;
- pub fn timerfd_gettime(fd: ::c_int,
- curr_value: *mut itimerspec) -> ::c_int;
- pub fn timerfd_settime(fd: ::c_int,
- flags: ::c_int,
- new_value: *const itimerspec,
- old_value: *mut itimerspec) -> ::c_int;
- pub fn pwritev(fd: ::c_int,
- iov: *const ::iovec,
- iovcnt: ::c_int,
- offset: ::off_t) -> ::ssize_t;
- pub fn preadv(fd: ::c_int,
- iov: *const ::iovec,
- iovcnt: ::c_int,
- offset: ::off_t) -> ::ssize_t;
- pub fn quotactl(cmd: ::c_int,
- special: *const ::c_char,
- id: ::c_int,
- data: *mut ::c_char) -> ::c_int;
- pub fn mq_open(name: *const ::c_char, oflag: ::c_int, ...) -> ::mqd_t;
- pub fn mq_close(mqd: ::mqd_t) -> ::c_int;
- pub fn mq_unlink(name: *const ::c_char) -> ::c_int;
- pub fn mq_receive(mqd: ::mqd_t,
- msg_ptr: *mut ::c_char,
- msg_len: ::size_t,
- msq_prio: *mut ::c_uint) -> ::ssize_t;
- pub fn mq_send(mqd: ::mqd_t,
- msg_ptr: *const ::c_char,
- msg_len: ::size_t,
- msq_prio: ::c_uint) -> ::c_int;
- pub fn mq_getattr(mqd: ::mqd_t, attr: *mut ::mq_attr) -> ::c_int;
- pub fn mq_setattr(mqd: ::mqd_t,
- newattr: *const ::mq_attr,
- oldattr: *mut ::mq_attr) -> ::c_int;
- pub fn epoll_pwait(epfd: ::c_int,
- events: *mut ::epoll_event,
- maxevents: ::c_int,
- timeout: ::c_int,
- sigmask: *const ::sigset_t) -> ::c_int;
+ pub fn timerfd_gettime(
+ fd: ::c_int,
+ curr_value: *mut itimerspec,
+ ) -> ::c_int;
+ pub fn timerfd_settime(
+ fd: ::c_int,
+ flags: ::c_int,
+ new_value: *const itimerspec,
+ old_value: *mut itimerspec,
+ ) -> ::c_int;
+ pub fn pwritev(
+ fd: ::c_int,
+ iov: *const ::iovec,
+ iovcnt: ::c_int,
+ offset: ::off_t,
+ ) -> ::ssize_t;
+ pub fn preadv(
+ fd: ::c_int,
+ iov: *const ::iovec,
+ iovcnt: ::c_int,
+ offset: ::off_t,
+ ) -> ::ssize_t;
+ pub fn quotactl(
+ cmd: ::c_int,
+ special: *const ::c_char,
+ id: ::c_int,
+ data: *mut ::c_char,
+ ) -> ::c_int;
pub fn dup3(oldfd: ::c_int, newfd: ::c_int, flags: ::c_int) -> ::c_int;
pub fn mkostemp(template: *mut ::c_char, flags: ::c_int) -> ::c_int;
- pub fn mkostemps(template: *mut ::c_char,
- suffixlen: ::c_int,
- flags: ::c_int) -> ::c_int;
- pub fn sigtimedwait(set: *const sigset_t,
- info: *mut siginfo_t,
- timeout: *const ::timespec) -> ::c_int;
- pub fn sigwaitinfo(set: *const sigset_t,
- info: *mut siginfo_t) -> ::c_int;
- pub fn nl_langinfo_l(item: ::nl_item, locale: ::locale_t) -> *mut ::c_char;
- pub fn getnameinfo(sa: *const ::sockaddr,
- salen: ::socklen_t,
- host: *mut ::c_char,
- hostlen: ::socklen_t,
- serv: *mut ::c_char,
- sevlen: ::socklen_t,
- flags: ::c_int) -> ::c_int;
- pub fn pthread_setschedprio(native: ::pthread_t,
- priority: ::c_int) -> ::c_int;
- pub fn prlimit(pid: ::pid_t, resource: ::c_int, new_limit: *const ::rlimit,
- old_limit: *mut ::rlimit) -> ::c_int;
- pub fn prlimit64(pid: ::pid_t,
- resource: ::c_int,
- new_limit: *const ::rlimit64,
- old_limit: *mut ::rlimit64) -> ::c_int;
- pub fn getloadavg(loadavg: *mut ::c_double, nelem: ::c_int) -> ::c_int;
- pub fn process_vm_readv(pid: ::pid_t,
- local_iov: *const ::iovec,
- liovcnt: ::c_ulong,
- remote_iov: *const ::iovec,
- riovcnt: ::c_ulong,
- flags: ::c_ulong) -> isize;
- pub fn process_vm_writev(pid: ::pid_t,
- local_iov: *const ::iovec,
- liovcnt: ::c_ulong,
- remote_iov: *const ::iovec,
- riovcnt: ::c_ulong,
- flags: ::c_ulong) -> isize;
+ pub fn mkostemps(
+ template: *mut ::c_char,
+ suffixlen: ::c_int,
+ flags: ::c_int,
+ ) -> ::c_int;
+ pub fn sigtimedwait(
+ set: *const sigset_t,
+ info: *mut siginfo_t,
+ timeout: *const ::timespec,
+ ) -> ::c_int;
+ pub fn sigwaitinfo(set: *const sigset_t, info: *mut siginfo_t) -> ::c_int;
+ pub fn nl_langinfo_l(item: ::nl_item, locale: ::locale_t)
+ -> *mut ::c_char;
+ pub fn getnameinfo(
+ sa: *const ::sockaddr,
+ salen: ::socklen_t,
+ host: *mut ::c_char,
+ hostlen: ::socklen_t,
+ serv: *mut ::c_char,
+ sevlen: ::socklen_t,
+ flags: ::c_int,
+ ) -> ::c_int;
pub fn reboot(how_to: ::c_int) -> ::c_int;
pub fn setfsgid(gid: ::gid_t) -> ::c_int;
pub fn setfsuid(uid: ::uid_t) -> ::c_int;
// Not available now on Android
- pub fn mkfifoat(dirfd: ::c_int, pathname: *const ::c_char,
- mode: ::mode_t) -> ::c_int;
+ pub fn mkfifoat(
+ dirfd: ::c_int,
+ pathname: *const ::c_char,
+ mode: ::mode_t,
+ ) -> ::c_int;
pub fn if_nameindex() -> *mut if_nameindex;
pub fn if_freenameindex(ptr: *mut if_nameindex);
- pub fn sync_file_range(fd: ::c_int, offset: ::off64_t,
- nbytes: ::off64_t, flags: ::c_uint) -> ::c_int;
+ pub fn sync_file_range(
+ fd: ::c_int,
+ offset: ::off64_t,
+ nbytes: ::off64_t,
+ flags: ::c_uint,
+ ) -> ::c_int;
pub fn getifaddrs(ifap: *mut *mut ::ifaddrs) -> ::c_int;
pub fn freeifaddrs(ifa: *mut ::ifaddrs);
- pub fn mremap(addr: *mut ::c_void,
- len: ::size_t,
- new_len: ::size_t,
- flags: ::c_int,
- ...) -> *mut ::c_void;
-
- pub fn glob(pattern: *const c_char,
- flags: ::c_int,
- errfunc: ::Option<extern fn(epath: *const c_char,
- errno: ::c_int) -> ::c_int>,
- pglob: *mut ::glob_t) -> ::c_int;
+ pub fn glob(
+ pattern: *const c_char,
+ flags: ::c_int,
+ errfunc: ::Option<
+ extern "C" fn(epath: *const c_char, errno: ::c_int) -> ::c_int,
+ >,
+ pglob: *mut ::glob_t,
+ ) -> ::c_int;
pub fn globfree(pglob: *mut ::glob_t);
- pub fn posix_madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int)
- -> ::c_int;
+ pub fn posix_madvise(
+ addr: *mut ::c_void,
+ len: ::size_t,
+ advice: ::c_int,
+ ) -> ::c_int;
pub fn shm_unlink(name: *const ::c_char) -> ::c_int;
pub fn seekdir(dirp: *mut ::DIR, loc: ::c_long);
pub fn telldir(dirp: *mut ::DIR) -> ::c_long;
- pub fn madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int)
- -> ::c_int;
+ pub fn madvise(
+ addr: *mut ::c_void,
+ len: ::size_t,
+ advice: ::c_int,
+ ) -> ::c_int;
- pub fn msync(addr: *mut ::c_void, len: ::size_t, flags: ::c_int) -> ::c_int;
+ pub fn msync(
+ addr: *mut ::c_void,
+ len: ::size_t,
+ flags: ::c_int,
+ ) -> ::c_int;
- pub fn recvfrom(socket: ::c_int, buf: *mut ::c_void, len: ::size_t,
- flags: ::c_int, addr: *mut ::sockaddr,
- addrlen: *mut ::socklen_t) -> ::ssize_t;
+ pub fn recvfrom(
+ socket: ::c_int,
+ buf: *mut ::c_void,
+ len: ::size_t,
+ flags: ::c_int,
+ addr: *mut ::sockaddr,
+ addrlen: *mut ::socklen_t,
+ ) -> ::ssize_t;
pub fn mkstemps(template: *mut ::c_char, suffixlen: ::c_int) -> ::c_int;
pub fn futimes(fd: ::c_int, times: *const ::timeval) -> ::c_int;
pub fn nl_langinfo(item: ::nl_item) -> *mut ::c_char;
- pub fn bind(socket: ::c_int, address: *const ::sockaddr,
- address_len: ::socklen_t) -> ::c_int;
-
- pub fn writev(fd: ::c_int,
- iov: *const ::iovec,
- iovcnt: ::c_int) -> ::ssize_t;
- pub fn readv(fd: ::c_int,
- iov: *const ::iovec,
- iovcnt: ::c_int) -> ::ssize_t;
-
- pub fn sendmsg(fd: ::c_int,
- msg: *const ::msghdr,
- flags: ::c_int) -> ::ssize_t;
- pub fn recvmsg(fd: ::c_int, msg: *mut ::msghdr, flags: ::c_int)
- -> ::ssize_t;
+ pub fn bind(
+ socket: ::c_int,
+ address: *const ::sockaddr,
+ address_len: ::socklen_t,
+ ) -> ::c_int;
+
+ pub fn writev(
+ fd: ::c_int,
+ iov: *const ::iovec,
+ iovcnt: ::c_int,
+ ) -> ::ssize_t;
+ pub fn readv(
+ fd: ::c_int,
+ iov: *const ::iovec,
+ iovcnt: ::c_int,
+ ) -> ::ssize_t;
+
+ pub fn sendmsg(
+ fd: ::c_int,
+ msg: *const ::msghdr,
+ flags: ::c_int,
+ ) -> ::ssize_t;
+ pub fn recvmsg(
+ fd: ::c_int,
+ msg: *mut ::msghdr,
+ flags: ::c_int,
+ ) -> ::ssize_t;
pub fn getdomainname(name: *mut ::c_char, len: ::size_t) -> ::c_int;
pub fn setdomainname(name: *const ::c_char, len: ::size_t) -> ::c_int;
pub fn vhangup() -> ::c_int;
- pub fn sendmmsg(sockfd: ::c_int, msgvec: *mut mmsghdr, vlen: ::c_uint,
- flags: ::c_int) -> ::c_int;
- pub fn recvmmsg(sockfd: ::c_int, msgvec: *mut mmsghdr, vlen: ::c_uint,
- flags: ::c_int, timeout: *mut ::timespec) -> ::c_int;
+ pub fn sendmmsg(
+ sockfd: ::c_int,
+ msgvec: *mut mmsghdr,
+ vlen: ::c_uint,
+ flags: ::c_int,
+ ) -> ::c_int;
+ pub fn recvmmsg(
+ sockfd: ::c_int,
+ msgvec: *mut mmsghdr,
+ vlen: ::c_uint,
+ flags: ::c_int,
+ timeout: *mut ::timespec,
+ ) -> ::c_int;
pub fn sync();
pub fn syscall(num: ::c_long, ...) -> ::c_long;
- pub fn sched_getaffinity(pid: ::pid_t,
- cpusetsize: ::size_t,
- cpuset: *mut cpu_set_t) -> ::c_int;
- pub fn sched_setaffinity(pid: ::pid_t,
- cpusetsize: ::size_t,
- cpuset: *const cpu_set_t) -> ::c_int;
- pub fn epoll_create(size: ::c_int) -> ::c_int;
- pub fn epoll_create1(flags: ::c_int) -> ::c_int;
- pub fn epoll_wait(epfd: ::c_int,
- events: *mut ::epoll_event,
- maxevents: ::c_int,
- timeout: ::c_int) -> ::c_int;
- pub fn epoll_ctl(epfd: ::c_int,
- op: ::c_int,
- fd: ::c_int,
- event: *mut ::epoll_event) -> ::c_int;
- pub fn pthread_getschedparam(native: ::pthread_t,
- policy: *mut ::c_int,
- param: *mut ::sched_param) -> ::c_int;
- pub fn unshare(flags: ::c_int) -> ::c_int;
+ pub fn sched_getaffinity(
+ pid: ::pid_t,
+ cpusetsize: ::size_t,
+ cpuset: *mut cpu_set_t,
+ ) -> ::c_int;
+ pub fn sched_setaffinity(
+ pid: ::pid_t,
+ cpusetsize: ::size_t,
+ cpuset: *const cpu_set_t,
+ ) -> ::c_int;
pub fn umount(target: *const ::c_char) -> ::c_int;
pub fn sched_get_priority_max(policy: ::c_int) -> ::c_int;
- pub fn tee(fd_in: ::c_int,
- fd_out: ::c_int,
- len: ::size_t,
- flags: ::c_uint) -> ::ssize_t;
- pub fn settimeofday(tv: *const ::timeval, tz: *const ::timezone) -> ::c_int;
- pub fn splice(fd_in: ::c_int,
- off_in: *mut ::loff_t,
- fd_out: ::c_int,
- off_out: *mut ::loff_t,
- len: ::size_t,
- flags: ::c_uint) -> ::ssize_t;
+ pub fn tee(
+ fd_in: ::c_int,
+ fd_out: ::c_int,
+ len: ::size_t,
+ flags: ::c_uint,
+ ) -> ::ssize_t;
+ pub fn settimeofday(
+ tv: *const ::timeval,
+ tz: *const ::timezone,
+ ) -> ::c_int;
+ pub fn splice(
+ fd_in: ::c_int,
+ off_in: *mut ::loff_t,
+ fd_out: ::c_int,
+ off_out: *mut ::loff_t,
+ len: ::size_t,
+ flags: ::c_uint,
+ ) -> ::ssize_t;
pub fn eventfd(init: ::c_uint, flags: ::c_int) -> ::c_int;
- pub fn sched_rr_get_interval(pid: ::pid_t, tp: *mut ::timespec) -> ::c_int;
- pub fn sem_timedwait(sem: *mut sem_t,
- abstime: *const ::timespec) -> ::c_int;
- pub fn sem_getvalue(sem: *mut sem_t,
- sval: *mut ::c_int) -> ::c_int;
- pub fn sched_setparam(pid: ::pid_t, param: *const ::sched_param) -> ::c_int;
- pub fn setns(fd: ::c_int, nstype: ::c_int) -> ::c_int;
+ pub fn sched_rr_get_interval(pid: ::pid_t, tp: *mut ::timespec)
+ -> ::c_int;
+ pub fn sem_timedwait(
+ sem: *mut sem_t,
+ abstime: *const ::timespec,
+ ) -> ::c_int;
+ pub fn sem_getvalue(sem: *mut sem_t, sval: *mut ::c_int) -> ::c_int;
+ pub fn sched_setparam(
+ pid: ::pid_t,
+ param: *const ::sched_param,
+ ) -> ::c_int;
pub fn swapoff(puath: *const ::c_char) -> ::c_int;
- pub fn vmsplice(fd: ::c_int,
- iov: *const ::iovec,
- nr_segs: ::size_t,
- flags: ::c_uint) -> ::ssize_t;
- pub fn mount(src: *const ::c_char,
- target: *const ::c_char,
- fstype: *const ::c_char,
- flags: ::c_ulong,
- data: *const ::c_void) -> ::c_int;
+ pub fn vmsplice(
+ fd: ::c_int,
+ iov: *const ::iovec,
+ nr_segs: ::size_t,
+ flags: ::c_uint,
+ ) -> ::ssize_t;
+ pub fn mount(
+ src: *const ::c_char,
+ target: *const ::c_char,
+ fstype: *const ::c_char,
+ flags: ::c_ulong,
+ data: *const ::c_void,
+ ) -> ::c_int;
pub fn personality(persona: ::c_ulong) -> ::c_int;
- pub fn prctl(option: ::c_int, ...) -> ::c_int;
pub fn sched_getparam(pid: ::pid_t, param: *mut ::sched_param) -> ::c_int;
- pub fn ppoll(fds: *mut ::pollfd,
- nfds: nfds_t,
- timeout: *const ::timespec,
- sigmask: *const sigset_t) -> ::c_int;
- pub fn pthread_mutex_timedlock(lock: *mut pthread_mutex_t,
- abstime: *const ::timespec) -> ::c_int;
- pub fn clone(cb: extern fn(*mut ::c_void) -> ::c_int,
- child_stack: *mut ::c_void,
- flags: ::c_int,
- arg: *mut ::c_void, ...) -> ::c_int;
+ pub fn ppoll(
+ fds: *mut ::pollfd,
+ nfds: nfds_t,
+ timeout: *const ::timespec,
+ sigmask: *const sigset_t,
+ ) -> ::c_int;
+ pub fn pthread_mutex_timedlock(
+ lock: *mut pthread_mutex_t,
+ abstime: *const ::timespec,
+ ) -> ::c_int;
+ pub fn clone(
+ cb: extern "C" fn(*mut ::c_void) -> ::c_int,
+ child_stack: *mut ::c_void,
+ flags: ::c_int,
+ arg: *mut ::c_void,
+ ...
+ ) -> ::c_int;
pub fn sched_getscheduler(pid: ::pid_t) -> ::c_int;
- pub fn clock_nanosleep(clk_id: ::clockid_t,
- flags: ::c_int,
- rqtp: *const ::timespec,
- rmtp: *mut ::timespec) -> ::c_int;
- pub fn pthread_attr_getguardsize(attr: *const ::pthread_attr_t,
- guardsize: *mut ::size_t) -> ::c_int;
+ pub fn clock_nanosleep(
+ clk_id: ::clockid_t,
+ flags: ::c_int,
+ rqtp: *const ::timespec,
+ rmtp: *mut ::timespec,
+ ) -> ::c_int;
+ pub fn pthread_attr_getguardsize(
+ attr: *const ::pthread_attr_t,
+ guardsize: *mut ::size_t,
+ ) -> ::c_int;
pub fn sethostname(name: *const ::c_char, len: ::size_t) -> ::c_int;
pub fn sched_get_priority_min(policy: ::c_int) -> ::c_int;
- pub fn pthread_condattr_getpshared(attr: *const pthread_condattr_t,
- pshared: *mut ::c_int) -> ::c_int;
- pub fn sysinfo(info: *mut ::sysinfo) -> ::c_int;
pub fn umount2(target: *const ::c_char, flags: ::c_int) -> ::c_int;
- pub fn pthread_setschedparam(native: ::pthread_t,
- policy: ::c_int,
- param: *const ::sched_param) -> ::c_int;
pub fn swapon(path: *const ::c_char, swapflags: ::c_int) -> ::c_int;
- pub fn sched_setscheduler(pid: ::pid_t,
- policy: ::c_int,
- param: *const ::sched_param) -> ::c_int;
- pub fn sendfile(out_fd: ::c_int,
- in_fd: ::c_int,
- offset: *mut off_t,
- count: ::size_t) -> ::ssize_t;
+ pub fn sched_setscheduler(
+ pid: ::pid_t,
+ policy: ::c_int,
+ param: *const ::sched_param,
+ ) -> ::c_int;
pub fn sigsuspend(mask: *const ::sigset_t) -> ::c_int;
- pub fn getgrgid_r(gid: ::gid_t,
- grp: *mut ::group,
- buf: *mut ::c_char,
- buflen: ::size_t,
- result: *mut *mut ::group) -> ::c_int;
- pub fn sigaltstack(ss: *const stack_t,
- oss: *mut stack_t) -> ::c_int;
+ pub fn getgrgid_r(
+ gid: ::gid_t,
+ grp: *mut ::group,
+ buf: *mut ::c_char,
+ buflen: ::size_t,
+ result: *mut *mut ::group,
+ ) -> ::c_int;
+ pub fn sigaltstack(ss: *const stack_t, oss: *mut stack_t) -> ::c_int;
pub fn sem_close(sem: *mut sem_t) -> ::c_int;
pub fn getdtablesize() -> ::c_int;
- pub fn getgrnam_r(name: *const ::c_char,
- grp: *mut ::group,
- buf: *mut ::c_char,
- buflen: ::size_t,
- result: *mut *mut ::group) -> ::c_int;
+ pub fn getgrnam_r(
+ name: *const ::c_char,
+ grp: *mut ::group,
+ buf: *mut ::c_char,
+ buflen: ::size_t,
+ result: *mut *mut ::group,
+ ) -> ::c_int;
pub fn initgroups(user: *const ::c_char, group: ::gid_t) -> ::c_int;
- pub fn pthread_sigmask(how: ::c_int, set: *const sigset_t,
- oldset: *mut sigset_t) -> ::c_int;
+ pub fn pthread_sigmask(
+ how: ::c_int,
+ set: *const sigset_t,
+ oldset: *mut sigset_t,
+ ) -> ::c_int;
pub fn sem_open(name: *const ::c_char, oflag: ::c_int, ...) -> *mut sem_t;
pub fn getgrnam(name: *const ::c_char) -> *mut ::group;
pub fn pthread_cancel(thread: ::pthread_t) -> ::c_int;
pub fn pthread_kill(thread: ::pthread_t, sig: ::c_int) -> ::c_int;
pub fn sem_unlink(name: *const ::c_char) -> ::c_int;
pub fn daemon(nochdir: ::c_int, noclose: ::c_int) -> ::c_int;
- pub fn getpwnam_r(name: *const ::c_char,
- pwd: *mut passwd,
- buf: *mut ::c_char,
- buflen: ::size_t,
- result: *mut *mut passwd) -> ::c_int;
- pub fn getpwuid_r(uid: ::uid_t,
- pwd: *mut passwd,
- buf: *mut ::c_char,
- buflen: ::size_t,
- result: *mut *mut passwd) -> ::c_int;
- pub fn sigwait(set: *const sigset_t,
- sig: *mut ::c_int) -> ::c_int;
- pub fn pthread_atfork(prepare: ::Option<unsafe extern fn()>,
- parent: ::Option<unsafe extern fn()>,
- child: ::Option<unsafe extern fn()>) -> ::c_int;
+ pub fn getpwnam_r(
+ name: *const ::c_char,
+ pwd: *mut passwd,
+ buf: *mut ::c_char,
+ buflen: ::size_t,
+ result: *mut *mut passwd,
+ ) -> ::c_int;
+ pub fn getpwuid_r(
+ uid: ::uid_t,
+ pwd: *mut passwd,
+ buf: *mut ::c_char,
+ buflen: ::size_t,
+ result: *mut *mut passwd,
+ ) -> ::c_int;
+ pub fn sigwait(set: *const sigset_t, sig: *mut ::c_int) -> ::c_int;
+ pub fn pthread_atfork(
+ prepare: ::Option<unsafe extern "C" fn()>,
+ parent: ::Option<unsafe extern "C" fn()>,
+ child: ::Option<unsafe extern "C" fn()>,
+ ) -> ::c_int;
pub fn getgrgid(gid: ::gid_t) -> *mut ::group;
- pub fn getgrouplist(user: *const ::c_char,
- group: ::gid_t,
- groups: *mut ::gid_t,
- ngroups: *mut ::c_int) -> ::c_int;
- pub fn pthread_mutexattr_getpshared(attr: *const pthread_mutexattr_t,
- pshared: *mut ::c_int) -> ::c_int;
- pub fn popen(command: *const c_char,
- mode: *const c_char) -> *mut ::FILE;
- pub fn faccessat(dirfd: ::c_int, pathname: *const ::c_char,
- mode: ::c_int, flags: ::c_int) -> ::c_int;
- pub fn pthread_create(native: *mut ::pthread_t,
- attr: *const ::pthread_attr_t,
- f: extern fn(*mut ::c_void) -> *mut ::c_void,
- value: *mut ::c_void) -> ::c_int;
+ pub fn getgrouplist(
+ user: *const ::c_char,
+ group: ::gid_t,
+ groups: *mut ::gid_t,
+ ngroups: *mut ::c_int,
+ ) -> ::c_int;
+ pub fn popen(command: *const c_char, mode: *const c_char) -> *mut ::FILE;
+ pub fn faccessat(
+ dirfd: ::c_int,
+ pathname: *const ::c_char,
+ mode: ::c_int,
+ flags: ::c_int,
+ ) -> ::c_int;
+ pub fn pthread_create(
+ native: *mut ::pthread_t,
+ attr: *const ::pthread_attr_t,
+ f: extern "C" fn(*mut ::c_void) -> *mut ::c_void,
+ value: *mut ::c_void,
+ ) -> ::c_int;
pub fn dl_iterate_phdr(
- callback: ::Option<unsafe extern fn(
- info: *mut ::dl_phdr_info,
- size: ::size_t,
- data: *mut ::c_void
- ) -> ::c_int>,
- data: *mut ::c_void
+ callback: ::Option<
+ unsafe extern "C" fn(
+ info: *mut ::dl_phdr_info,
+ size: ::size_t,
+ data: *mut ::c_void,
+ ) -> ::c_int,
+ >,
+ data: *mut ::c_void,
) -> ::c_int;
}
diff --git a/libc/src/fuchsia/no_align.rs b/libc/src/fuchsia/no_align.rs
index 437da97..7ca90e0 100644
--- a/libc/src/fuchsia/no_align.rs
+++ b/libc/src/fuchsia/no_align.rs
@@ -125,5 +125,5 @@ macro_rules! expand_align {
}
}
}
- }
+ };
}