1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-06-13 20:46:15 +02:00
git/compat
Daniel Gurney 0c038fc65a compat/bswap.h: don't assume MSVC is little-endian
In 1af265f0 (compat/bswap.h: simplify MSVC endianness
detection, 2020-11-08) we attempted to simplify code by assuming MSVC
builds will be for little-endian machines, since only unusably old
versions of MSVC supported big-endian MIPS and m68k architectures.

However, it's possible that MSVC could be ported to build for a
big-endian architecture again, so the simplification wasn't as
future-proof as hoped.

So let's go back to the old way of detecting MSVC, and then checking
architecture from a list of little-endian architecture macros.

Note that MSVC does not treat ARM64 as bi-endian, so we can safely treat
it as little-endian.

Helped-by: brian m. carlson <sandals@crustytoothpaste.net>
Helped-by: Jeff King <peff@peff.net>
Helped-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Helped-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Daniel Gurney <dgurney99@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-11-11 11:24:47 -08:00
..
nedmalloc
poll
regex
vcbuild
win32
access.c
apple-common-crypto.h
basename.c
bswap.h compat/bswap.h: don't assume MSVC is little-endian 2020-11-11 11:24:47 -08:00
compiler.h
fileno.c
fopen.c
hstrerror.c
inet_ntop.c
inet_pton.c
memmem.c
mingw.c
mingw.h
mkdir.c
mkdtemp.c
mmap.c
msvc.c
msvc.h
obstack.c
obstack.h
pread.c
precompose_utf8.c
precompose_utf8.h
qsort_s.c
setenv.c
sha1-chunked.c
sha1-chunked.h
snprintf.c
stat.c
strcasestr.c
strdup.c
strlcpy.c
strtoimax.c
strtoumax.c
terminal.c
terminal.h
unsetenv.c
win32.h
win32mmap.c
winansi.c