Page MenuHomeFreeBSD

D7356.id18861.diff
No OneTemporary

D7356.id18861.diff

Index: lib/libc/gen/basename.3
===================================================================
--- lib/libc/gen/basename.3
+++ lib/libc/gen/basename.3
@@ -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 provided 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 be obsolete.
.Sh RETURN VALUES
On successful completion,
.Fn basename
Index: lib/libc/gen/dirname.3
===================================================================
--- lib/libc/gen/dirname.3
+++ lib/libc/gen/dirname.3
@@ -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 provided 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

Mime Type
text/plain
Expires
Thu, Oct 15, 2:10 PM (8 h, 49 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
40852152
Default Alt Text
D7356.id18861.diff (1 KB)

Event Timeline