diff options
| author | Rui Paulo <rpaulo@FreeBSD.org> | 2010-09-22 18:00:34 +0000 |
|---|---|---|
| committer | Rui Paulo <rpaulo@FreeBSD.org> | 2010-09-22 18:00:34 +0000 |
| commit | 22de35abe7d46e014f4ab02c51d3385fda10d4f1 (patch) | |
| tree | 80ca6c9bf71b1b7392acf11205c15500a819a2cd /include | |
| parent | 8583991a917b22487022d7c491a70d2f08a4e47e (diff) | |
MFC r197804 (rwatson):
Add basename_r(3) to complement basename(3). basename_r(3) which accepts
a caller-allocated buffer of at least MAXPATHLEN, rather than using a
global buffer.
Note about semantics: while this interface is not POSIXy, there's
another major platform that uses it (Android) and the semantics between
the two platforms are pretty much the same.
Notes
svn path=/stable/8/; revision=213002
Diffstat (limited to 'include')
| -rw-r--r-- | include/libgen.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/libgen.h b/include/libgen.h index 3639c712b9fa..0d4472f0168e 100644 --- a/include/libgen.h +++ b/include/libgen.h @@ -36,6 +36,7 @@ __BEGIN_DECLS char *basename(const char *); +char *basename_r(const char *, char *); char *dirname(const char *); #if 0 char *regcmp(const char *, ...); |
