Eliminate bogus #if WCEPLATFORM!=MS_HPC_PRO [which by the way unconditionally
invalidated the whole clause] and replace it with #if _WIN32_WCE>=210.
This commit is contained in:
parent
e85d67af9f
commit
8a35fb3bea
@ -217,21 +217,22 @@ int RAND_poll(void)
|
|||||||
osverinfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO) ;
|
osverinfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO) ;
|
||||||
GetVersionEx( &osverinfo ) ;
|
GetVersionEx( &osverinfo ) ;
|
||||||
|
|
||||||
#if defined(OPENSSL_SYS_WINCE) && WCEPLATFORM!=MS_HPC_PRO
|
#if defined(OPENSSL_SYS_WINCE)
|
||||||
#ifndef CryptAcquireContext
|
# if defined(_WIN32_WCE) && _WIN32_WCE>=210
|
||||||
#define CryptAcquireContext CryptAcquireContextW
|
# ifndef CryptAcquireContext
|
||||||
#endif
|
/* reserve for broken header... */
|
||||||
|
# define CryptAcquireContext CryptAcquireContextW
|
||||||
|
# endif
|
||||||
/* poll the CryptoAPI PRNG */
|
/* poll the CryptoAPI PRNG */
|
||||||
/* The CryptoAPI returns sizeof(buf) bytes of randomness */
|
/* The CryptoAPI returns sizeof(buf) bytes of randomness */
|
||||||
if (CryptAcquireContext(&hProvider, 0, 0, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT))
|
if (CryptAcquireContext(&hProvider, NULL, NULL, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT))
|
||||||
{
|
{
|
||||||
if (CryptGenRandom(hProvider, sizeof(buf), buf))
|
if (CryptGenRandom(hProvider, sizeof(buf), buf))
|
||||||
RAND_add(buf, sizeof(buf), sizeof(buf));
|
RAND_add(buf, sizeof(buf), sizeof(buf));
|
||||||
CryptReleaseContext(hProvider, 0);
|
CryptReleaseContext(hProvider, 0);
|
||||||
}
|
}
|
||||||
#endif
|
# endif
|
||||||
|
#else /* OPENSSL_SYS_WINCE */
|
||||||
#ifndef OPENSSL_SYS_WINCE
|
|
||||||
/*
|
/*
|
||||||
* None of below libraries are present on Windows CE, which is
|
* None of below libraries are present on Windows CE, which is
|
||||||
* why we #ifndef the whole section. This also excuses us from
|
* why we #ifndef the whole section. This also excuses us from
|
||||||
@ -361,7 +362,7 @@ int RAND_poll(void)
|
|||||||
{
|
{
|
||||||
/* poll the CryptoAPI PRNG */
|
/* poll the CryptoAPI PRNG */
|
||||||
/* The CryptoAPI returns sizeof(buf) bytes of randomness */
|
/* The CryptoAPI returns sizeof(buf) bytes of randomness */
|
||||||
if (acquire(&hProvider, 0, 0, PROV_RSA_FULL,
|
if (acquire(&hProvider, NULL, NULL, PROV_RSA_FULL,
|
||||||
CRYPT_VERIFYCONTEXT))
|
CRYPT_VERIFYCONTEXT))
|
||||||
{
|
{
|
||||||
if (gen(hProvider, sizeof(buf), buf) != 0)
|
if (gen(hProvider, sizeof(buf), buf) != 0)
|
||||||
|
@ -48,7 +48,7 @@ elsif ($FLAVOR =~ /CE/)
|
|||||||
{ $wcelflag .= " /machine:$ENV{'TARGETCPU'}"; }
|
{ $wcelflag .= " /machine:$ENV{'TARGETCPU'}"; }
|
||||||
$wceplatf = $ENV{'PLATFORM'};
|
$wceplatf = $ENV{'PLATFORM'};
|
||||||
$wceplatf =~ tr/a-z0-9 /A-Z0-9_/d;
|
$wceplatf =~ tr/a-z0-9 /A-Z0-9_/d;
|
||||||
$wcecdefs .= " -DWCEPLATFORM=$wceplatf";
|
$wcecdefs .= " -DWCE_$wceplatf";
|
||||||
|
|
||||||
$cc='$(CC)';
|
$cc='$(CC)';
|
||||||
$base_cflags=' /W3 /WX /Gs0 /GF /Gy /nologo -DUNICODE -D_UNICODE -DOPENSSL_SYSNAME_WINCE -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DDSO_WIN32 -DNO_CHMOD -I$(WCECOMPAT)/include';
|
$base_cflags=' /W3 /WX /Gs0 /GF /Gy /nologo -DUNICODE -D_UNICODE -DOPENSSL_SYSNAME_WINCE -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DDSO_WIN32 -DNO_CHMOD -I$(WCECOMPAT)/include';
|
||||||
@ -95,7 +95,7 @@ else { $ex_libs='wsock32.lib'; }
|
|||||||
|
|
||||||
if ($FLAVOR =~ /CE/)
|
if ($FLAVOR =~ /CE/)
|
||||||
{
|
{
|
||||||
$ex_libs.=' $(WCECOMPAT)/lib/wcecompatex.lib';
|
$ex_libs.=' $(WCECOMPAT)/lib/wcecompatex.lib cryptapi.lib';
|
||||||
$ex_libs.=' /nodefaultlib:oldnames.lib coredll.lib corelibc.lib' if ($ENV{'TARGETCPU'} eq "X86");
|
$ex_libs.=' /nodefaultlib:oldnames.lib coredll.lib corelibc.lib' if ($ENV{'TARGETCPU'} eq "X86");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user