From 22de35abe7d46e014f4ab02c51d3385fda10d4f1 Mon Sep 17 00:00:00 2001 From: Rui Paulo Date: Wed, 22 Sep 2010 18:00:34 +0000 Subject: 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. --- include/libgen.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') 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 *, ...); -- cgit v1.3