diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-18 02:49:50 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-18 02:49:50 +0000 |
commit | 9835e2ae736235810b4ea1c162ca5e65c547e770 (patch) | |
tree | 3fcebf40ed70e581d776a8a4c65923e8ec20e026 /vendor/libc/src/unix/solarish | |
parent | Releasing progress-linux version 1.70.0+dfsg2-1~progress7.99u1. (diff) | |
download | rustc-9835e2ae736235810b4ea1c162ca5e65c547e770.tar.xz rustc-9835e2ae736235810b4ea1c162ca5e65c547e770.zip |
Merging upstream version 1.71.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/libc/src/unix/solarish')
-rw-r--r-- | vendor/libc/src/unix/solarish/mod.rs | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/vendor/libc/src/unix/solarish/mod.rs b/vendor/libc/src/unix/solarish/mod.rs index 88f9cab9d..400de8a26 100644 --- a/vendor/libc/src/unix/solarish/mod.rs +++ b/vendor/libc/src/unix/solarish/mod.rs @@ -2579,11 +2579,13 @@ pub const AT_SUN_FPTYPE: ::c_uint = 2027; // and 4 bytes everywhere else: #[cfg(target_arch = "sparc64")] const _CMSG_HDR_ALIGNMENT: usize = 8; -#[cfg(any(target_arch = "x86", target_arch = "x86_64"))] +#[cfg(not(target_arch = "sparc64"))] const _CMSG_HDR_ALIGNMENT: usize = 4; const _CMSG_DATA_ALIGNMENT: usize = ::mem::size_of::<::c_int>(); +const NEWDEV: ::c_int = 1; + const_fn! { {const} fn _CMSG_HDR_ALIGN(p: usize) -> usize { (p + _CMSG_HDR_ALIGNMENT - 1) & !(_CMSG_HDR_ALIGNMENT - 1) @@ -2599,7 +2601,7 @@ f! { _CMSG_DATA_ALIGN(cmsg.offset(1) as usize) as *mut ::c_uchar } - pub fn CMSG_LEN(length: ::c_uint) -> ::c_uint { + pub {const} fn CMSG_LEN(length: ::c_uint) -> ::c_uint { _CMSG_DATA_ALIGN(::mem::size_of::<::cmsghdr>()) as ::c_uint + length } @@ -3196,6 +3198,12 @@ extern "C" { longopts: *const option, longindex: *mut ::c_int, ) -> ::c_int; + + pub fn sync(); + + fn __major(version: ::c_int, devnum: ::dev_t) -> ::major_t; + fn __minor(version: ::c_int, devnum: ::dev_t) -> ::minor_t; + fn __makedev(version: ::c_int, majdev: ::major_t, mindev: ::minor_t) -> ::dev_t; } #[link(name = "sendfile")] @@ -3252,6 +3260,18 @@ extern "C" { pub fn lgrp_root(cookie: ::lgrp_cookie_t) -> ::lgrp_id_t; } +pub unsafe fn major(device: ::dev_t) -> ::major_t { + __major(NEWDEV, device) +} + +pub unsafe fn minor(device: ::dev_t) -> ::minor_t { + __minor(NEWDEV, device) +} + +pub unsafe fn makedev(maj: ::major_t, min: ::minor_t) -> ::dev_t { + __makedev(NEWDEV, maj, min) +} + mod compat; pub use self::compat::*; |