aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/cryptlib.c
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2009-05-02 12:51:37 +0000
committerAndy Polyakov <appro@openssl.org>2009-05-02 12:51:37 +0000
commitf00fdcd14dd82410fccf5a8b41e7ea38a90e7e79 (patch)
tree45bd49fa2784401a80787f7bfbcb32e0aff9430e /crypto/cryptlib.c
parent194274cb68efaa1959956bdca55ed6773d902f78 (diff)
downloadopenssl-f00fdcd14dd82410fccf5a8b41e7ea38a90e7e79.tar.gz
cryptlib.c: eliminate dependency on _strtoui64, older Windows CRT don't have it.
Diffstat (limited to 'crypto/cryptlib.c')
-rw-r--r--crypto/cryptlib.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/crypto/cryptlib.c b/crypto/cryptlib.c
index de8d4eb238..bb54e6485a 100644
--- a/crypto/cryptlib.c
+++ b/crypto/cryptlib.c
@@ -668,7 +668,6 @@ unsigned int *OPENSSL_ia32cap_loc(void) { return OPENSSL_ia32cap_P; }
#define OPENSSL_CPUID_SETUP
#if defined(_WIN32)
typedef unsigned __int64 IA32CAP;
-#define strtoull _strtoui64
#else
typedef unsigned long long IA32CAP;
#endif
@@ -682,7 +681,11 @@ void OPENSSL_cpuid_setup(void)
trigger=1;
if ((env=getenv("OPENSSL_ia32cap")))
+#if defined(_WIN32)
+ { if (!sscanf(env,"%I64i",&vec)) vec = strtoul(env,NULL,0); }
+#else
vec = strtoull(env,NULL,0);
+#endif
else
vec = OPENSSL_ia32_cpuid();