This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: RFC: remove <sys/sysmacros.h> from <sys/types.h>
- From: Zack Weinberg <zackw at panix dot com>
- To: Roland McGrath <roland at hack dot frob dot com>
- Cc: Andreas Schwab <schwab at linux-m68k dot org>, Rich Felker <dalias at libc dot org>, GNU C Library <libc-alpha at sourceware dot org>
- Date: Fri, 20 Nov 2015 19:55:55 -0500
- Subject: Re: RFC: remove <sys/sysmacros.h> from <sys/types.h>
- Authentication-results: sourceware.org; auth=none
- References: <CAKCAbMiU=h2Vs3X-b8mRjP3Kig_TVngObPNpYauTqZs_=0q6Gg at mail dot gmail dot com> <20151113234333 dot D1DCA2C3B7B at topped-with-meat dot com> <m2ziyhszvk dot fsf at linux-m68k dot org> <CAKCAbMhnz=PSQZ=yxVbrBpmL8sw5XznBz88HPiwSQD4kbcRXmQ at mail dot gmail dot com> <20151114215908 dot GJ3818 at brightrain dot aerifal dot cx> <871tbsb4xa dot fsf at igel dot home> <20151121001951 dot E61152C3A9B at topped-with-meat dot com>
On Fri, Nov 20, 2015 at 7:19 PM, Roland McGrath <roland@hack.frob.com> wrote:
>> stdlib.h only includes sys/types.h for int32_t, which is also available
>> through stdint.h. We could add support for __need_int32_t if necessary.
>
> Making stdlib.h include stdint.h instead of sys/types.h seems sensible to me.
> It was never an explicit intent that stdlib.h would get you sys/sysmacros.h,
> while it was for sys/types.h.
Unfortunately - see the other threads about this - there seem to be a
significant number of programs written (sloppily, yes) on the
assumption that stdlib.h *does* include sys/types.h. If you look at
the patches I posted about a day ago, to see how much of a mess it was
just to generate deprecation warnings for *three* declarations
accessed the wrong way, and then imagine extending that to everything
from sys/types.h ... I'm not a fan.
zw