RFC: deprecate sys/sysmacros.h inclusion from sys/types.h
Roland McGrath
roland@hack.frob.com
Thu Apr 21 21:11:00 GMT 2016
> Hmm, good point. The macro was for programs that *are* being broken
> because they didn't expect sys/types.h to define major/minor/makedev,
> and advising such programs to #undef those symbols is better advice,
> since that will work on *BSDs that still define them there.
Yes, that is harmless now and will be harmless in the future and does not
look like gratuitous cruft in the same way.
> >> +#ifdef __USE_EXTERN_INLINES
> >> +#define __SYSMACRO_IMPL(rtype, name, proto, expr) \
> >
> > An example of unintended preprocessor directives.
>
> I assume you meant unindented.
Indeed. Typing is hard.
> > Also, make all these macros __SYSMACROS_* instead of _SYSMACRO_* (so
> > the prefix matches the name of the header file).
>
> I think singular is more appropriate because it expands to the
> implementation of *one* sysmacro.
"sysmacro" is not a thing. "sysmacros" is the name of the file, and hence
the moniker for its private namespace.
More information about the Libc-alpha
mailing list