Date: Fri, 8 Dec 2017 22:06:18 +0000 (UTC) From: Ed Schouten <ed@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326719 - in head: . include lib/libc/gen Message-ID: <201712082206.vB8M6Ipe050619@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ed Date: Fri Dec 8 22:06:18 2017 New Revision: 326719 URL: https://svnweb.freebsd.org/changeset/base/326719 Log: 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 Modified: head/ObsoleteFiles.inc head/include/libgen.h head/lib/libc/gen/Makefile.inc head/lib/libc/gen/Symbol.map head/lib/libc/gen/basename_compat.c Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Fri Dec 8 21:59:50 2017 (r326718) +++ head/ObsoleteFiles.inc Fri Dec 8 22:06:18 2017 (r326719) @@ -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 Modified: head/include/libgen.h ============================================================================== --- head/include/libgen.h Fri Dec 8 21:59:50 2017 (r326718) +++ head/include/libgen.h Fri Dec 8 22:06:18 2017 (r326719) @@ -37,7 +37,6 @@ __BEGIN_DECLS char *basename(char *); -char *basename_r(const char *, char *); char *dirname(char *); __END_DECLS Modified: head/lib/libc/gen/Makefile.inc ============================================================================== --- head/lib/libc/gen/Makefile.inc Fri Dec 8 21:59:50 2017 (r326718) +++ head/lib/libc/gen/Makefile.inc Fri Dec 8 22:06:18 2017 (r326719) @@ -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 Modified: head/lib/libc/gen/Symbol.map ============================================================================== --- head/lib/libc/gen/Symbol.map Fri Dec 8 21:59:50 2017 (r326718) +++ head/lib/libc/gen/Symbol.map Fri Dec 8 22:06:18 2017 (r326719) @@ -332,7 +332,6 @@ FBSD_1.1 { }; FBSD_1.2 { - basename_r; cfmakesane; endutxent; getpagesizes; Modified: head/lib/libc/gen/basename_compat.c ============================================================================== --- head/lib/libc/gen/basename_compat.c Fri Dec 8 21:59:50 2017 (r326718) +++ head/lib/libc/gen/basename_compat.c Fri Dec 8 22:06:18 2017 (r326719) @@ -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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201712082206.vB8M6Ipe050619>