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: GNU C Library <libc-alpha at sourceware dot org>
- Date: Fri, 13 Nov 2015 09:29:16 -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>
On Fri, Nov 13, 2015 at 9:21 AM, Zack Weinberg <zackw@panix.com> wrote:
> sys/sysmacros.h defines three macros - major, minor, makedev - that
> are likely to collide with user symbols. That would be fine, since
> it's off by itself, but sys/types.h includes sys/sysmacros.h under
> __USE_BSD, which means anyone who defines _BSD_SOURCE or _GNU_SOURCE
> and includes sys/types.h gets the macros.
Note: as far as I can tell sys/types.h is the only glibc-installed
header that directly includes sys/sysmacros.h.