]> git.ipfire.org Git - thirdparty/git.git/commit
bswap.h: define GIT_LITTLE_ENDIAN on msvc as little endian
authorSebastian Andrzej Siewior <sebastian@breakpoint.cc>
Tue, 15 Jul 2025 19:12:27 +0000 (21:12 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 15 Jul 2025 21:36:21 +0000 (14:36 -0700)
commit30dea7ddf7a10d11818e754deba8120cef8446ca
tree04949a05f7b70f2acb364ab95ee78dec8784eef7
parentf1b85243034a690691d34af0576e6d3cb1a08743
bswap.h: define GIT_LITTLE_ENDIAN on msvc as little endian

The Microsoft Visual C++ (MSVC) compiler (as of Visual Studio 2022
version 17.13.6) does not define __BYTE_ORDER__ and its C-library does
not define __BYTE_ORDER. The compiler is supported only on arm64 and x86
which are all little endian.

Define GIT_BYTE_ORDER on msvc as little endian to avoid further checks.

Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
compat/bswap.h