This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [GLIBC][PATCH] Remove string/bits/string2.h header
- From: Zack Weinberg <zackw at panix dot com>
- To: Wilco Dijkstra <Wilco dot Dijkstra at arm dot com>
- Cc: "libc-alpha at sourceware dot org" <libc-alpha at sourceware dot org>, nd <nd at arm dot com>
- Date: Mon, 12 Dec 2016 07:46:08 -0500
- Subject: Re: [GLIBC][PATCH] Remove string/bits/string2.h header
- Authentication-results: sourceware.org; auth=none
- References: <AM5PR0802MB2610AE28A40007CBBF8A338E83980@AM5PR0802MB2610.eurprd08.prod.outlook.com>
On Mon, Dec 12, 2016 at 7:32 AM, Wilco Dijkstra <Wilco.Dijkstra@arm.com> wrote:
> After patches [1-5] there is no longer a need for string2.h.
> Move the remaining defines for __bzero and __stpcpy to string.h
> (these are needed as otherwise elf/localplt fails) and remove all
> mention of string2.h.
I'd prefer that this header stick around, even if there is no
_current_ use for it. I need somewhere to put the inline expansion of
explicit_bzero (see
https://sourceware.org/ml/libc-alpha/2016-12/msg00274.html) and it
seems likely to me that new uses will appear.
> +#ifdef __USE_MISC
> +# define __bzero(s, n) __builtin_memset (s, '\0', n)
> +#endif
> +
> +#ifdef __USE_XOPEN2K8
> +# ifndef __stpcpy
> +# define __stpcpy(dest, src) __builtin_stpcpy (dest, src)
> +# endif
> +#endif
These can probably go in include/string.h instead of string/string.h.
zw