From 08d60f187609467b4006aabc6223ecf6c2ba1c99 Mon Sep 17 00:00:00 2001 From: David Galeano Date: Mon, 3 Oct 2011 19:30:27 +0800 Subject: [PATCH] Added BYTE_ORDER definition for win32 builds. --- lib/sha-1.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/sha-1.c b/lib/sha-1.c index 180bb455..2bd2494a 100644 --- a/lib/sha-1.c +++ b/lib/sha-1.c @@ -35,6 +35,16 @@ #include #ifdef WIN32 +#ifndef BIG_ENDIAN +#define BIG_ENDIAN 4321 /* to show byte order (taken from gcc) */ +#endif +#ifndef LITTLE_ENDIAN +#define LITTLE_ENDIAN 1234 +#endif +#ifndef BYTE_ORDER +#define BYTE_ORDER LITTLE_ENDIAN +#endif + typedef unsigned char u_int8_t; typedef unsigned int u_int32_t; typedef unsigned __int64 u_int64_t; @@ -317,4 +327,3 @@ SHA1(const unsigned char *d, size_t n, unsigned char *md) } #endif /*unsupported*/ -