RFC: remove <sys/sysmacros.h> from <sys/types.h>

Zack Weinberg zackw@panix.com
Sat Nov 21 00:56:00 GMT 2015


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



More information about the Libc-alpha mailing list