This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 1/5] obstack tidy
- From: Alan Modra <amodra at gmail dot com>
- To: Roland McGrath <roland at hack dot frob dot com>
- Cc: bug-gnulib at gnu dot org, libc-alpha at sourceware dot org
- Date: Tue, 29 Jul 2014 09:01:50 +0930
- Subject: Re: [PATCH 1/5] obstack tidy
- Authentication-results: sourceware.org; auth=none
- References: <1406354233-7664-1-git-send-email-amodra at gmail dot com> <1406354233-7664-2-git-send-email-amodra at gmail dot com> <20140728193100 dot DC9682C39FA at topped-with-meat dot com>
On Mon, Jul 28, 2014 at 12:31:00PM -0700, Roland McGrath wrote:
> > a) Delete nonsense about "not polluting the namespace with stddef.h
> > symbols" since string.h includes stddef.h a little later anyway.
>
> If you are talking specifically about the glibc implementation's string.h,
> then you are confused.
No, I was talking about gnulib's string.h.
> glibc's string.h complies with the C and POSIX
> standards, and so does not pollute the namespace with all of stddef.h's
> names. It only defines size_t and NULL via stddef.h. If you also want
> ptrdiff_t for use in obstack.h, with GCC's stddef.h you can do:
> #define __need_ptrdiff_t
> #include <stddef.h>
>
> That said, I don't think anybody actually cares about a GNU extension
> header like obstack.h implicitly defining common standard C symbols like
> that ones that stddef.h defines.
Right.
--
Alan Modra
Australia Development Lab, IBM