diff options
author | Jason McIntyre <jmc@cvs.openbsd.org> | 2005-11-12 15:57:31 +0000 |
---|---|---|
committer | Jason McIntyre <jmc@cvs.openbsd.org> | 2005-11-12 15:57:31 +0000 |
commit | 1a49da8fa7890393f79093e9e9bf0aec25db05ff (patch) | |
tree | 2b190c681cc56b86c07b13857b20baca29ee652e /lib | |
parent | a2235ae2815fbe930bb042cd0fcfffa5cefabd45 (diff) |
- note that basename() may modify the string
- section header WARNING -> CAVEATS while here
from han boetes;
ok deraadt@
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/gen/basename.3 | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/lib/libc/gen/basename.3 b/lib/libc/gen/basename.3 index 25dab2e046e..e3c4ddd2e2c 100644 --- a/lib/libc/gen/basename.3 +++ b/lib/libc/gen/basename.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: basename.3,v 1.18 2003/07/30 22:29:32 millert Exp $ +.\" $OpenBSD: basename.3,v 1.19 2005/11/12 15:57:30 jmc Exp $ .\" .\" Copyright (c) 1997 Todd C. Miller <Todd.Miller@courtesan.com> .\" @@ -63,10 +63,6 @@ The following error codes may be set in The path component to be returned was larger than .Dv MAXPATHLEN . .El -.Sh WARNINGS -.Fn basename -returns a pointer to internal static storage space that will be overwritten -by subsequent calls. .Sh SEE ALSO .Xr basename 1 , .Xr dirname 1 , @@ -83,3 +79,14 @@ function first appeared in .Ox 2.2 . .Sh AUTHORS .An Todd C. Miller +.Sh CAVEATS +.Fn basename +returns a pointer to internal static storage space that will be overwritten +by subsequent calls. +.Pp +Other vendor implementations of +.Fn basename +may modify the contents of the string passed to +.Fn basename ; +this should be taken into account when writing code which calls this function +if portability is desired. |