Subject: Re: [PATCH] Add extra logic required to detect endianness on Solaris

From: Charles Bailey <[email-masked]>
Date: Fri, 2 May 2014 08:49:17 +0100

On Thu, May 01, 2014 at 11:58:26AM -0700, Junio C Hamano wrote:
> 
> This patch seems to address two unrelated issues in that.
> 
>  (1) The existing support does not help a platform where the
>      convention is to define either _BIG_ENDIAN (with one leading
>      underscore) or _LITTLE_ENDIAN and not both, which is Solaris
>      but there may be others.
> 
>  (2) There may be __LITTLE_ENDIAN and __BIG_ENDIAN macros already
>      defined on the platform.  Or these may not have been defined at
>      all.  You avoid unconditionally redefing these.
> 
> I find the latter iffy.

Yes, you are right. I think I was uncomfortable defining macros with
names reserved for the implementation even if the implementation didn't
seem to be using them. I think I made my patch less correct as a result.
Looking at the rest of the git source code we don't seem to use any of
these macros anywhere else so perhaps we could use macros specific to
GIT?

Let me follow up with an alternative patch.

Charles.