|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH for-4.15] autoconf: check endian.h include path
Roger Pau Monné writes ("Re: [PATCH for-4.15] autoconf: check endian.h include
path"):
> On Thu, Feb 04, 2021 at 11:32:41AM +0100, Jan Beulich wrote:
> > On 04.02.2021 11:21, Roger Pau Monné wrote:
> > > I think having to replicate this logic in all places that include
> > > endian.h is cumbersome.
> >
> > Right - I would further encapsulate this in a local header.
>
> IMO encapsulating in configure achieves the same purpose.
I like the way Roger has done it.
> > >> And which one is to be the first one? IOW how likely is it that
> > >> on a system having both the first one is what we're after vs
> > >> the second one?
> > >
> > > Not sure, but the same will happen with your proposal above: in your
> > > chunk sys/endian.h will be picked over endian.h.
> >
> > Oh, sure - the two points are entirely orthogonal. And I'm
> > also not certain at all whether checking sys/ first is
> > better, equal, or worse. I simply don't know what the
> > conventions are.
>
> I'm not sure either. For the specific case of endian.h I would
> expect only one to be present, and I think we should first check for
> top level (ie: endian.h) before checking for subfolders (ie: sys/), as
> top level should have precedence.
>
> I really don't have a strong opinion either way, so if there's an
> argument to do it the other way around that would also be fine.
I don't think it matters much here, but in general I would say that
checking the more general location first is a good idea. Checking the
more specific location might in some cases find us a file that's
actually an implementation detail.
Ian.
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |