summaryrefslogtreecommitdiff
path: root/libc-test
diff options
context:
space:
mode:
Diffstat (limited to 'libc-test')
-rw-r--r--libc-test/build.rs23
-rw-r--r--libc-test/semver/android.txt2
-rw-r--r--libc-test/semver/apple.txt2
-rw-r--r--libc-test/semver/dragonfly.txt2
-rw-r--r--libc-test/semver/freebsd.txt4
-rw-r--r--libc-test/semver/linux-gnu.txt5
-rw-r--r--libc-test/semver/linux-musl.txt4
-rw-r--r--libc-test/semver/netbsd.txt2
-rw-r--r--libc-test/semver/openbsd.txt2
9 files changed, 43 insertions, 3 deletions
diff --git a/libc-test/build.rs b/libc-test/build.rs
index c45cedf4a1..8573fbc1a0 100644
--- a/libc-test/build.rs
+++ b/libc-test/build.rs
@@ -204,6 +204,7 @@ fn test_apple(target: &str) {
"iconv.h",
"ifaddrs.h",
"langinfo.h",
+ "libgen.h",
"libproc.h",
"limits.h",
"locale.h",
@@ -420,6 +421,7 @@ fn test_openbsd(target: &str) {
"errno.h",
"execinfo.h",
"fcntl.h",
+ "libgen.h",
"limits.h",
"link.h",
"locale.h",
@@ -995,6 +997,7 @@ fn test_netbsd(target: &str) {
"elf.h",
"errno.h",
"fcntl.h",
+ "libgen.h",
"limits.h",
"link.h",
"locale.h",
@@ -1209,6 +1212,7 @@ fn test_dragonflybsd(target: &str) {
"ifaddrs.h",
"kvm.h",
"langinfo.h",
+ "libgen.h",
"limits.h",
"link.h",
"locale.h",
@@ -1508,6 +1512,7 @@ fn test_android(target: &str) {
"fcntl.h",
"grp.h",
"ifaddrs.h",
+ "libgen.h",
"limits.h",
"link.h",
"locale.h",
@@ -1869,6 +1874,7 @@ fn test_freebsd(target: &str) {
"iconv.h",
"ifaddrs.h",
"langinfo.h",
+ "libgen.h",
"libutil.h",
"limits.h",
"link.h",
@@ -2774,6 +2780,7 @@ fn test_linux(target: &str) {
"iconv.h",
"ifaddrs.h",
"langinfo.h",
+ "libgen.h",
"limits.h",
"link.h",
"locale.h",
@@ -3413,6 +3420,22 @@ fn test_linux(target: &str) {
// it can't be changed from struct.
"pthread_sigqueue" => true,
+ // There are two versions of basename(3) on Linux with glibc, see
+ //
+ // https://man7.org/linux/man-pages/man3/basename.3.html
+ //
+ // If libgen.h is included, then the POSIX version will be available;
+ // If _GNU_SOURCE is defined and string.h is included, then the GNU one
+ // will be used.
+ //
+ // libc exposes both of them, providing a prefix to differentiate between
+ // them.
+ //
+ // Because the name with prefix is not a valid symbol in C, we have to
+ // skip the tests.
+ "posix_basename" if gnu => true,
+ "gnu_basename" if gnu => true,
+
_ => false,
}
});
diff --git a/libc-test/semver/android.txt b/libc-test/semver/android.txt
index d5d9fc5600..6445af0264 100644
--- a/libc-test/semver/android.txt
+++ b/libc-test/semver/android.txt
@@ -3548,3 +3548,5 @@ winsize
wmemchr
write
writev
+dirname
+basename \ No newline at end of file
diff --git a/libc-test/semver/apple.txt b/libc-test/semver/apple.txt
index 7235418174..95af36bbb4 100644
--- a/libc-test/semver/apple.txt
+++ b/libc-test/semver/apple.txt
@@ -2227,3 +2227,5 @@ wait4
waitid
xsw_usage
xucred
+dirname
+basename \ No newline at end of file
diff --git a/libc-test/semver/dragonfly.txt b/libc-test/semver/dragonfly.txt
index fa472ce662..f8f0fa0891 100644
--- a/libc-test/semver/dragonfly.txt
+++ b/libc-test/semver/dragonfly.txt
@@ -1546,3 +1546,5 @@ wait4
waitid
xucred
eaccess
+dirname
+basename
diff --git a/libc-test/semver/freebsd.txt b/libc-test/semver/freebsd.txt
index 649ef77161..09bda1f2dd 100644
--- a/libc-test/semver/freebsd.txt
+++ b/libc-test/semver/freebsd.txt
@@ -1925,4 +1925,6 @@ wait4
waitid
xallocx
xucred
-eaccess \ No newline at end of file
+eaccess
+dirname
+basename \ No newline at end of file
diff --git a/libc-test/semver/linux-gnu.txt b/libc-test/semver/linux-gnu.txt
index a4289ad849..bf663a1930 100644
--- a/libc-test/semver/linux-gnu.txt
+++ b/libc-test/semver/linux-gnu.txt
@@ -657,4 +657,7 @@ eaccess
asctime_r
ctime_r
strftime
-strptime \ No newline at end of file
+strptime
+dirname
+posix_basename
+gnu_basename \ No newline at end of file
diff --git a/libc-test/semver/linux-musl.txt b/libc-test/semver/linux-musl.txt
index c00934af10..7af1418931 100644
--- a/libc-test/semver/linux-musl.txt
+++ b/libc-test/semver/linux-musl.txt
@@ -52,4 +52,6 @@ euidaccess
eaccess
asctime_r
strftime
-strptime \ No newline at end of file
+strptime
+dirname
+basename \ No newline at end of file
diff --git a/libc-test/semver/netbsd.txt b/libc-test/semver/netbsd.txt
index f14f2eae45..97d76cb304 100644
--- a/libc-test/semver/netbsd.txt
+++ b/libc-test/semver/netbsd.txt
@@ -1533,3 +1533,5 @@ uucred
vm_size_t
wait4
waitid
+dirname
+basename \ No newline at end of file
diff --git a/libc-test/semver/openbsd.txt b/libc-test/semver/openbsd.txt
index 0ae23f549b..d540671e1b 100644
--- a/libc-test/semver/openbsd.txt
+++ b/libc-test/semver/openbsd.txt
@@ -1231,3 +1231,5 @@ utmp
utrace
wait4
xucred
+dirname
+basename \ No newline at end of file