diff options
author | ed <ed@FreeBSD.org> | 2016-08-05 05:50:27 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2016-08-05 05:50:27 +0000 |
commit | 1cbd7a839091d3175784813440663c9e944c669f (patch) | |
tree | 9218799b21e578df9a599b51b7453da6813f8935 /lib | |
parent | 816162fb8eb1d226fbbbc24abe74844466da0f81 (diff) | |
download | FreeBSD-src-1cbd7a839091d3175784813440663c9e944c669f.zip FreeBSD-src-1cbd7a839091d3175784813440663c9e944c669f.tar.gz |
MFC r303486:
Mention that basename(3) and dirname(3) will change in the future.
Update the existing manual pages for basename(3) and dirname(3) to
mention that in future versions of FreeBSD, these functions will no
longer use internal buffers for storing the results.
Approved by: re@
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/gen/basename.3 | 12 | ||||
-rw-r--r-- | lib/libc/gen/dirname.3 | 11 |
2 files changed, 16 insertions, 7 deletions
diff --git a/lib/libc/gen/basename.3 b/lib/libc/gen/basename.3 index bcdd99e..1e8cccb 100644 --- a/lib/libc/gen/basename.3 +++ b/lib/libc/gen/basename.3 @@ -16,7 +16,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 31, 2010 +.Dd July 29, 2016 .Dt BASENAME 3 .Os .Sh NAME @@ -61,8 +61,16 @@ function returns a pointer to internal storage space allocated on the first call that will be overwritten by subsequent calls. +.Pp +Other vendor implementations of +.Fn basename +may store their result in the input buffer, +making it safe to use in multithreaded applications. +Future versions of +.Fx +will follow this approach as well. .Fn basename_r -is therefore preferred for threaded applications. +will then become obsolete. .Sh RETURN VALUES On successful completion, .Fn basename diff --git a/lib/libc/gen/dirname.3 b/lib/libc/gen/dirname.3 index ba5cce3..1024992 100644 --- a/lib/libc/gen/dirname.3 +++ b/lib/libc/gen/dirname.3 @@ -16,7 +16,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 12, 2006 +.Dd July 29, 2016 .Dt DIRNAME 3 .Os .Sh NAME @@ -56,10 +56,11 @@ by subsequent calls. .Pp Other vendor implementations of .Fn dirname -may modify the contents of the string passed to -.Fn dirname ; -this should be taken into account when writing code which calls this function -if portability is desired. +may store their result in the input buffer, +making it safe to use in multithreaded applications. +Future versions of +.Fx +will follow this approach as well. .Sh RETURN VALUES On successful completion, .Fn dirname |