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 31beed6
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 @@ -511,6 +511,9 @@ XSK_UNALIGNED_BUF_ADDR_MASK
XDP_PKT_CONTD
XENFS_SUPER_MAGIC
XFS_SUPER_MAGIC
_CS_GNU_LIBC_VERSION
_CS_GNU_LIBPTHREAD_VERSION
_CS_PATH
_SC_2_C_VERSION
_SC_BASE
_SC_CHARCLASS_NAME_MAX
Expand Down Expand Up @@ -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 @@ -826,6 +826,9 @@ pub const TMP_MAX: ::c_uint = 238328;
pub const FOPEN_MAX: ::c_uint = 16;
pub const FILENAME_MAX: ::c_uint = 4096;
pub const POSIX_MADV_DONTNEED: ::c_int = 4;
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 _SC_EQUIV_CLASS_MAX: ::c_int = 41;
pub const _SC_CHARCLASS_NAME_MAX: ::c_int = 45;
pub const _SC_PII: ::c_int = 53;
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 31beed6

Please sign in to comment.