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: [PATCH 1/2] BZ#13743: PowerPC - Add a new header for platformspecific functions


On Tue, Mar 6, 2012 at 12:25 PM, Roland McGrath <roland@hack.frob.com> wrote:
>> I would like to see sys/platform.h become the place for non-standard
>> low-level macros.
>
> The standard place for nonstandard interfaces. ?Sure, buddy. ?Whatever.
> Given that they are entirely nonstandard anyway, I'm not sure it makes
> much difference whether they are in some generic-sounding header like
> this or in headers with more specific names.

Roland, thanks for your feedback. I can always count on you to
play the devil's advocate :-)

I see nothing wrong with the suggestion, but you are correct
technically any name would do. However, users already come trained
with expectations that sys/platform.h provides non-standard
low-level macros and there is value in matching expectations.

> I'm solidly ambivalent about the utility of a catch-all header for
> random things. ?I'd say the fact that other systems use this file name
> is between meaningless and negative as a recommendation to use it for
> something that isn't even trying to be compatible with any other system.

I mentioned the other systems, not for the sake of compatibility,
but simply to point out prior-art for a similar solution.

> In the absence of any common interface (which could even be just one
> other system whose header name and interface we match, as we have done
> before), there is some logic in using individual headers with names as
> specific as possible (e.g. <ppc-timebase.h> here). ?That makes it much
> clearer for applications to include exactly what they use.

That's a very good suggestion, but in my opinion it complicates
things needlessly. That's not to say that I don't like the
solution, I like it *better* than sys/platform.h, but
we should think about users too and what the interface looks
like to them.

It's easier to explain to users that there is one header that
has non-standard low-level bits, it's easier to document, and
it matches pre-existing expectations from other OSs.

All together it makes sys/platform.h a better solution.

Given that you bring no strong argument against a catch-all
header I'm going to go forward with accepting IBM's patch
for this support.

Cheers,
Carlos.


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