Remove basename_r(3).
Now that the POSIX working group is going to require that basename(3) and dirname(3) are thread-safe in future revisions of the standard, there is even less of a need to provide basename_r(3). Remove this function to prevent people from writing code that only builds on FreeBSD and Bionic. Removing this function seems to break exactly one port: sbruno@'s qemu-user-static. I will send him a pull request on GitHub in a bit. __FreeBSD_version will not be bumped, as any value from 2017 can be used to test for the presence of a thread-safe basename(3)/dirname(3). PR: https://bugs.freebsd.org/224016
This commit is contained in:
parent
cbde6ac324
commit
6c093deeda
@ -38,6 +38,8 @@
|
||||
# xargs -n1 | sort | uniq -d;
|
||||
# done
|
||||
|
||||
# 20171208: Remove basename_r(3)
|
||||
OLD_FILES+=usr/share/man/man3/basename_r.3.gz
|
||||
# 20171204: Move fdformat man page from volume 1 to volume 8.
|
||||
OLD_FILES+=usr/share/man/man1/fdformat.1.gz
|
||||
# 20171203: libproc version bump
|
||||
|
@ -37,7 +37,6 @@
|
||||
|
||||
__BEGIN_DECLS
|
||||
char *basename(char *);
|
||||
char *basename_r(const char *, char *);
|
||||
char *dirname(char *);
|
||||
__END_DECLS
|
||||
|
||||
|
@ -312,7 +312,6 @@ MLINKS+=arc4random.3 arc4random_addrandom.3 \
|
||||
arc4random.3 arc4random_stir.3 \
|
||||
arc4random.3 arc4random_buf.3 \
|
||||
arc4random.3 arc4random_uniform.3
|
||||
MLINKS+=basename.3 basename_r.3
|
||||
MLINKS+=ctermid.3 ctermid_r.3
|
||||
MLINKS+=devname.3 devname_r.3
|
||||
MLINKS+=devname.3 fdevname.3
|
||||
|
@ -332,7 +332,6 @@ FBSD_1.1 {
|
||||
};
|
||||
|
||||
FBSD_1.2 {
|
||||
basename_r;
|
||||
cfmakesane;
|
||||
endutxent;
|
||||
getpagesizes;
|
||||
|
@ -26,7 +26,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <sys/param.h>
|
||||
|
||||
char *
|
||||
basename_r(const char *path, char *bname)
|
||||
__freebsd11_basename_r(const char *path, char *bname)
|
||||
{
|
||||
const char *endp, *startp;
|
||||
size_t len;
|
||||
@ -75,7 +75,8 @@ __freebsd11_basename(char *path)
|
||||
if (bname == NULL)
|
||||
return (NULL);
|
||||
}
|
||||
return (basename_r(path, bname));
|
||||
return (__freebsd11_basename_r(path, bname));
|
||||
}
|
||||
|
||||
__sym_compat(basename_r, __freebsd11_basename_r, FBSD_1.2);
|
||||
__sym_compat(basename, __freebsd11_basename, FBSD_1.0);
|
||||
|
Loading…
Reference in New Issue
Block a user