Date: Wed, 13 Feb 2013 21:34:10 +0200 From: Konstantin Belousov <kostikbel@gmail.com> To: Niclas Zeising <zeising@FreeBSD.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r246766 - in head: include lib/libc/string Message-ID: <20130213193410.GT2522@kib.kiev.ua> In-Reply-To: <201302131546.r1DFkXvN023474@svn.freebsd.org> References: <201302131546.r1DFkXvN023474@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130213193410.GT2522>