diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:20:39 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:20:39 +0000 |
commit | 1376c5a617be5c25655d0d7cb63e3beaa5a6e026 (patch) | |
tree | 3bb8d61aee02bc7a15eab3f36e3b921afc2075d0 /vendor/libc/src/unix/mod.rs | |
parent | Releasing progress-linux version 1.69.0+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-1376c5a617be5c25655d0d7cb63e3beaa5a6e026.tar.xz rustc-1376c5a617be5c25655d0d7cb63e3beaa5a6e026.zip |
Merging upstream version 1.70.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/libc/src/unix/mod.rs')
-rw-r--r-- | vendor/libc/src/unix/mod.rs | 43 |
1 files changed, 31 insertions, 12 deletions
diff --git a/vendor/libc/src/unix/mod.rs b/vendor/libc/src/unix/mod.rs index 826b83518..b005970b9 100644 --- a/vendor/libc/src/unix/mod.rs +++ b/vendor/libc/src/unix/mod.rs @@ -130,7 +130,7 @@ s! { #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))] __pad14: u32, - #[cfg(any(target_env = "musl", target_os = "emscripten"))] + #[cfg(any(target_env = "musl", target_env = "ohos", target_os = "emscripten"))] __reserved: [c_long; 16], } @@ -351,7 +351,7 @@ cfg_if! { #[link(name = "dl", cfg(not(target_feature = "crt-static")))] #[link(name = "c", cfg(not(target_feature = "crt-static")))] extern {} - } else if #[cfg(target_env = "musl")] { + } else if #[cfg(any(target_env = "musl", target_env = "ohos"))] { #[cfg_attr(feature = "rustc-dep-of-std", link(name = "c", kind = "static", modifiers = "-bundle", cfg(target_feature = "crt-static")))] @@ -404,6 +404,12 @@ cfg_if! { #[cfg_attr(feature = "rustc-dep-of-std", link(name = "c", cfg(not(target_feature = "crt-static"))))] extern {} + } else if #[cfg(target_env = "aix")] { + #[link(name = "c")] + #[link(name = "m")] + #[link(name = "bsd")] + #[link(name = "pthread")] + extern {} } else { #[link(name = "c")] #[link(name = "m")] @@ -1186,7 +1192,6 @@ extern "C" { pub fn dlerror() -> *mut ::c_char; 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; #[cfg(not(all( libc_cfg_target_vendor, @@ -1212,7 +1217,10 @@ extern "C" { pub fn gai_strerror(errcode: ::c_int) -> *const ::c_char; #[cfg_attr( any( - all(target_os = "linux", not(target_env = "musl")), + all( + target_os = "linux", + not(any(target_env = "musl", target_env = "ohos")) + ), target_os = "freebsd", target_os = "dragonfly", target_os = "haiku" @@ -1231,11 +1239,11 @@ extern "C" { pub fn res_init() -> ::c_int; #[cfg_attr(target_os = "netbsd", link_name = "__gmtime_r50")] - #[cfg_attr(target_env = "musl", allow(deprecated))] + #[cfg_attr(any(target_env = "musl", target_env = "ohos"), 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))] + #[cfg_attr(any(target_env = "musl", target_env = "ohos"), allow(deprecated))] // FIXME: for `time_t` pub fn localtime_r(time_p: *const time_t, result: *mut tm) -> *mut tm; #[cfg_attr( @@ -1243,27 +1251,27 @@ extern "C" { link_name = "mktime$UNIX2003" )] #[cfg_attr(target_os = "netbsd", link_name = "__mktime50")] - #[cfg_attr(target_env = "musl", allow(deprecated))] + #[cfg_attr(any(target_env = "musl", target_env = "ohos"), 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))] + #[cfg_attr(any(target_env = "musl", target_env = "ohos"), 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))] + #[cfg_attr(any(target_env = "musl", target_env = "ohos"), 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))] + #[cfg_attr(any(target_env = "musl", target_env = "ohos"), 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))] + #[cfg_attr(any(target_env = "musl", target_env = "ohos"), 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))] + #[cfg_attr(any(target_env = "musl", target_env = "ohos"), allow(deprecated))] // FIXME: for `time_t` pub fn timegm(tm: *mut ::tm) -> time_t; @@ -1417,6 +1425,14 @@ cfg_if! { } cfg_if! { + if #[cfg(not(target_os = "aix"))] { + extern "C" { + pub fn dladdr(addr: *const ::c_void, info: *mut Dl_info) -> ::c_int; + } + } +} + +cfg_if! { if #[cfg(not(any(target_env = "uclibc", target_os = "nto")))] { extern "C" { pub fn open_wmemstream( @@ -1570,6 +1586,9 @@ cfg_if! { } else if #[cfg(target_os = "nto")] { mod nto; pub use self::nto::*; + } else if #[cfg(target_os = "aix")] { + mod aix; + pub use self::aix::*; } else { // Unknown target_os } |