diff options
-rw-r--r-- | libc-test/semver/openbsd.txt | 8 | ||||
-rw-r--r-- | src/unix/bsd/netbsdlike/openbsd/mod.rs | 12 | ||||
-rw-r--r-- | src/unix/solarish/mod.rs | 23 |
3 files changed, 32 insertions, 11 deletions
diff --git a/libc-test/semver/openbsd.txt b/libc-test/semver/openbsd.txt index cf9d73c586..bdfd1b7744 100644 --- a/libc-test/semver/openbsd.txt +++ b/libc-test/semver/openbsd.txt @@ -446,12 +446,20 @@ KI_MAXLOGNAME KI_NGROUPS KI_WMESGLEN LC_ALL +LC_ALL_MASK LC_COLLATE +LC_COLLATE_MASK LC_CTYPE +LC_CTYPE_MASK +LC_GLOBAL_LOCALE LC_MESSAGES +LC_MESSAGES_MASK LC_MONETARY +LC_MONETARY_MASK LC_NUMERIC +LC_NUMERIC_MASK LC_TIME +LC_TIME_MASK LOG_AUTHPRIV LOG_CRON LOG_FTP diff --git a/src/unix/bsd/netbsdlike/openbsd/mod.rs b/src/unix/bsd/netbsdlike/openbsd/mod.rs index 506306e9f7..f63ad9e638 100644 --- a/src/unix/bsd/netbsdlike/openbsd/mod.rs +++ b/src/unix/bsd/netbsdlike/openbsd/mod.rs @@ -1643,6 +1643,18 @@ pub const MNT_WAIT: ::c_int = 1; pub const MNT_NOWAIT: ::c_int = 2; pub const MNT_LAZY: ::c_int = 3; +pub const LC_COLLATE_MASK: ::c_int = 1 << ::LC_COLLATE; +pub const LC_CTYPE_MASK: ::c_int = 1 << ::LC_CTYPE; +pub const LC_MONETARY_MASK: ::c_int = 1 << ::LC_MONETARY; +pub const LC_NUMERIC_MASK: ::c_int = 1 << ::LC_NUMERIC; +pub const LC_TIME_MASK: ::c_int = 1 << ::LC_TIME; +pub const LC_MESSAGES_MASK: ::c_int = 1 << ::LC_MESSAGES; + +const _LC_LAST: ::c_int = 7; +pub const LC_ALL_MASK: ::c_int = (1 << _LC_LAST) - 2; + +pub const LC_GLOBAL_LOCALE: ::locale_t = -1isize as ::locale_t; + const_fn! { {const} fn _ALIGN(p: usize) -> usize { (p + _ALIGNBYTES) & !_ALIGNBYTES diff --git a/src/unix/solarish/mod.rs b/src/unix/solarish/mod.rs index c5da62be04..d01deefbf3 100644 --- a/src/unix/solarish/mod.rs +++ b/src/unix/solarish/mod.rs @@ -3147,18 +3147,7 @@ extern "C" { pub fn sysinfo(command: ::c_int, buf: *mut ::c_char, count: ::c_long) -> ::c_int; pub fn faccessat(fd: ::c_int, path: *const ::c_char, amode: ::c_int, flag: ::c_int) -> ::c_int; -} -#[link(name = "sendfile")] -extern "C" { - pub fn sendfile(out_fd: ::c_int, in_fd: ::c_int, off: *mut ::off_t, len: ::size_t) - -> ::ssize_t; - pub fn sendfilev( - fildes: ::c_int, - vec: *const sendfilevec_t, - sfvcnt: ::c_int, - xferred: *mut ::size_t, - ) -> ::ssize_t; // #include <link.h> #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] pub fn dl_iterate_phdr( @@ -3205,6 +3194,18 @@ extern "C" { pub fn backtrace_symbols_fd(buffer: *const *mut ::c_void, size: ::c_int, fd: ::c_int); } +#[link(name = "sendfile")] +extern "C" { + pub fn sendfile(out_fd: ::c_int, in_fd: ::c_int, off: *mut ::off_t, len: ::size_t) + -> ::ssize_t; + pub fn sendfilev( + fildes: ::c_int, + vec: *const sendfilevec_t, + sfvcnt: ::c_int, + xferred: *mut ::size_t, + ) -> ::ssize_t; +} + #[link(name = "lgrp")] extern "C" { pub fn lgrp_init(view: lgrp_view_t) -> lgrp_cookie_t; |