Skip to content

Commit

Permalink
add confstr API and _CS_* to linux-gnu
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeff Garzik committed Jul 11, 2024
1 parent ce2ccd5 commit 2f29f25
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libc-test/semver/linux-gnu.txt
Original file line number Diff line number Diff line change
Expand Up @@ -592,6 +592,9 @@ _SC_USER_GROUPS
_SC_USER_GROUPS_R
_SC_USHRT_MAX
_SC_WORD_BIT
_CS_GNU_LIBC_VERSION
_CS_GNU_LIBPTHREAD_VERSION
_CS_PATH
__NFT_REG_MAX
__UT_HOSTSIZE
__UT_LINESIZE
Expand All @@ -611,6 +614,7 @@ aio_write
aiocb
backtrace
clock_adjtime
confstr
copy_file_range
ctermid
dlinfo
Expand Down
4 changes: 4 additions & 0 deletions src/unix/linux_like/linux/gnu/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -901,6 +901,9 @@ pub const _SC_LEVEL3_CACHE_LINESIZE: ::c_int = 196;
pub const _SC_LEVEL4_CACHE_SIZE: ::c_int = 197;
pub const _SC_LEVEL4_CACHE_ASSOC: ::c_int = 198;
pub const _SC_LEVEL4_CACHE_LINESIZE: ::c_int = 199;
pub const _CS_GNU_LIBC_VERSION: ::c_int = 2;
pub const _CS_GNU_LIBPTHREAD_VERSION: ::c_int = 3;
pub const _CS_PATH: ::c_int = 0;
pub const O_ACCMODE: ::c_int = 3;
pub const ST_RELATIME: ::c_ulong = 4096;
pub const NI_MAXHOST: ::socklen_t = 1025;
Expand Down Expand Up @@ -1485,6 +1488,7 @@ extern "C" {
) -> ::size_t;
pub fn strptime(s: *const ::c_char, format: *const ::c_char, tm: *mut ::tm) -> *mut ::c_char;

pub fn confstr(name: ::c_int, buf: *mut ::c_char, len: ::size_t) -> ::size_t;
pub fn dirname(path: *mut ::c_char) -> *mut ::c_char;
/// POSIX version of `basename(3)`, defined in `libgen.h`.
#[link_name = "__xpg_basename"]
Expand Down

0 comments on commit 2f29f25

Please sign in to comment.