From owner-svn-src-stable@FreeBSD.ORG Wed Sep 22 18:43:47 2010 Return-Path: Delivered-To: svn-src-stable@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 89C181065675; Wed, 22 Sep 2010 18:43:47 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from gse-mta-27.emailfiltering.com (gse-mta-27-tx.emailfiltering.com [194.116.198.158]) by mx1.freebsd.org (Postfix) with ESMTP id 980568FC1B; Wed, 22 Sep 2010 18:43:46 +0000 (UTC) Received: from mail-gw12.york.ac.uk ([144.32.129.162]) by gse-mta-27.emailfiltering.com with emfmta (version 4.6.0.72) by TLS id 753887668 for rpaulo@FreeBSD.org; 8f2afc23033486d2; Wed, 22 Sep 2010 19:32:27 +0100 Received: from buffy-128.york.ac.uk ([144.32.128.160]:39705 helo=buffy.york.ac.uk) by mail-gw12.york.ac.uk with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1OyU7G-0000Ji-UA; Wed, 22 Sep 2010 19:32:26 +0100 Received: from buffy.york.ac.uk (localhost [127.0.0.1]) by buffy.york.ac.uk (8.14.4/8.14.4) with ESMTP id o8MIWQZO065567; Wed, 22 Sep 2010 19:32:26 +0100 (BST) (envelope-from gavin@FreeBSD.org) Received: (from ga9@localhost) by buffy.york.ac.uk (8.14.4/8.14.4/Submit) id o8MIWQBk065566; Wed, 22 Sep 2010 19:32:26 +0100 (BST) (envelope-from gavin@FreeBSD.org) X-Authentication-Warning: buffy.york.ac.uk: ga9 set sender to gavin@FreeBSD.org using -f From: Gavin Atkinson To: Rui Paulo In-Reply-To: <201009221800.o8MI0Ze3038214@svn.freebsd.org> References: <201009221800.o8MI0Ze3038214@svn.freebsd.org> Content-Type: text/plain; charset="ASCII" Content-Transfer-Encoding: quoted-printable Date: Wed, 22 Sep 2010 19:32:25 +0100 Message-ID: <1285180346.65489.3.camel@buffy.york.ac.uk> Mime-Version: 1.0 X-Mailer: Evolution 2.30.1.2 FreeBSD GNOME Team Port 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 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Sep 2010 18:43:47 -0000 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)