This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/19239] Including stdlib.h ends up with macros major and minor being defined
- From: "bugdal at aerifal dot cx" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Fri, 13 Nov 2015 15:34:40 +0000
- Subject: [Bug libc/19239] Including stdlib.h ends up with macros major and minor being defined
- Auto-submitted: auto-generated
- References: <bug-19239-131 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=19239
Rich Felker <bugdal at aerifal dot cx> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bugdal at aerifal dot cx
--- Comment #3 from Rich Felker <bugdal at aerifal dot cx> ---
While I agree that defining _GNU_SOURCE from the gcc side is _a_ bug, I think
this is also a glibc bug. Individually having stdlib.h include sys/types.h and
having sys/types.h include sys/sysmacros.h both make sense as legacy-compat
behaviors, but having stdlib.h expose the junk from sys/sysmacros.h is highly
undesirable to the point of being a bug.
Yes, there should be a concrete API proposal for removing implicit includes
like this, but I don't think the need for such a proposal negates classifying
this as a bug.
My preliminary proposal is that all implicit inclusion of sys/sysmacros.h
should be removed. Only a very small number of programs (things like ls, mknod,
etc.) have any use at all for these macros and they should be fixed to include
it explicitly if they're not already doing so.
--
You are receiving this mail because:
You are on the CC list for the bug.