aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/gen/Symbol.map
diff options
context:
space:
mode:
authorEd Schouten <ed@FreeBSD.org>2016-11-03 20:21:34 +0000
committerEd Schouten <ed@FreeBSD.org>2016-11-03 20:21:34 +0000
commit34168b28e99b0bb328c7bb49cd91cb942181056f (patch)
treed87ccf079f0846f66d2897554768fb78925732fa /lib/libc/gen/Symbol.map
parent1bec4c5b3d970c741ffcb08a40080924e6ce97af (diff)
downloadsrc-34168b28e99b0bb328c7bb49cd91cb942181056f.tar.gz
src-34168b28e99b0bb328c7bb49cd91cb942181056f.zip
Replace basename(3) by a thread-safe implementation.
Now that the changes to the dirname(3) function had some time to settle, let's go ahead and use the same approach for replacing basename(3) by a simple implementation that modifies the input string, thereby making it thread-safe and guaranteed to succeed. Unlike dirname(3), this function already had a thread-safe variant basename_r(3). This function had its own set of problems, like having an upper bound on the pathname length. Keep this function around for compatibility, but remove most references from the man page. Make the man page more similar to that of dirname(3). As the basename_r(3) function is only provided by FreeBSD (and Bionic), depending on its use is even more implementation defined than assuming that basename(3) is thread-safe. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D8382
Notes
Notes: svn path=/head/; revision=308264
Diffstat (limited to 'lib/libc/gen/Symbol.map')
-rw-r--r--lib/libc/gen/Symbol.map2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/gen/Symbol.map b/lib/libc/gen/Symbol.map
index 151987361b8d..4b07a0067be9 100644
--- a/lib/libc/gen/Symbol.map
+++ b/lib/libc/gen/Symbol.map
@@ -68,7 +68,6 @@ FBSD_1.0 {
arc4random_addrandom;
arc4random_stir;
__assert;
- basename;
check_utility_compat;
clock;
closedir;
@@ -414,6 +413,7 @@ FBSD_1.4 {
};
FBSD_1.5 {
+ basename;
dirname;
};