diff options
author | Daniel Mueller <deso@posteo.net> | 2019-01-22 20:16:05 -0800 |
---|---|---|
committer | Daniel Mueller <deso@posteo.net> | 2019-01-22 20:16:05 -0800 |
commit | 4fcdf2022df38b37365ee5d948005ac08a1f1a83 (patch) | |
tree | c204c0959100390dc708ebdd977bf9daddb356de /libc/src/unix | |
parent | 8b2d8818b26e7084cad240c48fd9ce7fc2519012 (diff) | |
download | nitrocli-4fcdf2022df38b37365ee5d948005ac08a1f1a83.tar.gz nitrocli-4fcdf2022df38b37365ee5d948005ac08a1f1a83.tar.bz2 |
Update libc crate to 0.2.47
This change updates the libc crate to version 0.2.47.
Import subrepo libc/:libc at ce1dfcbf81bd74662b5cd02a9214818a0bfbbffa
Diffstat (limited to 'libc/src/unix')
-rw-r--r-- | libc/src/unix/bsd/apple/mod.rs | 1 | ||||
-rw-r--r-- | libc/src/unix/bsd/freebsdlike/dragonfly/mod.rs | 1 | ||||
-rw-r--r-- | libc/src/unix/bsd/freebsdlike/freebsd/mod.rs | 20 | ||||
-rw-r--r-- | libc/src/unix/bsd/netbsdlike/mod.rs | 1 | ||||
-rw-r--r-- | libc/src/unix/bsd/netbsdlike/netbsd/mod.rs | 14 | ||||
-rw-r--r-- | libc/src/unix/haiku/mod.rs | 1 | ||||
-rw-r--r-- | libc/src/unix/hermit/mod.rs | 1 | ||||
-rw-r--r-- | libc/src/unix/mod.rs | 1 | ||||
-rw-r--r-- | libc/src/unix/newlib/mod.rs | 1 | ||||
-rw-r--r-- | libc/src/unix/notbsd/linux/other/b32/x86.rs | 21 | ||||
-rw-r--r-- | libc/src/unix/notbsd/linux/other/b64/x86_64.rs | 25 | ||||
-rw-r--r-- | libc/src/unix/notbsd/mod.rs | 1 | ||||
-rw-r--r-- | libc/src/unix/solaris/mod.rs | 1 | ||||
-rw-r--r-- | libc/src/unix/uclibc/mod.rs | 1 |
14 files changed, 89 insertions, 1 deletions
diff --git a/libc/src/unix/bsd/apple/mod.rs b/libc/src/unix/bsd/apple/mod.rs index 3d9dd94..13da82c 100644 --- a/libc/src/unix/bsd/apple/mod.rs +++ b/libc/src/unix/bsd/apple/mod.rs @@ -2659,6 +2659,7 @@ extern { fd: ::c_int, newfd: ::c_int, ) -> ::c_int; + pub fn uname(buf: *mut ::utsname) -> ::c_int; } cfg_if! { diff --git a/libc/src/unix/bsd/freebsdlike/dragonfly/mod.rs b/libc/src/unix/bsd/freebsdlike/dragonfly/mod.rs index 0414380..41b6956 100644 --- a/libc/src/unix/bsd/freebsdlike/dragonfly/mod.rs +++ b/libc/src/unix/bsd/freebsdlike/dragonfly/mod.rs @@ -801,4 +801,5 @@ extern { pub fn statfs(path: *const ::c_char, buf: *mut statfs) -> ::c_int; pub fn fstatfs(fd: ::c_int, buf: *mut statfs) -> ::c_int; + pub fn uname(buf: *mut ::utsname) -> ::c_int; } diff --git a/libc/src/unix/bsd/freebsdlike/freebsd/mod.rs b/libc/src/unix/bsd/freebsdlike/freebsd/mod.rs index 03b19eb..878deea 100644 --- a/libc/src/unix/bsd/freebsdlike/freebsd/mod.rs +++ b/libc/src/unix/bsd/freebsdlike/freebsd/mod.rs @@ -447,6 +447,19 @@ pub const TIOCSIG: ::c_uint = 0x2004745f; pub const TIOCM_DCD: ::c_int = 0x40; pub const H4DISC: ::c_int = 0x7; +pub const FIONCLEX: ::c_ulong = 0x20006602; +pub const FIONREAD: ::c_ulong = 0x4004667f; +pub const FIOASYNC: ::c_ulong = 0x8004667d; +pub const FIOSETOWN: ::c_ulong = 0x8004667c; +pub const FIOGETOWN: ::c_ulong = 0x4004667b; +pub const FIODTYPE: ::c_ulong = 0x4004667a; +pub const FIOGETLBA: ::c_ulong = 0x40046679; +pub const FIODGNAME: ::c_ulong = 0x80106678; +pub const FIONWRITE: ::c_ulong = 0x40046677; +pub const FIONSPACE: ::c_ulong = 0x40046676; +pub const FIOSEEKDATA: ::c_ulong = 0xc0086661; +pub const FIOSEEKHOLE: ::c_ulong = 0xc0086662; + pub const JAIL_API_VERSION: u32 = 2; pub const JAIL_CREATE: ::c_int = 0x01; pub const JAIL_UPDATE: ::c_int = 0x02; @@ -949,6 +962,12 @@ pub const UF_READONLY: ::c_ulong = 0x00001000; pub const UF_HIDDEN: ::c_ulong = 0x00008000; pub const SF_SNAPSHOT: ::c_ulong = 0x00200000; +f! { + pub fn uname(buf: *mut ::utsname) -> ::c_int { + __xuname(256, buf as *mut ::c_void) + } +} + extern { pub fn __error() -> *mut ::c_int; @@ -1135,6 +1154,7 @@ extern { pub fn fstatfs(fd: ::c_int, buf: *mut statfs) -> ::c_int; pub fn dup3(src: ::c_int, dst: ::c_int, flags: ::c_int) -> ::c_int; + pub fn __xuname(nmln: ::c_int, buf: *mut ::c_void) -> ::c_int; } #[link(name = "util")] diff --git a/libc/src/unix/bsd/netbsdlike/mod.rs b/libc/src/unix/bsd/netbsdlike/mod.rs index abd014c..15f84d9 100644 --- a/libc/src/unix/bsd/netbsdlike/mod.rs +++ b/libc/src/unix/bsd/netbsdlike/mod.rs @@ -676,6 +676,7 @@ extern { -> ::c_int; 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 uname(buf: *mut ::utsname) -> ::c_int; } cfg_if! { diff --git a/libc/src/unix/bsd/netbsdlike/netbsd/mod.rs b/libc/src/unix/bsd/netbsdlike/netbsd/mod.rs index 9c8173f..760582c 100644 --- a/libc/src/unix/bsd/netbsdlike/netbsd/mod.rs +++ b/libc/src/unix/bsd/netbsdlike/netbsd/mod.rs @@ -987,6 +987,20 @@ pub const CHWFLOW: ::tcflag_t = ::MDMBUF | ::CRTSCTS | ::CDTRCTS; pub const SOCK_CLOEXEC: ::c_int = 0x10000000; pub const SOCK_NONBLOCK: ::c_int = 0x20000000; +pub const FIONCLEX: ::c_ulong = 0x20006602; +// Uncomment on next NetBSD release +// pub const FIOSEEKDATA: ::c_ulong = 0xc0086661; +// pub const FIOSEEKHOLE: ::c_ulong = 0xc0086662; +pub const FIONREAD: ::c_ulong = 0x4004667f; +pub const FIOASYNC: ::c_ulong = 0x8004667d; +pub const FIOSETOWN: ::c_ulong = 0x8004667c; +pub const FIOGETOWN: ::c_ulong = 0x4004667b; +pub const OFIOGETBMAP: ::c_ulong = 0xc004667a; +pub const FIOGETBMAP: ::c_ulong = 0xc008667a; +pub const FIONWRITE: ::c_ulong = 0x40046679; +pub const FIONSPACE: ::c_ulong = 0x40046678; +pub const FIBMAP: ::c_ulong = 0xc008667a; + pub const SIGSTKSZ : ::size_t = 40960; pub const PT_DUMPCORE: ::c_int = 12; diff --git a/libc/src/unix/haiku/mod.rs b/libc/src/unix/haiku/mod.rs index e65bca7..2aa5d13 100644 --- a/libc/src/unix/haiku/mod.rs +++ b/libc/src/unix/haiku/mod.rs @@ -1242,6 +1242,7 @@ extern { termp: *mut termios, winp: *mut ::winsize) -> ::pid_t; pub fn sethostname(name: *const ::c_char, len: ::size_t) -> ::c_int; + pub fn uname(buf: *mut ::utsname) -> ::c_int; } cfg_if! { diff --git a/libc/src/unix/hermit/mod.rs b/libc/src/unix/hermit/mod.rs index aadfa1c..ba7a90f 100644 --- a/libc/src/unix/hermit/mod.rs +++ b/libc/src/unix/hermit/mod.rs @@ -727,6 +727,7 @@ extern { -> ::c_int; pub fn setgroups(ngroups: ::c_int, grouplist: *const ::gid_t) -> ::c_int; + pub fn uname(buf: *mut ::utsname) -> ::c_int; } cfg_if! { diff --git a/libc/src/unix/mod.rs b/libc/src/unix/mod.rs index 370d7f4..88e13c5 100644 --- a/libc/src/unix/mod.rs +++ b/libc/src/unix/mod.rs @@ -972,7 +972,6 @@ extern { #[cfg_attr(target_os = "freebsd", link_name = "mknod@FBSD_1.0")] 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; diff --git a/libc/src/unix/newlib/mod.rs b/libc/src/unix/newlib/mod.rs index 77a4eb9..0cc411d 100644 --- a/libc/src/unix/newlib/mod.rs +++ b/libc/src/unix/newlib/mod.rs @@ -728,6 +728,7 @@ extern { link_name = "popen$UNIX2003")] pub fn popen(command: *const c_char, mode: *const c_char) -> *mut ::FILE; + pub fn uname(buf: *mut ::utsname) -> ::c_int; } cfg_if! { diff --git a/libc/src/unix/notbsd/linux/other/b32/x86.rs b/libc/src/unix/notbsd/linux/other/b32/x86.rs index 1506aca..6c41718 100644 --- a/libc/src/unix/notbsd/linux/other/b32/x86.rs +++ b/libc/src/unix/notbsd/linux/other/b32/x86.rs @@ -758,6 +758,27 @@ pub const EFL: ::c_int = 14; pub const UESP: ::c_int = 15; pub const SS: ::c_int = 16; +// offsets in mcontext_t.gregs from sys/ucontext.h +pub const REG_GS: ::c_int = 0; +pub const REG_FS: ::c_int = 1; +pub const REG_ES: ::c_int = 2; +pub const REG_DS: ::c_int = 3; +pub const REG_EDI: ::c_int = 4; +pub const REG_ESI: ::c_int = 5; +pub const REG_EBP: ::c_int = 6; +pub const REG_ESP: ::c_int = 7; +pub const REG_EBX: ::c_int = 8; +pub const REG_EDX: ::c_int = 9; +pub const REG_ECX: ::c_int = 10; +pub const REG_EAX: ::c_int = 11; +pub const REG_TRAPNO: ::c_int = 12; +pub const REG_ERR: ::c_int = 13; +pub const REG_EIP: ::c_int = 14; +pub const REG_CS: ::c_int = 15; +pub const REG_EFL: ::c_int = 16; +pub const REG_UESP: ::c_int = 17; +pub const REG_SS: ::c_int = 18; + extern { pub fn getcontext(ucp: *mut ucontext_t) -> ::c_int; pub fn setcontext(ucp: *const ucontext_t) -> ::c_int; diff --git a/libc/src/unix/notbsd/linux/other/b64/x86_64.rs b/libc/src/unix/notbsd/linux/other/b64/x86_64.rs index 43b8b9f..0d7137e 100644 --- a/libc/src/unix/notbsd/linux/other/b64/x86_64.rs +++ b/libc/src/unix/notbsd/linux/other/b64/x86_64.rs @@ -644,6 +644,31 @@ pub const ES: ::c_int = 24; pub const FS: ::c_int = 25; pub const GS: ::c_int = 26; +// offsets in mcontext_t.gregs from sys/ucontext.h +pub const REG_R8: ::c_int = 0; +pub const REG_R9: ::c_int = 1; +pub const REG_R10: ::c_int = 2; +pub const REG_R11: ::c_int = 3; +pub const REG_R12: ::c_int = 4; +pub const REG_R13: ::c_int = 5; +pub const REG_R14: ::c_int = 6; +pub const REG_R15: ::c_int = 7; +pub const REG_RDI: ::c_int = 8; +pub const REG_RSI: ::c_int = 9; +pub const REG_RBP: ::c_int = 10; +pub const REG_RBX: ::c_int = 11; +pub const REG_RDX: ::c_int = 12; +pub const REG_RAX: ::c_int = 13; +pub const REG_RCX: ::c_int = 14; +pub const REG_RSP: ::c_int = 15; +pub const REG_RIP: ::c_int = 16; +pub const REG_EFL: ::c_int = 17; +pub const REG_CSGSFS: ::c_int = 18; +pub const REG_ERR: ::c_int = 19; +pub const REG_TRAPNO: ::c_int = 20; +pub const REG_OLDMASK: ::c_int = 21; +pub const REG_CR2: ::c_int = 22; + extern { pub fn getcontext(ucp: *mut ucontext_t) -> ::c_int; pub fn setcontext(ucp: *const ucontext_t) -> ::c_int; diff --git a/libc/src/unix/notbsd/mod.rs b/libc/src/unix/notbsd/mod.rs index 6ff0807..668c25f 100644 --- a/libc/src/unix/notbsd/mod.rs +++ b/libc/src/unix/notbsd/mod.rs @@ -1242,6 +1242,7 @@ extern { flags: ::c_int) -> ::ssize_t; pub fn recvmsg(fd: ::c_int, msg: *mut ::msghdr, flags: ::c_int) -> ::ssize_t; + pub fn uname(buf: *mut ::utsname) -> ::c_int; } cfg_if! { diff --git a/libc/src/unix/solaris/mod.rs b/libc/src/unix/solaris/mod.rs index c4ec111..c991e62 100644 --- a/libc/src/unix/solaris/mod.rs +++ b/libc/src/unix/solaris/mod.rs @@ -1466,4 +1466,5 @@ extern { mode: *const c_char) -> *mut ::FILE; pub fn dup3(src: ::c_int, dst: ::c_int, flags: ::c_int) -> ::c_int; + pub fn uname(buf: *mut ::utsname) -> ::c_int; } diff --git a/libc/src/unix/uclibc/mod.rs b/libc/src/unix/uclibc/mod.rs index 9d8e97e..c04c22a 100644 --- a/libc/src/unix/uclibc/mod.rs +++ b/libc/src/unix/uclibc/mod.rs @@ -1953,6 +1953,7 @@ extern { link_name = "popen$UNIX2003")] pub fn popen(command: *const c_char, mode: *const c_char) -> *mut ::FILE; + pub fn uname(buf: *mut ::utsname) -> ::c_int; } cfg_if! { |