git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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.

Previous: Junio C HamanoNext: Charles Bailey
Message 4 of 11 in “Add extra logic required to detect endianness on Solaris”
  1. Add extra logic required to detect endianness on SolarisCharles Bailey, May 1, 2014
  2. Junio C HamanoMay 1, 2014
  3. Junio C HamanoMay 1, 2014
  4. Junio C HamanoMay 1, 2014
  5. Charles BaileyMay 2, 2014
  6. Detect endianness on more platforms that don't use BYTE_ORDERCharles Bailey, May 2, 2014
  7. Junio C HamanoMay 2, 2014
  8. Charles BaileyMay 2, 2014
  9. Junio C HamanoMay 2, 2014
  10. Junio C HamanoMay 2, 2014
  11. Charles BaileyMay 2, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.