This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/19239] Including stdlib.h ends up with macros major and minor being defined


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]