Thread (3 messages) flat view 3 messages, 2 authors, 2016-06-15

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

From: Charles Bailey <hidden>
Date: 2016-06-15 23:00:58

Possibly related (same subject, not in this thread)

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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help