RFC: remove <sys/sysmacros.h> from <sys/types.h>
Paul Eggert
eggert@cs.ucla.edu
Fri Nov 13 15:59:00 GMT 2015
On 11/13/2015 06:45 AM, Dmitry V. Levin wrote:
> >Since sys/types.h
> >does not provide these macros on SysV-derived systems, I would expect
> >that portable software that needs them is prepared to include
> >sys/sysmacros.h itself.
> Portable software already uses autoconf AC_HEADER_MAJOR macro or analogs.
Yes, since coreutils uses AC_HEADER_MAJOR already, programs like 'ls'
and 'stat' would be unaffected by the proposed change: ./configure would
discover that sys/types.h no longer define 'major', 'minor' and
'makedev', and coreutils/src/system.h would therefore include
<sys/sysmacros.h>.
It's clear these three macros don't belong in <sys/types.h>, but it's
also clear there will be a conversion hassle for programs that are not
as portable as coreutils etc. Can we deprecate these symbols without
removing them, and then remove them a few years from now? That might be
the wiser course.
More information about the Libc-alpha
mailing list