diff options
author | Amanieu d'Antras <amanieu@gmail.com> | 2021-02-01 22:52:54 +0000 |
---|---|---|
committer | Amanieu d'Antras <amanieu@gmail.com> | 2021-02-01 22:52:54 +0000 |
commit | 9d393107c62d92408cd216053e2acabd707ba485 (patch) | |
tree | 54cd01530f41a5a2bc61a4257f3eb53f369b6f4b /src/unix/mod.rs | |
parent | 60da93f9cc31439bce9295e428552aeeacfe48fc (diff) | |
download | rust-libc-9d393107c62d92408cd216053e2acabd707ba485.tar.gz |
Rustfmt
Diffstat (limited to 'src/unix/mod.rs')
-rw-r--r-- | src/unix/mod.rs | 86 |
1 files changed, 57 insertions, 29 deletions
diff --git a/src/unix/mod.rs b/src/unix/mod.rs index 51c19ca5d7..45a9aff4d5 100644 --- a/src/unix/mod.rs +++ b/src/unix/mod.rs @@ -636,13 +636,19 @@ extern "C" { pub fn getchar_unlocked() -> ::c_int; pub fn putchar_unlocked(c: ::c_int) -> ::c_int; - #[cfg(not(all(libc_cfg_target_vendor, target_arch = "powerpc", - target_vendor = "nintendo")))] + #[cfg(not(all( + libc_cfg_target_vendor, + target_arch = "powerpc", + target_vendor = "nintendo" + )))] #[cfg_attr(target_os = "netbsd", link_name = "__socket30")] #[cfg_attr(target_os = "illumos", link_name = "__xnet_socket")] pub fn socket(domain: ::c_int, ty: ::c_int, protocol: ::c_int) -> ::c_int; - #[cfg(not(all(libc_cfg_target_vendor, target_arch = "powerpc", - target_vendor = "nintendo")))] + #[cfg(not(all( + libc_cfg_target_vendor, + target_arch = "powerpc", + target_vendor = "nintendo" + )))] #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "connect$UNIX2003" @@ -658,8 +664,11 @@ extern "C" { link_name = "listen$UNIX2003" )] pub fn listen(socket: ::c_int, backlog: ::c_int) -> ::c_int; - #[cfg(not(all(libc_cfg_target_vendor, target_arch = "powerpc", - target_vendor = "nintendo")))] + #[cfg(not(all( + libc_cfg_target_vendor, + target_arch = "powerpc", + target_vendor = "nintendo" + )))] #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "accept$UNIX2003" @@ -669,8 +678,11 @@ extern "C" { address: *mut sockaddr, address_len: *mut socklen_t, ) -> ::c_int; - #[cfg(not(all(libc_cfg_target_vendor, target_arch = "powerpc", - target_vendor = "nintendo")))] + #[cfg(not(all( + libc_cfg_target_vendor, + target_arch = "powerpc", + target_vendor = "nintendo" + )))] #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "getpeername$UNIX2003" @@ -680,8 +692,11 @@ extern "C" { address: *mut sockaddr, address_len: *mut socklen_t, ) -> ::c_int; - #[cfg(not(all(libc_cfg_target_vendor, target_arch = "powerpc", - target_vendor = "nintendo")))] + #[cfg(not(all( + libc_cfg_target_vendor, + target_arch = "powerpc", + target_vendor = "nintendo" + )))] #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "getsockname$UNIX2003" @@ -709,8 +724,11 @@ extern "C" { protocol: ::c_int, socket_vector: *mut ::c_int, ) -> ::c_int; - #[cfg(not(all(libc_cfg_target_vendor, target_arch = "powerpc", - target_vendor = "nintendo")))] + #[cfg(not(all( + libc_cfg_target_vendor, + target_arch = "powerpc", + target_vendor = "nintendo" + )))] #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "sendto$UNIX2003" @@ -1286,8 +1304,11 @@ extern "C" { pub fn dlclose(handle: *mut ::c_void) -> ::c_int; pub fn dladdr(addr: *const ::c_void, info: *mut Dl_info) -> ::c_int; - #[cfg(not(all(libc_cfg_target_vendor, target_arch = "powerpc", - target_vendor = "nintendo")))] + #[cfg(not(all( + libc_cfg_target_vendor, + target_arch = "powerpc", + target_vendor = "nintendo" + )))] #[cfg_attr(target_os = "illumos", link_name = "__xnet_getaddrinfo")] pub fn getaddrinfo( node: *const c_char, @@ -1295,8 +1316,11 @@ extern "C" { hints: *const addrinfo, res: *mut *mut addrinfo, ) -> ::c_int; - #[cfg(not(all(libc_cfg_target_vendor, target_arch = "powerpc", - target_vendor = "nintendo")))] + #[cfg(not(all( + libc_cfg_target_vendor, + target_arch = "powerpc", + target_vendor = "nintendo" + )))] pub fn freeaddrinfo(res: *mut addrinfo); pub fn gai_strerror(errcode: ::c_int) -> *const ::c_char; #[cfg_attr( @@ -1315,32 +1339,40 @@ extern "C" { pub fn res_init() -> ::c_int; #[cfg_attr(target_os = "netbsd", link_name = "__gmtime_r50")] - #[cfg_attr(target_env = "musl", allow(deprecated))] // FIXME: for `time_t` + #[cfg_attr(target_env = "musl", allow(deprecated))] + // FIXME: for `time_t` pub fn gmtime_r(time_p: *const time_t, result: *mut tm) -> *mut tm; #[cfg_attr(target_os = "netbsd", link_name = "__localtime_r50")] - #[cfg_attr(target_env = "musl", allow(deprecated))] // FIXME: for `time_t` + #[cfg_attr(target_env = "musl", allow(deprecated))] + // FIXME: for `time_t` pub fn localtime_r(time_p: *const time_t, result: *mut tm) -> *mut tm; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "mktime$UNIX2003" )] #[cfg_attr(target_os = "netbsd", link_name = "__mktime50")] - #[cfg_attr(target_env = "musl", allow(deprecated))] // FIXME: for `time_t` + #[cfg_attr(target_env = "musl", allow(deprecated))] + // FIXME: for `time_t` pub fn mktime(tm: *mut tm) -> time_t; #[cfg_attr(target_os = "netbsd", link_name = "__time50")] - #[cfg_attr(target_env = "musl", allow(deprecated))] // FIXME: for `time_t` + #[cfg_attr(target_env = "musl", allow(deprecated))] + // FIXME: for `time_t` pub fn time(time: *mut time_t) -> time_t; #[cfg_attr(target_os = "netbsd", link_name = "__gmtime50")] - #[cfg_attr(target_env = "musl", allow(deprecated))] // FIXME: for `time_t` + #[cfg_attr(target_env = "musl", allow(deprecated))] + // FIXME: for `time_t` pub fn gmtime(time_p: *const time_t) -> *mut tm; #[cfg_attr(target_os = "netbsd", link_name = "__locatime50")] - #[cfg_attr(target_env = "musl", allow(deprecated))] // FIXME: for `time_t` + #[cfg_attr(target_env = "musl", allow(deprecated))] + // FIXME: for `time_t` pub fn localtime(time_p: *const time_t) -> *mut tm; #[cfg_attr(target_os = "netbsd", link_name = "__difftime50")] - #[cfg_attr(target_env = "musl", allow(deprecated))] // FIXME: for `time_t` + #[cfg_attr(target_env = "musl", allow(deprecated))] + // FIXME: for `time_t` pub fn difftime(time1: time_t, time0: time_t) -> ::c_double; #[cfg_attr(target_os = "netbsd", link_name = "__timegm50")] - #[cfg_attr(target_env = "musl", allow(deprecated))] // FIXME: for `time_t` + #[cfg_attr(target_env = "musl", allow(deprecated))] + // FIXME: for `time_t` pub fn timegm(tm: *mut ::tm) -> time_t; #[cfg_attr(target_os = "netbsd", link_name = "__mknod50")] @@ -1537,11 +1569,7 @@ extern "C" { stream: *mut FILE, ) -> ssize_t; - pub fn lockf( - fd: ::c_int, - cmd: ::c_int, - len: ::off_t, - ) -> ::c_int; + pub fn lockf(fd: ::c_int, cmd: ::c_int, len: ::off_t) -> ::c_int; } cfg_if! { |