compat: add endianness helpers
authorVicent Marti <redacted>
Thu, 14 Nov 2013 12:43:36 +0000 (07:43 -0500)
committerJunio C Hamano <redacted>
Mon, 18 Nov 2013 18:57:42 +0000 (10:57 -0800)
commit7e3dae494370b5596a6ea76af1191829ce11bce2
tree36f658bc1630dc150ec2f51f69881fb416759b4e
parentec73f5807cd6e6f6d55e716cde80637a1019d67d
compat: add endianness helpers

The POSIX standard doesn't currently define a `ntohll`/`htonll`
function pair to perform network-to-host and host-to-network
swaps of 64-bit data. These 64-bit swaps are necessary for the on-disk
storage of EWAH bitmaps if they are not in native byte order.

Many thanks to Ramsay Jones <redacted> and
Torsten Bögershausen <redacted> for cygwin/mingw/msvc
portability fixes.

Signed-off-by: Vicent Marti <redacted>
Signed-off-by: Jeff King <redacted>
Signed-off-by: Junio C Hamano <redacted>
compat/bswap.h
git clone https://git.99rst.org/PROJECT