cryptlib.c: eliminate dependency on _strtoui64, older Windows CRT don't have it.
authorAndy Polyakov <appro@openssl.org>
Sat, 2 May 2009 12:51:37 +0000 (12:51 +0000)
committerAndy Polyakov <appro@openssl.org>
Sat, 2 May 2009 12:51:37 +0000 (12:51 +0000)
crypto/cryptlib.c

index de8d4eb2381c09a24f85015ee1b1a6d95484c76d..bb54e6485ad0efa18dbcaac1f0dc05120ea54489 100644 (file)
@@ -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();