This is the mail archive of the libc-alpha@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]

Re: [glibc] <sys/stat.h>: Use Linux UAPI header for statx if available and useful


On Thu, 13 Jun 2019, Zack Weinberg wrote:

> On Thu, Jun 13, 2019 at 12:46 PM Joseph Myers <joseph@codesourcery.com> wrote:
> > On Wed, 12 Jun 2019, Zack Weinberg wrote:
> >
> > > I wonder how much stuff still depends on these legacy user-namespace
> > > OS-specific macros.  Would anyone even notice if we put
> > >
> > > #undef linux
> > > #undef unix
> > >
> > > at the top of features.h?
> >
> > That is of course invalid for anyone using -std= to prevent the compiler
> > defining such macros and then defining their own "linux" or "unix" macros
> > before including standard headers.
> 
> Ugh, you're right.  I guess this really does need to be pushed from
> the compiler end.  Do you think it would be worth filing a bug report
> on GCC and/or clang?

I think it would make sense to stop defining by default any non-reserved 
macros.  But perhaps someone could investigate how widespread usage of 
"#ifdef unix" or "#ifdef linux" is that would behave unexpectedly if those 
stopped being defined (or likewise "#ifdef i386" etc.).

-- 
Joseph S. Myers
joseph@codesourcery.com


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