summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/whrlpool/wp_block.c
diff options
context:
space:
mode:
authormiod <>2014-07-09 16:06:14 +0000
committermiod <>2014-07-09 16:06:14 +0000
commiteb3e7d7ffe444652fe6f90808f95e08bc99cf5ae (patch)
tree49de6ec1ff73debc360d8605d09d765a8e604a22 /src/lib/libcrypto/whrlpool/wp_block.c
parent241b6a38fd4cff90e8e18e7c8dd2e6371f86a8e9 (diff)
downloadopenbsd-eb3e7d7ffe444652fe6f90808f95e08bc99cf5ae.tar.gz
openbsd-eb3e7d7ffe444652fe6f90808f95e08bc99cf5ae.tar.bz2
openbsd-eb3e7d7ffe444652fe6f90808f95e08bc99cf5ae.zip
Remove leading underscore from _BYTE_ORDER and _{LITTLE,BIG}_ENDIAN, to be
more friendly to systems where the underscore flavours may be defined as empty. Found the hard way be bcook@; joint brainstrom with bcook beck and guenther
Diffstat (limited to 'src/lib/libcrypto/whrlpool/wp_block.c')
-rw-r--r--src/lib/libcrypto/whrlpool/wp_block.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libcrypto/whrlpool/wp_block.c b/src/lib/libcrypto/whrlpool/wp_block.c
index 92d834e289..d357e529ca 100644
--- a/src/lib/libcrypto/whrlpool/wp_block.c
+++ b/src/lib/libcrypto/whrlpool/wp_block.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: wp_block.c,v 1.8 2014/07/08 16:15:20 miod Exp $ */ 1/* $OpenBSD: wp_block.c,v 1.9 2014/07/09 16:06:13 miod Exp $ */
2/** 2/**
3 * The Whirlpool hashing function. 3 * The Whirlpool hashing function.
4 * 4 *
@@ -76,7 +76,7 @@ typedef unsigned long long u64;
76# define ROTATE(a,n) ({ u64 ret; asm ("rolq %1,%0" \ 76# define ROTATE(a,n) ({ u64 ret; asm ("rolq %1,%0" \
77 : "=r"(ret) : "J"(n),"0"(a) : "cc"); ret; }) 77 : "=r"(ret) : "J"(n),"0"(a) : "cc"); ret; })
78# elif defined(__ia64) || defined(__ia64__) 78# elif defined(__ia64) || defined(__ia64__)
79# if _BYTE_ORDER == _LITTLE_ENDIAN 79# if BYTE_ORDER == LITTLE_ENDIAN
80# define ROTATE(a,n) ({ u64 ret; asm ("shrp %0=%1,%1,%2" \ 80# define ROTATE(a,n) ({ u64 ret; asm ("shrp %0=%1,%1,%2" \
81 : "=r"(ret) : "r"(a),"M"(64-(n))); ret; }) 81 : "=r"(ret) : "r"(a),"M"(64-(n))); ret; })
82# else 82# else
@@ -88,7 +88,7 @@ typedef unsigned long long u64;
88 88
89#if defined(OPENSSL_SMALL_FOOTPRINT) 89#if defined(OPENSSL_SMALL_FOOTPRINT)
90# if !defined(ROTATE) 90# if !defined(ROTATE)
91# if _BYTE_ORDER == _LITTLE_ENDIAN /* little-endians have to rotate left */ 91# if BYTE_ORDER == LITTLE_ENDIAN /* little-endians have to rotate left */
92# define ROTATE(i,n) ((i)<<(n) ^ (i)>>(64-n)) 92# define ROTATE(i,n) ((i)<<(n) ^ (i)>>(64-n))
93# else /* big-endians have to rotate right */ 93# else /* big-endians have to rotate right */
94# define ROTATE(i,n) ((i)>>(n) ^ (i)<<(64-n)) 94# define ROTATE(i,n) ((i)>>(n) ^ (i)<<(64-n))