Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F150308704
D7356.id18877.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D7356.id18877.diff
View Options
Index: head/lib/libc/gen/basename.3
===================================================================
--- head/lib/libc/gen/basename.3
+++ head/lib/libc/gen/basename.3
@@ -16,7 +16,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd July 28, 2016
+.Dd July 29, 2016
.Dt BASENAME 3
.Os
.Sh NAME
@@ -61,8 +61,16 @@
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
Index: head/lib/libc/gen/dirname.3
===================================================================
--- head/lib/libc/gen/dirname.3
+++ head/lib/libc/gen/dirname.3
@@ -16,7 +16,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd July 28, 2016
+.Dd July 29, 2016
.Dt DIRNAME 3
.Os
.Sh NAME
@@ -56,10 +56,11 @@
.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
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Apr 1, 2:22 AM (4 h, 38 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30660691
Default Alt Text
D7356.id18877.diff (1 KB)
Attached To
Mode
D7356: Mention that basename(3) and dirname(3) will change in the future.
Attached
Detach File
Event Timeline
Log In to Comment