summaryrefslogtreecommitdiffstats
path: root/crypto/sha
diff options
context:
space:
mode:
authoravas <avas@devvm3802.prn2.facebook.com>2019-12-05 06:14:44 -0800
committerPauli <paul.dale@oracle.com>2019-12-10 14:37:58 +1000
commit0969e2592e634670f1953ac37357e93fc479aa69 (patch)
treed5d00d0c49c0128f9984620d1f68950a0721bdf8 /crypto/sha
parent1352e0ff490d758cfd74e179e8a9614833fd88a9 (diff)
Move U64 macro from sha.h to sha512.c
Summary: U64 is too common name for macro, being in public header sha.h it conflicts with other projects (WAVM in my case). Moving macro from public header to the only .c file using it. CLA: trivial Reviewed-by: Paul Dale <paul.dale@oracle.com> Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10579)
Diffstat (limited to 'crypto/sha')
-rw-r--r--crypto/sha/sha512.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/crypto/sha/sha512.c b/crypto/sha/sha512.c
index 03189a9d9c..c70edf572a 100644
--- a/crypto/sha/sha512.c
+++ b/crypto/sha/sha512.c
@@ -60,6 +60,14 @@
# define SHA512_BLOCK_CAN_MANAGE_UNALIGNED_DATA
#endif
+#if (defined(_WIN32) || defined(_WIN64)) && !defined(__MINGW32__)
+# define U64(C) C##UI64
+#elif defined(__arch64__)
+# define U64(C) C##UL
+#else
+# define U64(C) C##ULL
+#endif
+
int sha512_224_init(SHA512_CTX *c)
{
c->h[0] = U64(0x8c3d37c819544da2);