freebsd-nq/lib
Ed Schouten 34168b28e9 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
2016-11-03 20:21:34 +00:00
..
atf Don't bake all of CC/CPP/CXX into CFLAGS 2016-09-01 02:42:11 +00:00
clang DIRDEPS_BUILD: Update dependencies. 2016-08-31 19:30:46 +00:00
csu Update ^/vendor/NetBSD/tests/dist to a more recent snapshot 2016-08-12 01:05:07 +00:00
lib80211 First pass through library packaging. 2016-02-04 21:16:35 +00:00
libalias Update libalias and libpam packaged files. 2016-02-05 01:03:38 +00:00
libarchive Create a new MACHINE_ARCH for Freescale PowerPC e500v2 2016-10-22 01:57:15 +00:00
libauditd First pass through library packaging. 2016-02-04 21:16:35 +00:00
libbegemot First pass through library packaging. 2016-02-04 21:16:35 +00:00
libblacklist DIRDEPS_BUILD: Connect new directories and update dependencies. 2016-06-03 19:25:30 +00:00
libblocksruntime First pass through library packaging. 2016-02-04 21:16:35 +00:00
libbluetooth Improve performance and functionality of the bitstring(3) api 2016-05-04 22:34:11 +00:00
libbsdstat Fix off by one error in index limit calculation 2016-05-16 15:42:59 +00:00
libbsm First pass through library packaging. 2016-02-04 21:16:35 +00:00
libbsnmp Remove NO_WERROR from libbsnmp/Makefile.inc 2016-05-13 21:17:49 +00:00
libbz2 First pass through library packaging. 2016-02-04 21:16:35 +00:00
libc Replace basename(3) by a thread-safe implementation. 2016-11-03 20:21:34 +00:00
libc_nonshared Add META_MODE support. 2015-06-13 19:20:56 +00:00
libc++ Revert 305098 2016-08-31 00:11:35 +00:00
libcalendar First pass through library packaging. 2016-02-04 21:16:35 +00:00
libcam Fix multiple Coverity Out-of-bounds access false postive issues in CAM 2016-05-24 00:57:11 +00:00
libcapsicum Fix few sentence in the man page. 2016-10-21 16:31:58 +00:00
libcasper Set SHLIBDIR before .including src.opts.mk in libcapser services 2016-10-24 14:37:18 +00:00
libclang_rt DIRDEPS_BUILD: Update dependencies 2016-06-14 16:55:05 +00:00
libcom_err First pass through library packaging. 2016-02-04 21:16:35 +00:00
libcompat Fix Coverity CID 978183 Resource leak in rexec(). 2016-05-25 07:26:22 +00:00
libcompiler_rt o Add support for long double. 2016-11-03 13:06:17 +00:00
libcrypt Make libcrypt thread-safe. Add crypt_r(3). 2016-08-10 15:16:28 +00:00
libcuse libcuse: make more use of the howmany() macro when available. 2016-04-26 01:20:16 +00:00
libcxxrt libcxxrt: correct mangled "typeinfo name" symbols in Version.map 2016-06-29 11:48:42 +00:00
libdevctl Implement 'devctl clear driver' to undo a previous 'devctl set driver'. 2016-08-29 22:48:36 +00:00
libdevdctl directly create the socket with SOCK_NONBLOCK instead of calling fcntl(2) 2016-10-15 13:16:52 +00:00
libdevinfo MFH 2016-04-04 23:55:32 +00:00
libdevstat First pass through library packaging. 2016-02-04 21:16:35 +00:00
libdpv MFH 2016-03-02 16:14:46 +00:00
libdwarf elftoolchain: Use ${SRCTOP} for the top of the FreeBSD tree 2016-04-21 12:58:29 +00:00
libedit When MAKEOBJDIRPREFIX points to a case-insensitive file system, the 2016-09-24 15:11:27 +00:00
libefivar Fix building on i386 and arm. But 'public domain' headers on the files 2016-10-13 06:56:23 +00:00
libelf elftoolchain: Use ${SRCTOP} for the top of the FreeBSD tree 2016-04-21 12:58:29 +00:00
libelftc Update to ELF Tool Chain r3490 2016-08-31 15:05:04 +00:00
libevent First pass through library packaging. 2016-02-04 21:16:35 +00:00
libexecinfo Update ^/vendor/NetBSD/tests/dist to a more recent snapshot 2016-08-12 01:05:07 +00:00
libexpat First pass through library packaging. 2016-02-04 21:16:35 +00:00
libfetch r169386 (PR 112515) was incomplete: it treated 307 as an error except 2016-05-31 08:27:39 +00:00
libfigpar MFH 2016-03-02 16:14:46 +00:00
libgcc_eh compile libunwind c source with -fexceptions 2016-10-30 02:57:47 +00:00
libgcc_s Move the LLVM-based libgcc_s to /lib 2016-10-24 14:56:13 +00:00
libgeom First pass through library packaging. 2016-02-04 21:16:35 +00:00
libgpio Use GPIOTOGGLE to toggle the pin state instead of read, modify and write. 2016-04-19 15:18:31 +00:00
libgssapi lib: minor spelling fixes in comments. 2016-05-01 19:37:33 +00:00
libiconv_modules META MODE: Prefer INSTALL=tools/install.sh to lessen the need for xinstall.host. 2015-11-25 19:10:28 +00:00
libifconfig Mark libifconfig as private until the API/ABI is stable 2016-09-11 17:44:35 +00:00
libipsec libipsec: use NULL instead of zero for pointers. 2016-04-18 15:08:31 +00:00
libjail Fix libjail reached latest sysctl entry. 2016-10-02 11:56:17 +00:00
libkiconv lib: minor spelling fixes in comments. 2016-05-01 19:37:33 +00:00
libkvm libkvm: Improve physical address lookup scaling. 2016-07-18 01:55:25 +00:00
libldns First pass through library packaging. 2016-02-04 21:16:35 +00:00
liblzma First pass through library packaging. 2016-02-04 21:16:35 +00:00
libmagic Fix build: explicitly reference the generated magic.h as dependency 2016-06-27 06:41:11 +00:00
libmd Fix C++ includability of crypto headers with static array sizes 2016-10-18 23:20:49 +00:00
libmemstat MFH 2016-02-10 04:20:39 +00:00
libmilter MFH 2016-03-02 16:14:46 +00:00
libmp libmp: Fix trivial buffer overrun 2016-05-12 03:53:20 +00:00
libmt Add the density code for LTO-7 to libmt and the mt(1) man page. 2016-05-20 19:30:52 +00:00
libnandfs First pass through library packaging. 2016-02-04 21:16:35 +00:00
libnetbsd Include "util.h", not <util.h>. The header is in the same directory 2016-10-24 17:57:46 +00:00
libnetgraph First pass through library packaging. 2016-02-04 21:16:35 +00:00
libngatm First pass through library packaging. 2016-02-04 21:16:35 +00:00
libnv Fix style issue in the cnv API. 2016-08-27 13:40:27 +00:00
libopenbsd First pass through library packaging. 2016-02-04 21:16:35 +00:00
libopie First pass through library packaging. 2016-02-04 21:16:35 +00:00
libpam Remove support for SSH1 as it is already disabled in our OpenSSH. 2016-08-22 20:48:46 +00:00
libpcap libpcap: replace comma with semicolon when pertinent. 2016-08-09 19:44:33 +00:00
libpe DIRDEPS_BUILD: Update dependencies. 2016-02-16 02:14:30 +00:00
libpjdlog MFH 2016-03-02 16:14:46 +00:00
libpmc lib: minor spelling fixes in comments. 2016-05-01 19:37:33 +00:00
libproc Use uint32_t instead of u_long as a storage for breakpoint instruction 2016-10-26 14:26:45 +00:00
libprocstat When MAKEOBJDIRPREFIX points to a case-insensitive file system, the 2016-09-24 15:11:27 +00:00
libradius The NAS-Identifier attribute is a string, not an integer. 2016-05-24 11:44:43 +00:00
librpcsec_gss librpcsec_gss: remove redundant code. 2016-05-11 14:37:33 +00:00
librpcsvc MFH 2016-03-02 16:14:46 +00:00
librss [rss] manpage improvements. 2016-10-23 20:42:32 +00:00
librt Export the mq_getfd_np() symbol from librt.so, which allows to get 2016-10-02 17:02:59 +00:00
librtld_db DIRDEPS_BUILD: Update dependencies. 2016-08-31 19:30:46 +00:00
libsbuf First pass through library packaging. 2016-02-04 21:16:35 +00:00
libsdp lib: minor spelling fixes in comments. 2016-05-01 19:37:33 +00:00
libsm MFH 2016-03-02 16:14:46 +00:00
libsmb First pass through library packaging. 2016-02-04 21:16:35 +00:00
libsmdb MFH 2016-03-02 16:14:46 +00:00
libsmutil MFH 2016-03-02 16:14:46 +00:00
libsqlite3 First pass through library packaging. 2016-02-04 21:16:35 +00:00
libstand When issuing a PXE dhcp request, always issue a param request (DHCP option 55) 2016-10-31 15:11:55 +00:00
libstdbuf First pass through library packaging. 2016-02-04 21:16:35 +00:00
libstdthreads First pass through library packaging. 2016-02-04 21:16:35 +00:00
libsysdecode Use binary and (&) instead of logical to extract the mask of a capability. 2016-10-25 18:45:14 +00:00
libtacplus First pass through library packaging. 2016-02-04 21:16:35 +00:00
libtelnet First pass through library packaging. 2016-02-04 21:16:35 +00:00
libthr When MAKEOBJDIRPREFIX points to a case-insensitive file system, the 2016-09-24 15:11:27 +00:00
libthread_db First pass through library packaging. 2016-02-04 21:16:35 +00:00
libucl Use SRCTOP to find the sources of libucl 2016-10-15 13:17:27 +00:00
libufs libufs: Simplify generation number calculation. 2016-05-18 19:59:05 +00:00
libugidfw First pass through library packaging. 2016-02-04 21:16:35 +00:00
libulog First pass through library packaging. 2016-02-04 21:16:35 +00:00
libunbound Upgrade to Unbound 1.5.9. 2016-09-04 12:17:57 +00:00
libusb Fix libusb20_dev_get_desc(3) to use the "vendor product" order, not 2016-10-22 14:37:13 +00:00
libusbhid Remove CVS directories accidentally added in r303980 2016-08-12 06:16:14 +00:00
libutil Use kqueue(2) instead of select(2). 2016-09-21 11:59:52 +00:00
libvgl MFH 2016-04-13 16:19:50 +00:00
libvmmapi lib: minor spelling fixes in comments. 2016-05-01 19:37:33 +00:00
libwrap First pass through library packaging. 2016-02-04 21:16:35 +00:00
libxo Submitted by: phil 2016-05-29 01:43:28 +00:00
liby First pass through library packaging. 2016-02-04 21:16:35 +00:00
libypclnt MFH 2016-04-16 02:32:12 +00:00
libz MFH 2016-04-04 23:55:32 +00:00
msun o Add support for long double. 2016-11-03 13:06:17 +00:00
ncurses DIRDEPS_BUILD: Run the staged bootstrap-tools version of build-tools. 2016-05-09 22:21:09 +00:00
tests Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installed 2016-05-04 23:20:53 +00:00
Makefile Simplify logic for libproc and librtld_db in lib/Makefile 2016-10-14 17:04:07 +00:00
Makefile.inc