summaryrefslogtreecommitdiff
path: root/compat
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-05-02 19:36:10 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-05-02 19:36:10 (GMT)
commit839fa9c500c7771d15831e2bcf77697cd70620f9 (patch)
tree7a4bcbd1b38e6d487019dc1c4438897910e62d29 /compat
parent3cf6bb34063406e107f51aa52db67d65839f5e58 (diff)
downloadgit-839fa9c500c7771d15831e2bcf77697cd70620f9.zip
git-839fa9c500c7771d15831e2bcf77697cd70620f9.tar.gz
git-839fa9c500c7771d15831e2bcf77697cd70620f9.tar.bz2
compat/bswap.h: restore preference __BIG_ENDIAN over BIG_ENDIAN
The previous commit swaps the order we check the macros defined by the compiler and the system headers from the original. Since the order of check should not matter (i.e. it is insane to define both __BIG_ENDIAN and friends and BIG_ENDIAN and friends and in a conflicting way), it is the most conservative thing to do not to change it. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'compat')
-rw-r--r--compat/bswap.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/compat/bswap.h b/compat/bswap.h
index f08a9fe..c4293db 100644
--- a/compat/bswap.h
+++ b/compat/bswap.h
@@ -101,18 +101,18 @@ static inline uint64_t git_bswap64(uint64_t x)
#undef ntohll
#undef htonll
-#if defined(BYTE_ORDER) && defined(LITTLE_ENDIAN) && defined(BIG_ENDIAN)
-
-# define GIT_BYTE_ORDER BYTE_ORDER
-# define GIT_LITTLE_ENDIAN LITTLE_ENDIAN
-# define GIT_BIG_ENDIAN BIG_ENDIAN
-
-#elif defined(__BYTE_ORDER) && defined(__LITTLE_ENDIAN) && defined(__BIG_ENDIAN)
+#if defined(__BYTE_ORDER) && defined(__LITTLE_ENDIAN) && defined(__BIG_ENDIAN)
# define GIT_BYTE_ORDER __BYTE_ORDER
# define GIT_LITTLE_ENDIAN __LITTLE_ENDIAN
# define GIT_BIG_ENDIAN __BIG_ENDIAN
+#elif defined(BYTE_ORDER) && defined(LITTLE_ENDIAN) && defined(BIG_ENDIAN)
+
+# define GIT_BYTE_ORDER BYTE_ORDER
+# define GIT_LITTLE_ENDIAN LITTLE_ENDIAN
+# define GIT_BIG_ENDIAN BIG_ENDIAN
+
#else
# define GIT_BIG_ENDIAN 4321