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

Re: [PATCH] sha1dc: safeguard against outside definitions of BIGENDIAN

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 27, 2017, 17:05 UTC
Message-ID
<xmqq37dy3b0y.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<alpine.DEB.2.20.1703271739210.14958@virtualbox>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 6 quoted lines
>> So here is what I came up with as a replacement (this time as a
>> proper patch not a comment on a patch).
>> 
>> Dscho, could you see if this fixes your build?
>
> The Continuous Testing is back to normal, thanks.
Thanks for a quick response.

I wished if we can reuse the endianness detection we already have in "compat/bswap.h", which is included by git-compat-util.h hence also here. It would have been very nice if we could say

    #if GIT_BYTE_ORDER == GIT_BIG_ENDIAN
        ... do big endian thing ...
    #else
        ... do little endian thing ...
    #endif

when necessary, without having to reinvent the cheks on __BYTE_ORDER and friends. It however needs a bit of rework in "compat/bswap.h", which is way beyond the scope of making a quick fix-up to unblock us.

Previous: Johannes Schindelin
Message 5 of 5 in “sha1dc: safeguard against outside definitions of BIGENDIAN”
  1. sha1dc: safeguard against outside definitions of BIGENDIANJohannes Schindelin, Mar 24, 2017
  2. Junio C HamanoMar 25, 2017
  3. Junio C HamanoMar 25, 2017
  4. Johannes SchindelinMar 27, 2017
  5. Junio C HamanoMar 27, 2017

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.