Skip to content

Commit

Permalink
cryptlib.c: eliminate dependency on _strtoui64, older Windows CRT don…
Browse files Browse the repository at this point in the history
…'t have it.
  • Loading branch information
Andy Polyakov committed May 2, 2009
1 parent 194274c commit f00fdcd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion crypto/cryptlib.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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();

Expand Down

0 comments on commit f00fdcd

Please sign in to comment.