From 5c80b04ad533e531e552e7e775b6df48dd1fcecc Mon Sep 17 00:00:00 2001
From: miod <>
Date: Mon, 28 Apr 2014 21:14:50 +0000
Subject: Remove WIN32, WIN64 and MINGW32 tentacles. Also check for _LP64
 rather than __arch64__ (the former being more reliable than __LP64__ or
 __arch64__) to tell 64-bit int platforms apart from 32-bit int platforms.

Loosely based upon a diff from Martijn van Duren on tech@
---
 src/lib/libcrypto/aes/aes_x86core.c            | 5 +----
 src/lib/libcrypto/bn/asm/x86_64-gcc.c          | 4 ----
 src/lib/libcrypto/bn/bn_exp.c                  | 7 +------
 src/lib/libcrypto/cast/cast_lcl.h              | 5 -----
 src/lib/libcrypto/des/enc_read.c               | 8 --------
 src/lib/libcrypto/des/enc_writ.c               | 4 ----
 src/lib/libcrypto/engine/eng_aesni.c           | 4 ----
 src/lib/libcrypto/engine/eng_padlock.c         | 7 +------
 src/lib/libcrypto/engine/eng_rsax.c            | 4 ----
 src/lib/libcrypto/modes/modes_lcl.h            | 6 +-----
 src/lib/libcrypto/sha/sha.h                    | 5 +----
 src/lib/libcrypto/srp/srp_lib.c                | 4 +---
 src/lib/libcrypto/ts/ts.h                      | 5 -----
 src/lib/libcrypto/whrlpool/wp_block.c          | 4 +---
 src/lib/libssl/src/crypto/aes/aes_x86core.c    | 5 +----
 src/lib/libssl/src/crypto/bn/asm/x86_64-gcc.c  | 4 ----
 src/lib/libssl/src/crypto/bn/bn_exp.c          | 7 +------
 src/lib/libssl/src/crypto/cast/cast_lcl.h      | 5 -----
 src/lib/libssl/src/crypto/des/enc_read.c       | 8 --------
 src/lib/libssl/src/crypto/des/enc_writ.c       | 4 ----
 src/lib/libssl/src/crypto/engine/eng_aesni.c   | 4 ----
 src/lib/libssl/src/crypto/engine/eng_padlock.c | 7 +------
 src/lib/libssl/src/crypto/engine/eng_rsax.c    | 4 ----
 src/lib/libssl/src/crypto/modes/modes_lcl.h    | 6 +-----
 src/lib/libssl/src/crypto/sha/sha.h            | 5 +----
 src/lib/libssl/src/crypto/srp/srp_lib.c        | 4 +---
 src/lib/libssl/src/crypto/ts/ts.h              | 5 -----
 src/lib/libssl/src/crypto/whrlpool/wp_block.c  | 4 +---
 28 files changed, 14 insertions(+), 130 deletions(-)

(limited to 'src/lib')

diff --git a/src/lib/libcrypto/aes/aes_x86core.c b/src/lib/libcrypto/aes/aes_x86core.c
index 295ea22bb4..8b3b29e28c 100644
--- a/src/lib/libcrypto/aes/aes_x86core.c
+++ b/src/lib/libcrypto/aes/aes_x86core.c
@@ -79,10 +79,7 @@ prefetch256(const void *table)
 #undef GETU32
 #define GETU32(p) (*((u32*)(p)))
 
-#if (defined(_WIN32) || defined(_WIN64)) && !defined(__MINGW32__)
-typedef unsigned __int64 u64;
-#define U64(C)	C##UI64
-#elif defined(__arch64__)
+#if defined(_LP64)
 typedef unsigned long u64;
 #define U64(C)	C##UL
 #else
diff --git a/src/lib/libcrypto/bn/asm/x86_64-gcc.c b/src/lib/libcrypto/bn/asm/x86_64-gcc.c
index acb0b40118..6a7fa4aea9 100644
--- a/src/lib/libcrypto/bn/asm/x86_64-gcc.c
+++ b/src/lib/libcrypto/bn/asm/x86_64-gcc.c
@@ -55,11 +55,7 @@
  *    machine.
  */
 
-#ifdef _WIN64
-#define BN_ULONG unsigned long long
-#else
 #define BN_ULONG unsigned long
-#endif
 
 #undef mul
 #undef mul_add
diff --git a/src/lib/libcrypto/bn/bn_exp.c b/src/lib/libcrypto/bn/bn_exp.c
index 2047e1cc3f..22ef643c02 100644
--- a/src/lib/libcrypto/bn/bn_exp.c
+++ b/src/lib/libcrypto/bn/bn_exp.c
@@ -114,12 +114,7 @@
 #include "bn_lcl.h"
 
 #include <stdlib.h>
-#ifdef _WIN32
-# include <malloc.h>
-# ifndef alloca
-#  define alloca _alloca
-# endif
-#elif defined(__GNUC__)
+#if defined(__GNUC__)
 # ifndef alloca
 #  define alloca(s) __builtin_alloca((s))
 # endif
diff --git a/src/lib/libcrypto/cast/cast_lcl.h b/src/lib/libcrypto/cast/cast_lcl.h
index ec14804fbb..61facd09d8 100644
--- a/src/lib/libcrypto/cast/cast_lcl.h
+++ b/src/lib/libcrypto/cast/cast_lcl.h
@@ -56,11 +56,6 @@
  * [including the GNU Public Licence.]
  */
 
-#ifdef OPENSSL_SYS_WIN32
-#include <stdlib.h>
-#endif
-
-
 #undef c2l
 #define c2l(c,l)	(l =((unsigned long)(*((c)++)))    , \
 			 l|=((unsigned long)(*((c)++)))<< 8L, \
diff --git a/src/lib/libcrypto/des/enc_read.c b/src/lib/libcrypto/des/enc_read.c
index 23ad458dcf..e1ac04c5b3 100644
--- a/src/lib/libcrypto/des/enc_read.c
+++ b/src/lib/libcrypto/des/enc_read.c
@@ -150,11 +150,7 @@ int DES_enc_read(int fd, void *buf, int len, DES_key_schedule *sched,
 	/* first - get the length */
 	while (net_num < HDRSIZE) 
 		{
-#ifndef OPENSSL_SYS_WIN32
 		i=read(fd,(void *)&(net[net_num]),HDRSIZE-net_num);
-#else
-		i=_read(fd,(void *)&(net[net_num]),HDRSIZE-net_num);
-#endif
 #ifdef EINTR
 		if ((i == -1) && (errno == EINTR)) continue;
 #endif
@@ -176,11 +172,7 @@ int DES_enc_read(int fd, void *buf, int len, DES_key_schedule *sched,
 	net_num=0;
 	while (net_num < rnum)
 		{
-#ifndef OPENSSL_SYS_WIN32
 		i=read(fd,(void *)&(net[net_num]),rnum-net_num);
-#else
-		i=_read(fd,(void *)&(net[net_num]),rnum-net_num);
-#endif
 #ifdef EINTR
 		if ((i == -1) && (errno == EINTR)) continue;
 #endif
diff --git a/src/lib/libcrypto/des/enc_writ.c b/src/lib/libcrypto/des/enc_writ.c
index 8f6b033c87..18562310ee 100644
--- a/src/lib/libcrypto/des/enc_writ.c
+++ b/src/lib/libcrypto/des/enc_writ.c
@@ -156,11 +156,7 @@ int DES_enc_write(int fd, const void *_buf, int len,
 		{
 		/* eay 26/08/92 I was not doing writing from where we
 		 * got up to. */
-#ifndef _WIN32
 		i=write(fd,(void *)&(outbuf[j]),outnum-j);
-#else
-		i=_write(fd,(void *)&(outbuf[j]),outnum-j);
-#endif
 		if (i == -1)
 			{
 #ifdef EINTR
diff --git a/src/lib/libcrypto/engine/eng_aesni.c b/src/lib/libcrypto/engine/eng_aesni.c
index 5fdb33bfde..d547d7f465 100644
--- a/src/lib/libcrypto/engine/eng_aesni.c
+++ b/src/lib/libcrypto/engine/eng_aesni.c
@@ -309,11 +309,7 @@ static void aesni_ofb128_encrypt(const unsigned char *in, unsigned char *out,
 }
 /* ===== Engine "management" functions ===== */
 
-#if defined(_WIN32)
-typedef unsigned __int64 IA32CAP;
-#else
 typedef unsigned long long IA32CAP;
-#endif
 
 /* Prepare the ENGINE structure for registration */
 static int
diff --git a/src/lib/libcrypto/engine/eng_padlock.c b/src/lib/libcrypto/engine/eng_padlock.c
index c27181ba75..5a80b2b16d 100644
--- a/src/lib/libcrypto/engine/eng_padlock.c
+++ b/src/lib/libcrypto/engine/eng_padlock.c
@@ -129,12 +129,7 @@ void ENGINE_load_padlock (void)
 /* We do these includes here to avoid header problems on platforms that
    do not have the VIA padlock anyway... */
 #include <stdlib.h>
-#ifdef _WIN32
-# include <malloc.h>
-# ifndef alloca
-#  define alloca _alloca
-# endif
-#elif defined(__GNUC__)
+#if defined(__GNUC__)
 # ifndef alloca
 #  define alloca(s) __builtin_alloca(s)
 # endif
diff --git a/src/lib/libcrypto/engine/eng_rsax.c b/src/lib/libcrypto/engine/eng_rsax.c
index c0f6851601..1b15b6f1a3 100644
--- a/src/lib/libcrypto/engine/eng_rsax.c
+++ b/src/lib/libcrypto/engine/eng_rsax.c
@@ -217,11 +217,7 @@ static int e_rsax_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f)(void))
 
 #ifndef OPENSSL_NO_RSA
 
-#ifdef _WIN32
-typedef unsigned __int64 UINT64;
-#else
 typedef unsigned long long UINT64;
-#endif
 typedef unsigned short UINT16;
 
 /* Table t is interleaved in the following manner:
diff --git a/src/lib/libcrypto/modes/modes_lcl.h b/src/lib/libcrypto/modes/modes_lcl.h
index 2fc8138273..68c0e355ad 100644
--- a/src/lib/libcrypto/modes/modes_lcl.h
+++ b/src/lib/libcrypto/modes/modes_lcl.h
@@ -9,11 +9,7 @@
 #include <machine/endian.h>
 
 
-#if (defined(_WIN32) || defined(_WIN64)) && !defined(__MINGW32__)
-typedef __int64 i64;
-typedef unsigned __int64 u64;
-#define U64(C) C##UI64
-#elif defined(__arch64__)
+#if defined(_LP64)
 typedef long i64;
 typedef unsigned long u64;
 #define U64(C) C##UL
diff --git a/src/lib/libcrypto/sha/sha.h b/src/lib/libcrypto/sha/sha.h
index 435352c208..c0c3c16c08 100644
--- a/src/lib/libcrypto/sha/sha.h
+++ b/src/lib/libcrypto/sha/sha.h
@@ -154,10 +154,7 @@ void SHA256_Transform(SHA256_CTX *c, const unsigned char *data);
 #define SHA512_CBLOCK	(SHA_LBLOCK*8)	/* SHA-512 treats input data as a
 					 * contiguous array of 64 bit
 					 * wide big-endian values. */
-#if (defined(_WIN32) || defined(_WIN64)) && !defined(__MINGW32__)
-#define SHA_LONG64 unsigned __int64
-#define U64(C)     C##UI64
-#elif defined(__arch64__)
+#if defined(_LP64)
 #define SHA_LONG64 unsigned long
 #define U64(C)     C##UL
 #else
diff --git a/src/lib/libcrypto/srp/srp_lib.c b/src/lib/libcrypto/srp/srp_lib.c
index 8cc94f51db..a3a67eda2e 100644
--- a/src/lib/libcrypto/srp/srp_lib.c
+++ b/src/lib/libcrypto/srp/srp_lib.c
@@ -63,9 +63,7 @@
 #include <openssl/evp.h>
 
 #if (BN_BYTES == 8)
-# if (defined(_WIN32) || defined(_WIN64)) && !defined(__MINGW32__)
-#  define bn_pack4(a1,a2,a3,a4) ((a1##UI64<<48)|(a2##UI64<<32)|(a3##UI64<<16)|a4##UI64)
-# elif defined(__arch64__)
+# if defined(_LP64)
 #  define bn_pack4(a1,a2,a3,a4) ((a1##UL<<48)|(a2##UL<<32)|(a3##UL<<16)|a4##UL)
 # else
 #  define bn_pack4(a1,a2,a3,a4) ((a1##ULL<<48)|(a2##ULL<<32)|(a3##ULL<<16)|a4##ULL)
diff --git a/src/lib/libcrypto/ts/ts.h b/src/lib/libcrypto/ts/ts.h
index 3c5ab727db..085e062b96 100644
--- a/src/lib/libcrypto/ts/ts.h
+++ b/src/lib/libcrypto/ts/ts.h
@@ -89,11 +89,6 @@
 extern "C" {
 #endif
 
-#ifdef WIN32
-/* Under Win32 this is defined in wincrypt.h */
-#undef X509_NAME
-#endif
-
 #include <openssl/x509.h>
 #include <openssl/x509v3.h>
 
diff --git a/src/lib/libcrypto/whrlpool/wp_block.c b/src/lib/libcrypto/whrlpool/wp_block.c
index 11164e50f5..9c194f968b 100644
--- a/src/lib/libcrypto/whrlpool/wp_block.c
+++ b/src/lib/libcrypto/whrlpool/wp_block.c
@@ -40,9 +40,7 @@
 #include <machine/endian.h>
 
 typedef unsigned char		u8;
-#if (defined(_WIN32) || defined(_WIN64)) && !defined(__MINGW32)
-typedef unsigned __int64	u64;
-#elif defined(__arch64__)
+#if defined(_LP64)
 typedef unsigned long		u64;
 #else
 typedef unsigned long long	u64;
diff --git a/src/lib/libssl/src/crypto/aes/aes_x86core.c b/src/lib/libssl/src/crypto/aes/aes_x86core.c
index 295ea22bb4..8b3b29e28c 100644
--- a/src/lib/libssl/src/crypto/aes/aes_x86core.c
+++ b/src/lib/libssl/src/crypto/aes/aes_x86core.c
@@ -79,10 +79,7 @@ prefetch256(const void *table)
 #undef GETU32
 #define GETU32(p) (*((u32*)(p)))
 
-#if (defined(_WIN32) || defined(_WIN64)) && !defined(__MINGW32__)
-typedef unsigned __int64 u64;
-#define U64(C)	C##UI64
-#elif defined(__arch64__)
+#if defined(_LP64)
 typedef unsigned long u64;
 #define U64(C)	C##UL
 #else
diff --git a/src/lib/libssl/src/crypto/bn/asm/x86_64-gcc.c b/src/lib/libssl/src/crypto/bn/asm/x86_64-gcc.c
index acb0b40118..6a7fa4aea9 100644
--- a/src/lib/libssl/src/crypto/bn/asm/x86_64-gcc.c
+++ b/src/lib/libssl/src/crypto/bn/asm/x86_64-gcc.c
@@ -55,11 +55,7 @@
  *    machine.
  */
 
-#ifdef _WIN64
-#define BN_ULONG unsigned long long
-#else
 #define BN_ULONG unsigned long
-#endif
 
 #undef mul
 #undef mul_add
diff --git a/src/lib/libssl/src/crypto/bn/bn_exp.c b/src/lib/libssl/src/crypto/bn/bn_exp.c
index 2047e1cc3f..22ef643c02 100644
--- a/src/lib/libssl/src/crypto/bn/bn_exp.c
+++ b/src/lib/libssl/src/crypto/bn/bn_exp.c
@@ -114,12 +114,7 @@
 #include "bn_lcl.h"
 
 #include <stdlib.h>
-#ifdef _WIN32
-# include <malloc.h>
-# ifndef alloca
-#  define alloca _alloca
-# endif
-#elif defined(__GNUC__)
+#if defined(__GNUC__)
 # ifndef alloca
 #  define alloca(s) __builtin_alloca((s))
 # endif
diff --git a/src/lib/libssl/src/crypto/cast/cast_lcl.h b/src/lib/libssl/src/crypto/cast/cast_lcl.h
index ec14804fbb..61facd09d8 100644
--- a/src/lib/libssl/src/crypto/cast/cast_lcl.h
+++ b/src/lib/libssl/src/crypto/cast/cast_lcl.h
@@ -56,11 +56,6 @@
  * [including the GNU Public Licence.]
  */
 
-#ifdef OPENSSL_SYS_WIN32
-#include <stdlib.h>
-#endif
-
-
 #undef c2l
 #define c2l(c,l)	(l =((unsigned long)(*((c)++)))    , \
 			 l|=((unsigned long)(*((c)++)))<< 8L, \
diff --git a/src/lib/libssl/src/crypto/des/enc_read.c b/src/lib/libssl/src/crypto/des/enc_read.c
index 23ad458dcf..e1ac04c5b3 100644
--- a/src/lib/libssl/src/crypto/des/enc_read.c
+++ b/src/lib/libssl/src/crypto/des/enc_read.c
@@ -150,11 +150,7 @@ int DES_enc_read(int fd, void *buf, int len, DES_key_schedule *sched,
 	/* first - get the length */
 	while (net_num < HDRSIZE) 
 		{
-#ifndef OPENSSL_SYS_WIN32
 		i=read(fd,(void *)&(net[net_num]),HDRSIZE-net_num);
-#else
-		i=_read(fd,(void *)&(net[net_num]),HDRSIZE-net_num);
-#endif
 #ifdef EINTR
 		if ((i == -1) && (errno == EINTR)) continue;
 #endif
@@ -176,11 +172,7 @@ int DES_enc_read(int fd, void *buf, int len, DES_key_schedule *sched,
 	net_num=0;
 	while (net_num < rnum)
 		{
-#ifndef OPENSSL_SYS_WIN32
 		i=read(fd,(void *)&(net[net_num]),rnum-net_num);
-#else
-		i=_read(fd,(void *)&(net[net_num]),rnum-net_num);
-#endif
 #ifdef EINTR
 		if ((i == -1) && (errno == EINTR)) continue;
 #endif
diff --git a/src/lib/libssl/src/crypto/des/enc_writ.c b/src/lib/libssl/src/crypto/des/enc_writ.c
index 8f6b033c87..18562310ee 100644
--- a/src/lib/libssl/src/crypto/des/enc_writ.c
+++ b/src/lib/libssl/src/crypto/des/enc_writ.c
@@ -156,11 +156,7 @@ int DES_enc_write(int fd, const void *_buf, int len,
 		{
 		/* eay 26/08/92 I was not doing writing from where we
 		 * got up to. */
-#ifndef _WIN32
 		i=write(fd,(void *)&(outbuf[j]),outnum-j);
-#else
-		i=_write(fd,(void *)&(outbuf[j]),outnum-j);
-#endif
 		if (i == -1)
 			{
 #ifdef EINTR
diff --git a/src/lib/libssl/src/crypto/engine/eng_aesni.c b/src/lib/libssl/src/crypto/engine/eng_aesni.c
index 5fdb33bfde..d547d7f465 100644
--- a/src/lib/libssl/src/crypto/engine/eng_aesni.c
+++ b/src/lib/libssl/src/crypto/engine/eng_aesni.c
@@ -309,11 +309,7 @@ static void aesni_ofb128_encrypt(const unsigned char *in, unsigned char *out,
 }
 /* ===== Engine "management" functions ===== */
 
-#if defined(_WIN32)
-typedef unsigned __int64 IA32CAP;
-#else
 typedef unsigned long long IA32CAP;
-#endif
 
 /* Prepare the ENGINE structure for registration */
 static int
diff --git a/src/lib/libssl/src/crypto/engine/eng_padlock.c b/src/lib/libssl/src/crypto/engine/eng_padlock.c
index c27181ba75..5a80b2b16d 100644
--- a/src/lib/libssl/src/crypto/engine/eng_padlock.c
+++ b/src/lib/libssl/src/crypto/engine/eng_padlock.c
@@ -129,12 +129,7 @@ void ENGINE_load_padlock (void)
 /* We do these includes here to avoid header problems on platforms that
    do not have the VIA padlock anyway... */
 #include <stdlib.h>
-#ifdef _WIN32
-# include <malloc.h>
-# ifndef alloca
-#  define alloca _alloca
-# endif
-#elif defined(__GNUC__)
+#if defined(__GNUC__)
 # ifndef alloca
 #  define alloca(s) __builtin_alloca(s)
 # endif
diff --git a/src/lib/libssl/src/crypto/engine/eng_rsax.c b/src/lib/libssl/src/crypto/engine/eng_rsax.c
index c0f6851601..1b15b6f1a3 100644
--- a/src/lib/libssl/src/crypto/engine/eng_rsax.c
+++ b/src/lib/libssl/src/crypto/engine/eng_rsax.c
@@ -217,11 +217,7 @@ static int e_rsax_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f)(void))
 
 #ifndef OPENSSL_NO_RSA
 
-#ifdef _WIN32
-typedef unsigned __int64 UINT64;
-#else
 typedef unsigned long long UINT64;
-#endif
 typedef unsigned short UINT16;
 
 /* Table t is interleaved in the following manner:
diff --git a/src/lib/libssl/src/crypto/modes/modes_lcl.h b/src/lib/libssl/src/crypto/modes/modes_lcl.h
index 2fc8138273..68c0e355ad 100644
--- a/src/lib/libssl/src/crypto/modes/modes_lcl.h
+++ b/src/lib/libssl/src/crypto/modes/modes_lcl.h
@@ -9,11 +9,7 @@
 #include <machine/endian.h>
 
 
-#if (defined(_WIN32) || defined(_WIN64)) && !defined(__MINGW32__)
-typedef __int64 i64;
-typedef unsigned __int64 u64;
-#define U64(C) C##UI64
-#elif defined(__arch64__)
+#if defined(_LP64)
 typedef long i64;
 typedef unsigned long u64;
 #define U64(C) C##UL
diff --git a/src/lib/libssl/src/crypto/sha/sha.h b/src/lib/libssl/src/crypto/sha/sha.h
index 435352c208..c0c3c16c08 100644
--- a/src/lib/libssl/src/crypto/sha/sha.h
+++ b/src/lib/libssl/src/crypto/sha/sha.h
@@ -154,10 +154,7 @@ void SHA256_Transform(SHA256_CTX *c, const unsigned char *data);
 #define SHA512_CBLOCK	(SHA_LBLOCK*8)	/* SHA-512 treats input data as a
 					 * contiguous array of 64 bit
 					 * wide big-endian values. */
-#if (defined(_WIN32) || defined(_WIN64)) && !defined(__MINGW32__)
-#define SHA_LONG64 unsigned __int64
-#define U64(C)     C##UI64
-#elif defined(__arch64__)
+#if defined(_LP64)
 #define SHA_LONG64 unsigned long
 #define U64(C)     C##UL
 #else
diff --git a/src/lib/libssl/src/crypto/srp/srp_lib.c b/src/lib/libssl/src/crypto/srp/srp_lib.c
index 8cc94f51db..a3a67eda2e 100644
--- a/src/lib/libssl/src/crypto/srp/srp_lib.c
+++ b/src/lib/libssl/src/crypto/srp/srp_lib.c
@@ -63,9 +63,7 @@
 #include <openssl/evp.h>
 
 #if (BN_BYTES == 8)
-# if (defined(_WIN32) || defined(_WIN64)) && !defined(__MINGW32__)
-#  define bn_pack4(a1,a2,a3,a4) ((a1##UI64<<48)|(a2##UI64<<32)|(a3##UI64<<16)|a4##UI64)
-# elif defined(__arch64__)
+# if defined(_LP64)
 #  define bn_pack4(a1,a2,a3,a4) ((a1##UL<<48)|(a2##UL<<32)|(a3##UL<<16)|a4##UL)
 # else
 #  define bn_pack4(a1,a2,a3,a4) ((a1##ULL<<48)|(a2##ULL<<32)|(a3##ULL<<16)|a4##ULL)
diff --git a/src/lib/libssl/src/crypto/ts/ts.h b/src/lib/libssl/src/crypto/ts/ts.h
index 3c5ab727db..085e062b96 100644
--- a/src/lib/libssl/src/crypto/ts/ts.h
+++ b/src/lib/libssl/src/crypto/ts/ts.h
@@ -89,11 +89,6 @@
 extern "C" {
 #endif
 
-#ifdef WIN32
-/* Under Win32 this is defined in wincrypt.h */
-#undef X509_NAME
-#endif
-
 #include <openssl/x509.h>
 #include <openssl/x509v3.h>
 
diff --git a/src/lib/libssl/src/crypto/whrlpool/wp_block.c b/src/lib/libssl/src/crypto/whrlpool/wp_block.c
index 11164e50f5..9c194f968b 100644
--- a/src/lib/libssl/src/crypto/whrlpool/wp_block.c
+++ b/src/lib/libssl/src/crypto/whrlpool/wp_block.c
@@ -40,9 +40,7 @@
 #include <machine/endian.h>
 
 typedef unsigned char		u8;
-#if (defined(_WIN32) || defined(_WIN64)) && !defined(__MINGW32)
-typedef unsigned __int64	u64;
-#elif defined(__arch64__)
+#if defined(_LP64)
 typedef unsigned long		u64;
 #else
 typedef unsigned long long	u64;
-- 
cgit v1.2.3-55-g6feb