Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add POSIX confstr API #3771

Merged
merged 1 commit into from
Jul 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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