ewah: support platforms that require aligned reads
authorVicent Marti <tanoku@gmail.com>
Thu, 23 Jan 2014 21:27:52 +0000 (16:27 -0500)
committerJunio C Hamano <gitster@pobox.com>
Thu, 23 Jan 2014 22:05:05 +0000 (14:05 -0800)
The caller may hand us an unaligned buffer (e.g., because it
is an mmap of a file with many ewah bitmaps). On some
platforms (like SPARC) this can cause a bus error. We can
fix it with a combination of get_be32 and moving the data
into an aligned buffer (which we would do anyway, but we can
move it before fixing the endianness).

Signed-off-by: Vicent Marti <tanoku@gmail.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
No differences found