From owner-svn-src-head@FreeBSD.ORG Wed Feb 13 19:34:15 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 7BA7F463; Wed, 13 Feb 2013 19:34:15 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id 1B005AE3; Wed, 13 Feb 2013 19:34:14 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.6/8.14.6) with ESMTP id r1DJYABm045231; Wed, 13 Feb 2013 21:34:11 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.7.4 kib.kiev.ua r1DJYABm045231 Received: (from kostik@localhost) by tom.home (8.14.6/8.14.6/Submit) id r1DJYAQu045230; Wed, 13 Feb 2013 21:34:10 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 13 Feb 2013 21:34:10 +0200 From: Konstantin Belousov To: Niclas Zeising Subject: Re: svn commit: r246766 - in head: include lib/libc/string Message-ID: <20130213193410.GT2522@kib.kiev.ua> References: <201302131546.r1DFkXvN023474@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="8eLqBaCyONfto++n" Content-Disposition: inline In-Reply-To: <201302131546.r1DFkXvN023474@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Feb 2013 19:34:15 -0000 --8eLqBaCyONfto++n Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Feb 13, 2013 at 03:46:33PM +0000, Niclas Zeising wrote: > Author: zeising (doc,ports committer) > Date: Wed Feb 13 15:46:33 2013 > New Revision: 246766 > URL: http://svnweb.freebsd.org/changeset/base/246766 >=20 > Log: > Add strchrnul(), a GNU function similar to strchr(), except that it ret= urns > a pointer to the end of the string, rather than NULL, if the character = was > not found. > =20 > Approved by: theraven >=20 > Added: > head/lib/libc/string/strchrnul.c (contents, props changed) > Modified: > head/include/string.h > head/lib/libc/string/Makefile.inc > head/lib/libc/string/Symbol.map > head/lib/libc/string/strchr.3 >=20 > Modified: head/include/string.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/include/string.h Wed Feb 13 15:43:15 2013 (r246765) > +++ head/include/string.h Wed Feb 13 15:46:33 2013 (r246766) > @@ -74,6 +74,9 @@ char *strcasestr(const char *, const cha > #endif > char *strcat(char * __restrict, const char * __restrict); > char *strchr(const char *, int) __pure; > +#if defined(_GNU_SOURCE) > +char *strchrnul(const char*, int) __pure; > +#endif The GNU_SOURCE namespace is not present on the FreeBSD. We use #if __BSD_VISIBLE namespace delineation for the extensions not covered by any standard namespaces supported by the FreeBSD headers. The only place in the system where system-native headers do check for _GNU_SOURCE, the code also checks for _BSD_SOURCE. --8eLqBaCyONfto++n Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQIcBAEBAgAGBQJRG+qyAAoJEJDCuSvBvK1BXkUP/1YGvs0zexnTEewRBHRKzE9r oheL1pLvbQYViav65Ft993pELDB3ym/rvvGjgdPKmEKavV4gFoQSjrJh3HShey7i E5ncI6ooktSWY8te+/VDPwaUCkrOfb2/9rDwQCmvsxZjl/lH4cQRRCjb7L4KQHYA gV4tINftKG92ZvjbzLPWhlL368/CY6Bokbhjb+1muwDwbfrvgdK2OS8Qu4wyschp lXyXhAZV7hmuhclyPsjKmsBb8f8sd6Pn4SH9r3Lzq1S78IOJqBZCmZy8nLPth0Ik y8Xg+bkB0n30ZbKQm9nO+VzED6+V4GGzSIfjiuQTZGL7tx0ddaLNKjZxoiPggL4H WgWOKRvslu18fcHjUq4mWqt1WRTKSPvnn0USJV5gSbVG2fz2jNa+IVmAr8gBLv08 HqYhCRAym8UStqdoQ9WMN0YHcO0PNYQ7v0zvZzRlvUAf7LRctyXwkuIPiflg9qs1 ehXaqCrTuRbEMpjwChtAU+LkZ9gwMr1KAAvnSjidgSD5VubuYeFwKTDDeTlMDDgx SnhpJeRlYmHEEST6kDj5uOrWefPKvFlREwYkjUmF20Vdyi55KjCKGprtUMldXsQZ MgBRb1CEsEC3kmTtPZs2zoE6IDwD5BkqR5Elj0JOaNNFcMq85gLJPpa/m2iemRip tDh+ARV14odwh8mwm7IT =T541 -----END PGP SIGNATURE----- --8eLqBaCyONfto++n--