summaryrefslogtreecommitdiff
path: root/commit.c
diff options
context:
space:
mode:
authorSebastian Andrzej Siewior <sebastian@breakpoint.cc>2025-07-15 21:12:28 +0200
committerJunio C Hamano <gitster@pobox.com>2025-07-15 14:36:41 -0700
commit4544cd19e429975882e20fa89dab7e73956f26e4 (patch)
treea0599052be980305e481966d48a2b61da173bfe7 /commit.c
parent30dea7ddf7a10d11818e754deba8120cef8446ca (diff)
bswap.h: always overwrite ntohl/ ntohll macros
The ntohl and htonl macros are redefined because the provided macros were not always optimal. Sometimes it was a function call, sometimes it was a macro which did the shifting. Using the 'bswap' opcode on x86 provides probably better performance than performing the shifting. These macros are only overwritten on x86 if the "optimized" version is available. The ntohll and htonll macros are not available on every platform (at least glibc does not provide them) which means they need to be defined once the endianness of the system is determined. In order to get a more symmetrical setup, redfine the macros once the endianness of the system has been determined. Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.c')
0 files changed, 0 insertions, 0 deletions