]> git.ipfire.org Git - thirdparty/git.git/commit
Revert "bswap.h: add support for built-in bswap functions"
authorSebastian Andrzej Siewior <sebastian@breakpoint.cc>
Wed, 11 Jun 2025 22:14:37 +0000 (00:14 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 12 Jun 2025 20:23:39 +0000 (13:23 -0700)
commit1c62df0abe3d77ebd66630921d857b36b6c15084
treef1ef17e2d36b8871167567c17a26e5430f1462aa
parentb50795db7969712ef937906d548fe9eb58cb9fb5
Revert "bswap.h: add support for built-in bswap functions"

Since 6547d1c9 (bswap.h: add support for built-in bswap
functions, 2025-04-23) tweaked the way the bswap32/64 macros are
defined, on platforms with __builtin_bswap32/64 supported, the
bswap32/64 macros are defined even on big endian platforms.

However the rest of this file assumes that bswap32/64() are defined
ONLY on little endian machines and uses that assumption to redefine
ntohl/ntohll macros. The said commit broke t4014-format-patch.sh test,
among many others on s390x.

Revert the commit.

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