Re: [PATCH] Add extra logic required to detect endianness on Solaris
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 1, 2014, 19:22 UTC
- Message-ID
- <xmqq1twdcnj3.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <xmqq61lpcnpd.fsf@gitster.dls.corp.google.com>
Junio C Hamano <gitster@pobox.com> writes:
Show 12 quoted lines
> Just a thought. > > I am wondering if you may want to go the other way around. That is, > instead of using "we have byte-order, big and little and the way to > determine endianness is to see byte-order matches which of the > latter two", use "there may be either big or little but not both > defined, and that is how you learn the byte-order". > > And make these two macros match what Solaris happens to use. > > I am not sure which variant I like better myself, though. > ...
The "how-about-this" patch in the pregvious message forgets the default case where byte-order, little and big are defined with leading double underscore, which must also be handled, if we want to take this aproach.