Date: Wed, 22 Sep 2010 19:32:25 +0100 From: Gavin Atkinson <gavin@FreeBSD.org> To: Rui Paulo <rpaulo@FreeBSD.org> Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-8@FreeBSD.org Subject: Re: svn commit: r213002 - in stable/8: include lib/libc/gen Message-ID: <1285180346.65489.3.camel@buffy.york.ac.uk> In-Reply-To: <201009221800.o8MI0Ze3038214@svn.freebsd.org> References: <201009221800.o8MI0Ze3038214@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 2010-09-22 at 18:00 +0000, Rui Paulo wrote: > Author: rpaulo > Date: Wed Sep 22 18:00:34 2010 > New Revision: 213002 > URL: http://svn.freebsd.org/changeset/base/213002 >=20 > Log: > MFC r197804 (rwatson): > Add basename_r(3) to complement basename(3). basename_r(3) which acc= epts > a caller-allocated buffer of at least MAXPATHLEN, rather than using a > global buffer. > =20 > 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. Are you sure? Ours (just introduced): char * basename_r(path, bname) Android (from [1]): int basename_r(const char* path, char* buffer, size_t bufflen) The semantics seem very different. Ours allocates a buffer, on Android you pass in a buffer, for a start. Gavin [1] http://android.git.kernel.org/?p=3Dplatform/bionic.git;a=3Dblob;f=3Dlibc/bi= onic/basename_r.c;h=3De9080f058b6012f1bce77c72befc8f9fc213aed9;hb=3Da799b53= f10e5a6fd51fef4436cfb7ec99836a516 --=20 Gavin Atkinson FreeBSD committer and bugmeister GPG: A093262B (313A A79F 697D 3A5C 216A EDF5 935D EF44 A093 262B)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1285180346.65489.3.camel>