From a8d890b4fbf207901b0508bb093e1a6f5e57a0fa Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Tue, 2 Aug 2016 23:46:32 +0000 Subject: Add link for getnetgrent_r(3). MFC after: 3 days Sponsored by: EMC / Isilon Storage Division --- lib/libc/gen/Makefile.inc | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/libc/gen/Makefile.inc') diff --git a/lib/libc/gen/Makefile.inc b/lib/libc/gen/Makefile.inc index a68f5c7ff13f..696d907ac609 100644 --- a/lib/libc/gen/Makefile.inc +++ b/lib/libc/gen/Makefile.inc @@ -390,6 +390,7 @@ MLINKS+=getgrent.3 endgrent.3 \ getgrent.3 getgrgid_r.3 MLINKS+=gethostname.3 sethostname.3 MLINKS+=getnetgrent.3 endnetgrent.3 \ + getnetgrent.3 getnetgrent_r.3 \ getnetgrent.3 innetgr.3 \ getnetgrent.3 setnetgrent.3 MLINKS+=getprogname.3 setprogname.3 -- cgit v1.2.3 From e2f68161004f312bf10e4b683ac866b45f6e8489 Mon Sep 17 00:00:00 2001 From: Ed Schouten Date: Fri, 12 Aug 2016 07:03:58 +0000 Subject: Reimplement dirname(3) to be thread-safe. Now that we've updated the prototypes of the basename(3) and dirname(3) functions to conform to POSIX, let's go ahead and reimplement dirname(3) in such a way that it's thread-safe, but also guaranteed to succeed. C libraries like glibc, musl and the one that's part of Solaris already follow such an approach. Move the existing implementation to another source file, freebsd11_dirname.c to keep existing users of the API that pass in a constant string happy, using symbol versioning. Put a new version of the function in dirname.c, obtained from CloudABI's C library. This version scans through the pathname string from left to right, normalizing it, while discarding the last pathname component. Reviewed by: emaste, jilles Differential Revision: https://reviews.freebsd.org/D7355 --- lib/libc/gen/Makefile.inc | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/libc/gen/Makefile.inc') diff --git a/lib/libc/gen/Makefile.inc b/lib/libc/gen/Makefile.inc index 696d907ac609..58f582fb4e73 100644 --- a/lib/libc/gen/Makefile.inc +++ b/lib/libc/gen/Makefile.inc @@ -29,6 +29,7 @@ SRCS+= __getosreldate.c \ devname.c \ dirfd.c \ dirname.c \ + dirname_compat.c \ disklabel.c \ dlfcn.c \ drand48.c \ -- cgit v1.2.3