Skip to content

Commit

Permalink
Merge pull request rust-lang#3819 from tgross35/backport-confstr-api
Browse files Browse the repository at this point in the history
[0.2] Backport confstr api
  • Loading branch information
tgross35 authored Aug 13, 2024
2 parents 2d53fff + 9b18354 commit 0bded09
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 @@ -835,6 +835,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 @@ -1478,6 +1481,7 @@ extern "C" {
pub fn asctime_r(tm: *const ::tm, buf: *mut ::c_char) -> *mut ::c_char;
pub fn ctime_r(timep: *const time_t, buf: *mut ::c_char) -> *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 0bded09

Please sign in to comment.