summaryrefslogtreecommitdiffstats
path: root/crypto/srp
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2011-05-29 13:51:14 +0000
committerAndy Polyakov <appro@openssl.org>2011-05-29 13:51:14 +0000
commitfe9a5107beb60395273265b5770c2f189bf237c1 (patch)
treec00baf13d9367cdf3b1e3fce69036b02dbfe0a5e /crypto/srp
parentafa4b386718a75f5fbb7f66a09ebba72a7030fe9 (diff)
Various mingw64 fixes.
Diffstat (limited to 'crypto/srp')
-rw-r--r--crypto/srp/srp_lib.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/crypto/srp/srp_lib.c b/crypto/srp/srp_lib.c
index 9f6318281d..8eacf04534 100644
--- a/crypto/srp/srp_lib.c
+++ b/crypto/srp/srp_lib.c
@@ -63,13 +63,17 @@
#include <openssl/evp.h>
#if (BN_BYTES == 8)
-#define bn_pack4(a1,a2,a3,a4) 0x##a1##a2##a3##a4##ul
-#endif
-#if (BN_BYTES == 4)
-#define bn_pack4(a1,a2,a3,a4) 0x##a3##a4##ul, 0x##a1##a2##ul
-#endif
-#if (BN_BYTES == 2)
-#define bn_pack4(a1,a2,a3,a4) 0x##a4##u,0x##a3##u,0x##a2##u,0x##a1##u
+# if (defined(_WIN32) || defined(_WIN64)) && !defined(__MINGW32__)
+# define bn_pack4(a1,a2,a3,a4) 0x##a1##a2##a3##a4##UI64
+# elif defined(__arch64__)
+# define bn_pack4(a1,a2,a3,a4) 0x##a1##a2##a3##a4##UL
+# else
+# define bn_pack4(a1,a2,a3,a4) 0x##a1##a2##a3##a4##ULL
+# endif
+#elif (BN_BYTES == 4)
+# define bn_pack4(a1,a2,a3,a4) 0x##a3##a4##UL, 0x##a1##a2##UL
+#else
+# error "unsupported BN_BYTES"
#endif