Skip to content

Commit 0bded09

Browse files
authored
Merge pull request #3819 from tgross35/backport-confstr-api
[0.2] Backport confstr api
2 parents 2d53fff + 9b18354 commit 0bded09

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

libc-test/semver/linux-gnu.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -511,6 +511,9 @@ XSK_UNALIGNED_BUF_ADDR_MASK
511511
XDP_PKT_CONTD
512512
XENFS_SUPER_MAGIC
513513
XFS_SUPER_MAGIC
514+
_CS_GNU_LIBC_VERSION
515+
_CS_GNU_LIBPTHREAD_VERSION
516+
_CS_PATH
514517
_SC_2_C_VERSION
515518
_SC_BASE
516519
_SC_CHARCLASS_NAME_MAX
@@ -611,6 +614,7 @@ aio_write
611614
aiocb
612615
backtrace
613616
clock_adjtime
617+
confstr
614618
copy_file_range
615619
ctermid
616620
dlinfo

src/unix/linux_like/linux/gnu/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -835,6 +835,9 @@ pub const TMP_MAX: ::c_uint = 238328;
835835
pub const FOPEN_MAX: ::c_uint = 16;
836836
pub const FILENAME_MAX: ::c_uint = 4096;
837837
pub const POSIX_MADV_DONTNEED: ::c_int = 4;
838+
pub const _CS_GNU_LIBC_VERSION: ::c_int = 2;
839+
pub const _CS_GNU_LIBPTHREAD_VERSION: ::c_int = 3;
840+
pub const _CS_PATH: ::c_int = 0;
838841
pub const _SC_EQUIV_CLASS_MAX: ::c_int = 41;
839842
pub const _SC_CHARCLASS_NAME_MAX: ::c_int = 45;
840843
pub const _SC_PII: ::c_int = 53;
@@ -1478,6 +1481,7 @@ extern "C" {
14781481
pub fn asctime_r(tm: *const ::tm, buf: *mut ::c_char) -> *mut ::c_char;
14791482
pub fn ctime_r(timep: *const time_t, buf: *mut ::c_char) -> *mut ::c_char;
14801483

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

0 commit comments

Comments
 (0)