Re: [PATCH v8 01/12] bswap: add 64 bit endianness helper get_be64

2017-09-23 Thread Junio C Hamano
Ben Peart writes: >> @@ -183,8 +183,8 @@ static inline uint32_t get_be32(const void *ptr) static >> inline uint64_t get_be64(const void *ptr) { >> const unsigned char *p = ptr; >> -return (uint64_t)get_be32(p[0]) << 32 | >> -(uint64_t)get_be32(p[4]) << 0; >> +return

Re: [PATCH v8 01/12] bswap: add 64 bit endianness helper get_be64

2017-09-23 Thread Jeff King
On Sat, Sep 23, 2017 at 11:31:50PM +, Ben Peart wrote: > > diff --git a/compat/bswap.h b/compat/bswap.h index 6b22c4621..9dc79bdf5 > > 100644 > > --- a/compat/bswap.h > > +++ b/compat/bswap.h > > @@ -183,8 +183,8 @@ static inline uint32_t get_be32(const void *ptr) static > > inline uint64_t g

RE: [PATCH v8 01/12] bswap: add 64 bit endianness helper get_be64

2017-09-23 Thread Ben Peart
> Schindelin ; Nguyễn Thái Ngọc Duy > ; Jeff King > Subject: Re: [PATCH v8 01/12] bswap: add 64 bit endianness helper get_be64 > > On 22 September 2017 at 18:35, Ben Peart > wrote: > > Add a new get_be64 macro to enable 64 bit endian conversions on memory > > th

Re: [PATCH v8 01/12] bswap: add 64 bit endianness helper get_be64

2017-09-22 Thread Martin Ågren
On 22 September 2017 at 18:35, Ben Peart wrote: > Add a new get_be64 macro to enable 64 bit endian conversions on memory > that may or may not be aligned. I needed this to compile and pass the tests with NO_UNALIGNED_LOADS. Martin diff --git a/compat/bswap.h b/compat/bswap.h index 6b22c4621..9d