Fix SHA1 calculation on big-endian systems
Add the AC_C_BIGENDIAN macro to determine endianness and set WORDS_BIGENDIAN accordingly. Fixes GitHub issue #397. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
This commit is contained in:
parent
bea7349211
commit
20b23cc32e
@ -19,6 +19,7 @@ AC_CANONICAL_HOST
|
||||
# Checks for programs
|
||||
#-------------------------------------------------------------------------------
|
||||
AC_PROG_CC
|
||||
AC_C_BIGENDIAN
|
||||
#-------------------------------------------------------------------------------
|
||||
# Checks for header files
|
||||
#-------------------------------------------------------------------------------
|
||||
|
@ -43,6 +43,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "config.h"
|
||||
#include "sha1.h"
|
||||
|
||||
#define rol(val, n) (((val) << (n)) | ((val) >> (32 - (n))))
|
||||
|
Loading…
x
Reference in New Issue
Block a user