Now that the POSIX folks have agreed on requiring that basename() and dirname() have to be thread-safe, there is even less of a need to provide our FreeBSD-specific copy of basename_r(). Relevant links: POSIX working group discussion: http://austingroupbugs.net/view.php?id=1064 Old exp-run for adding POSIX versions of basename() and dirname(): https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=209747 As we no longer make use of basename_r() in our own base system, I would hereby like to request an exp-run to see what happens if we remove it entirely. Here's a patch I'm planning on committing: http://80386.nl/pub/20171201-basename_r.txt Thanks, Ed
There is 1 new failure: http://package22.nyi.freebsd.org/data/headamd64PR224016-default/2017-12-06_23h49m56s/logs/errors/qemu-user-static-2.9.94.g20171023.log
A commit references this bug: Author: ed Date: Fri Dec 8 22:06:18 UTC 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 Changes: 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
Thanks for testing, Antoine! I've just committed the change to remove basename_r(3) from the base system. I also sent a pull request to Sean to fix the build of qemu-user-static on FreeBSD HEAD: https://github.com/seanbruno/qemu-bsd-user/pull/61 I'm reassigning this bug to Sean to ensure this won't slip off the radar.
A commit references this bug: Author: sbruno Date: Sun Dec 17 00:14:17 UTC 2017 New revision: 456518 URL: https://svnweb.freebsd.org/changeset/ports/456518 Log: emulators/qemu-sbruno emulators/qemu-user-static Update to 2.11.50 + patches from submitters. Upstream introduced some git nonsense with remotes inside their repos. Change the way we fetch our distributions with GH_TUPLE instead of the previous way. Clean up a couple lines commented out for the PCAP features that aren't stored in a patch, but merely direct committed to this tree. - Remove the interpreter name and interpreter prefix when retrieving the argument vectors using kvm_getargv (Mikael Urankar) - No need to check msg_controllen: msg_controllen can have the value 0 and the kernel discards negative value (Mikael Urankar) - Implement/modify kevent64 related syscalls. (Mikael Urankar) - Implement ktimer_{create, delete, settime, gettime} (Mikael Urankar) - Stop using basename_r(3). Fix build after FreeBSD svn r326719 (Ed Shouten) Changelogs can be found at https://github.com/seanbruno/qemu-bsd-user PR: 224016 Changes: head/emulators/qemu-sbruno/Makefile head/emulators/qemu-sbruno/distinfo head/emulators/qemu-sbruno/files/cdrom-dma-patch head/emulators/qemu-sbruno/files/patch-Makefile