1
0
mirror of https://github.com/git/git.git synced 2024-09-28 19:42:15 +02:00

block-sha1: more good unaligned memory access candidates

In addition to X86, PowerPC and S390 are capable of unaligned memory
accesses.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Nicolas Pitre 2009-08-13 00:29:14 -04:00 committed by Junio C Hamano
parent 660231aa97
commit ee7dc310af

@ -67,7 +67,10 @@
* and is faster on architectures with memory alignment issues.
*/
#if defined(__i386__) || defined(__x86_64__)
#if defined(__i386__) || defined(__x86_64__) || \
defined(__ppc__) || defined(__ppc64__) || \
defined(__powerpc__) || defined(__powerpc64__) || \
defined(__s390__) || defined(__s390x__)
#define get_be32(p) ntohl(*(unsigned int *)(p))
#define put_be32(p, v) do { *(unsigned int *)(p) = htonl(v); } while (0)