From: Junio C Hamano Date: Thu, 5 Mar 2015 21:13:02 +0000 (-0800) Subject: Merge branch 'jk/pack-bitmap' into maint X-Git-Tag: v2.3.2~19 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/abfed73ce8890db85e1a5851b4678321b0d1e8cc?hp=-c Merge branch 'jk/pack-bitmap' into maint The pack bitmap support did not build with older versions of GCC. * jk/pack-bitmap: ewah: fix building with gcc < 3.4.0 --- abfed73ce8890db85e1a5851b4678321b0d1e8cc diff --combined ewah/ewok.h index f6ad190a03,4b95847680..13c6e20412 --- a/ewah/ewok.h +++ b/ewah/ewok.h @@@ -47,7 -47,8 +47,8 @@@ static inline uint32_t ewah_bit_popcoun return (x * 0x0101010101010101ULL) >> 56; } - #ifdef __GNUC__ + /* __builtin_ctzll was not available until 3.4.0 */ + #if defined(__GNUC__) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR > 3)) #define ewah_bit_ctz64(x) __builtin_ctzll(x) #else static inline int ewah_bit_ctz64(uint64_t x) @@@ -99,7 -100,8 +100,7 @@@ int ewah_serialize(struct ewah_bitmap * int ewah_serialize_native(struct ewah_bitmap *self, int fd); int ewah_deserialize(struct ewah_bitmap *self, int fd); -int ewah_read_mmap(struct ewah_bitmap *self, void *map, size_t len); -int ewah_read_mmap_native(struct ewah_bitmap *self, void *map, size_t len); +int ewah_read_mmap(struct ewah_bitmap *self, const void *map, size_t len); uint32_t ewah_checksum(struct ewah_bitmap *self);