This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [GLIBC][PATCH v2] Remove strdup inlines
On Tue, 13 Dec 2016, Andreas Schwab wrote:
> On Dez 12 2016, Joseph Myers <joseph@codesourcery.com> wrote:
>
> > GCC can only do that in general for C90 functions. Consider someone
> > selecting strict POSIX with -std=c99 -D_POSIX_C_SOURCE=200809L; glibc
> > knows these names are reserved in that context, GCC doesn't. (Well, for
> > str* there's strictly a general C reservation, but glibc doesn't take
> > advantage of it.)
>
> That reservation is only active when the associated header is included.
No, the reservation with external linkage doesn't depend on the header
being included. (C90 Amendment 1 did have such a limited reservation,
depending on header inclusion somewhere in the program, for the new
functions it added, but not any other version of standard C.)
--
Joseph S. Myers
joseph@codesourcery.com