diff options
author | Doug Zongker <dougz@android.com> | 2009-08-21 11:08:25 -0700 |
---|---|---|
committer | Doug Zongker <dougz@android.com> | 2009-08-21 11:08:25 -0700 |
commit | 90b06ac786f859895ac503cf42759c2706205700 (patch) | |
tree | 550b74a8743d2ba3378e2f8964bf1696417850eb /include/mincrypt/sha.h | |
parent | a2f441b8c6781472deb5da0b27c3b5c81114299a (diff) | |
download | system_core-90b06ac786f859895ac503cf42759c2706205700.zip system_core-90b06ac786f859895ac503cf42759c2706205700.tar.gz system_core-90b06ac786f859895ac503cf42759c2706205700.tar.bz2 |
only use faster SHA-1 code on machines with good libc
Macs don't have byteswap.h or endian.h. Change conditionals to only
use the faster SHA-1 code on little-endian machines with byteswap.h.
Diffstat (limited to 'include/mincrypt/sha.h')
-rw-r--r-- | include/mincrypt/sha.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/include/mincrypt/sha.h b/include/mincrypt/sha.h index 2bcc522..af63e87 100644 --- a/include/mincrypt/sha.h +++ b/include/mincrypt/sha.h @@ -29,7 +29,6 @@ #define _EMBEDDED_SHA_H_ #include <inttypes.h> -#include <endian.h> #ifdef __cplusplus extern "C" { @@ -38,7 +37,7 @@ extern "C" { typedef struct SHA_CTX { uint64_t count; uint32_t state[5]; -#if __BYTE_ORDER == __LITTLE_ENDIAN +#if defined(HAVE_ENDIAN_H) && defined(HAVE_LITTLE_ENDIAN) union { uint8_t b[64]; uint32_t w[16]; |