From 7a1f92fdc39c5840cb8f491fa59a6ae5b9b5f610 Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Tue, 3 Dec 2002 14:20:44 +0000 Subject: [PATCH] Windows CE updates, contributed by Steven Reddie --- INSTALL.WCE | 3 +++ crypto/crypto.h | 3 --- crypto/des/read2pwd.c | 3 --- crypto/engine/enginetest.c | 3 --- crypto/md2/md2_dgst.c | 1 + crypto/md4/md4_one.c | 1 + crypto/md5/md5_one.c | 1 + crypto/rand/rand_win.c | 2 +- crypto/ripemd/rmd_one.c | 1 + crypto/sha/sha1_one.c | 1 + crypto/sha/sha_one.c | 1 + crypto/ui/ui_util.c | 3 --- e_os.h | 3 --- util/mk1mf.pl | 11 +++++++++++ util/pl/VC-CE.pl | 7 +++---- 15 files changed, 24 insertions(+), 20 deletions(-) diff --git a/INSTALL.WCE b/INSTALL.WCE index a22370bf0f..ac587d6bd2 100644 --- a/INSTALL.WCE +++ b/INSTALL.WCE @@ -11,6 +11,9 @@ You also need Perl for Win32. You will need ActiveState Perl, available from http://www.activestate.com/ActivePerl. + Windows CE support in OpenSSL relies on wcecompat. All Windows CE specific + issues should be directed to www.essemer.com.au. + The C Runtime Library implementation for Windows CE that is included with Microsoft eMbedded Visual C++ 3.0 is incomplete and in some places incorrect. wcecompat plugs the holes and tries to bring the Windows CE diff --git a/crypto/crypto.h b/crypto/crypto.h index 4027b4306c..60effb4152 100644 --- a/crypto/crypto.h +++ b/crypto/crypto.h @@ -121,9 +121,6 @@ #ifndef OPENSSL_NO_FP_API #include -#ifdef OPENSSL_SYS_WINCE -#include -#endif #endif #include diff --git a/crypto/des/read2pwd.c b/crypto/des/read2pwd.c index 430da4e994..3a63c4016c 100644 --- a/crypto/des/read2pwd.c +++ b/crypto/des/read2pwd.c @@ -112,9 +112,6 @@ #include #include #include -#ifdef OPENSSL_SYS_WINCE -#include /* BUFSIZ */ -#endif int DES_read_password(DES_cblock *key, const char *prompt, int verify) { diff --git a/crypto/engine/enginetest.c b/crypto/engine/enginetest.c index 51eb091e60..87fa8c57b7 100644 --- a/crypto/engine/enginetest.c +++ b/crypto/engine/enginetest.c @@ -58,9 +58,6 @@ #include #include -#ifdef OPENSSL_SYS_WINCE -#include -#endif #include #include #include diff --git a/crypto/md2/md2_dgst.c b/crypto/md2/md2_dgst.c index 47866c3c86..ecb64f0ec4 100644 --- a/crypto/md2/md2_dgst.c +++ b/crypto/md2/md2_dgst.c @@ -61,6 +61,7 @@ #include #include #include +#include const char *MD2_version="MD2" OPENSSL_VERSION_PTEXT; diff --git a/crypto/md4/md4_one.c b/crypto/md4/md4_one.c index 53efd430ec..00565507e4 100644 --- a/crypto/md4/md4_one.c +++ b/crypto/md4/md4_one.c @@ -59,6 +59,7 @@ #include #include #include +#include #ifdef CHARSET_EBCDIC #include diff --git a/crypto/md5/md5_one.c b/crypto/md5/md5_one.c index c67eb795ca..c5dd2d81db 100644 --- a/crypto/md5/md5_one.c +++ b/crypto/md5/md5_one.c @@ -59,6 +59,7 @@ #include #include #include +#include #ifdef CHARSET_EBCDIC #include diff --git a/crypto/rand/rand_win.c b/crypto/rand/rand_win.c index 37f172f8a4..113b58678f 100644 --- a/crypto/rand/rand_win.c +++ b/crypto/rand/rand_win.c @@ -211,7 +211,7 @@ int RAND_poll(void) osverinfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO) ; GetVersionEx( &osverinfo ) ; -#ifdef OPENSSL_SYS_WINCE +#if defined(OPENSSL_SYS_WINCE) && WCEPLATFORM!=MS_HPC_PRO /* poll the CryptoAPI PRNG */ /* The CryptoAPI returns sizeof(buf) bytes of randomness */ if (CryptAcquireContext(&hProvider, 0, 0, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT)) diff --git a/crypto/ripemd/rmd_one.c b/crypto/ripemd/rmd_one.c index a783282282..f8b580c33a 100644 --- a/crypto/ripemd/rmd_one.c +++ b/crypto/ripemd/rmd_one.c @@ -59,6 +59,7 @@ #include #include #include +#include unsigned char *RIPEMD160(const unsigned char *d, unsigned long n, unsigned char *md) diff --git a/crypto/sha/sha1_one.c b/crypto/sha/sha1_one.c index ad235d6cdc..20e660c71d 100644 --- a/crypto/sha/sha1_one.c +++ b/crypto/sha/sha1_one.c @@ -59,6 +59,7 @@ #include #include #include +#include #ifndef OPENSSL_NO_SHA1 unsigned char *SHA1(const unsigned char *d, unsigned long n, unsigned char *md) diff --git a/crypto/sha/sha_one.c b/crypto/sha/sha_one.c index 66b083144a..e61c63f3e9 100644 --- a/crypto/sha/sha_one.c +++ b/crypto/sha/sha_one.c @@ -59,6 +59,7 @@ #include #include #include +#include #ifndef OPENSSL_NO_SHA0 unsigned char *SHA(const unsigned char *d, unsigned long n, unsigned char *md) diff --git a/crypto/ui/ui_util.c b/crypto/ui/ui_util.c index fc8b691a87..ee9730d5e2 100644 --- a/crypto/ui/ui_util.c +++ b/crypto/ui/ui_util.c @@ -55,9 +55,6 @@ #include #include -#ifdef OPENSSL_SYS_WINCE -#include /* BUFSIZ */ -#endif int UI_UTIL_read_pw_string(char *buf,int length,const char *prompt,int verify) { diff --git a/e_os.h b/e_os.h index a4f1cb1a94..5d761781b8 100644 --- a/e_os.h +++ b/e_os.h @@ -230,9 +230,6 @@ extern "C" { # include # ifdef OPENSSL_SYS_WINCE -# include -# include -# include # include # endif diff --git a/util/mk1mf.pl b/util/mk1mf.pl index 18ef2f5708..8c6370bc5d 100755 --- a/util/mk1mf.pl +++ b/util/mk1mf.pl @@ -273,6 +273,17 @@ $defs= <<"EOF"; # The one monster makefile better suits building in non-unix # environments. +EOF + +if ($platform eq "VC-CE") + { + $defs.= <<"EOF"; +!INCLUDE <\$(WCECOMPAT)/wcedefs.mak> + +EOF + } + +$defs.= <<"EOF"; INSTALLTOP=$INSTALLTOP # Set your compiler options diff --git a/util/pl/VC-CE.pl b/util/pl/VC-CE.pl index 907495efe4..1805ef9d97 100644 --- a/util/pl/VC-CE.pl +++ b/util/pl/VC-CE.pl @@ -12,8 +12,8 @@ $rm='del'; # C compiler stuff $cc='$(CC)'; -$cflags=' /W3 /WX /Ox /O2 /Ob2 /Gs0 /GF /Gy /nologo -D$(TARGETCPU) -D_$(TARGETCPU)_ -DUNDER_CE=300 -D_WIN32_CE=300 -DWIN32_PLATFORM_PSPC -DUNICODE -D_UNICODE -DWIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DDSO_WIN32 -DNO_CHMOD -I$(WCECOMPAT)/include'; -$lflags='/nologo /subsystem:windowsce,3.00 /machine:$(TARGETCPU) /opt:ref'; +$cflags=' /W3 /WX /Ox /O2 /Ob2 /Gs0 /GF /Gy /nologo $(WCETARGETDEFS) -DUNICODE -D_UNICODE -DWIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DDSO_WIN32 -DNO_CHMOD -I$(WCECOMPAT)/include'; +$lflags='/nologo /subsystem:windowsce,$(WCELDVERSION) /machine:$(WCELDMACHINE) /opt:ref'; $mlflags=''; $out_def='out32_$(TARGETCPU)'; @@ -36,8 +36,7 @@ $efile="/out:"; $exep='.exe'; if ($no_sock) { $ex_libs=""; } -else { $ex_libs='winsock.lib $(WCECOMPAT)/lib/wcecompatex.lib'; } -#else { $ex_libs='winsock.lib coredll.lib $(WCECOMPAT)/lib/wcecompatex.lib'; } +else { $ex_libs='winsock.lib $(WCECOMPAT)/lib/wcecompatex.lib $(WCELDFLAGS)'; } # static library stuff $mklib='lib'; -- 2.25.1