Hi,

At 02 Aug 2005 23:37:43 +0900 Satoshi Nakamura wrote:
> Here is a patch.

Sorry, there was a small bug. This is the correct one against
snapshot-20050802.

diff -ur openssl-0.9.8-stable-SNAP-20050802.orig/util/pl/VC-32.pl 
openssl-0.9.8-stable-SNAP-20050802/util/pl/VC-32.pl
--- openssl-0.9.8-stable-SNAP-20050802.orig/util/pl/VC-32.pl    2005-07-31 
05:05:40.000000000 +0900
+++ openssl-0.9.8-stable-SNAP-20050802/util/pl/VC-32.pl 2005-08-02 
23:48:49.721423400 +0900
@@ -41,6 +41,7 @@
     $wcevers = $ENV{'OSVERSION'};                      # WCENNN
     die '%OSVERSION% value is insane'  if ($wcevers !~ 
/^WCE([1-9])([0-9]{2})$/);
     $wcecdefs = "-D_WIN32_WCE=$1$2";           # -D_WIN32_WCE=NNN
+    $wcecdefs .= " -DUNDER_CE=$1$2";               # -DUNDER_CE=NNN
     $wcelflag = "/subsystem:windowsce,$1.$2";  # ...,N.NN
     if ($ENV{'TARGETCPU'} =~ /^X86/)
     {  $wcelflag .= " /machine:X86";                   }
@@ -49,12 +50,24 @@
     $wceplatf =  $ENV{'PLATFORM'};
     $wceplatf =~ tr/a-z0-9 /A-Z0-9_/d;
     $wcecdefs .= " -DWCEPLATFORM=$wceplatf";
+    if ($ENV{'TARGETCPU'} =~ /^X86/)
+    {  $wcecdefs .= " -Dx86 -D_X86_"                                           
                }
+    elsif ($ENV{'TARGETCPU'} =~ /^R4[0-9]{3}/)
+    {  $wcecdefs .= " -DMIPS -D_MIPS_ -DMIPS_R4000"                            
}
+    elsif ($ENV{'TARGETCPU'} =~ /^ARM/)
+    {  $wcecdefs .= " -DARM -D_ARM_"                                           
                }
+    else
+    {  $wcecdefs .= " -D$ENV{'TARGETCPU'} -D_$ENV{'TARGETCPU'}_"       }
+    if ($ENV{'TARGETCPU'} =~ /^SH[0-9]/)
+    {  $wcecdefs .= " -DSHx"                                                   
                        }
 
     $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 /GF /Gy /nologo -DUNICODE -D_UNICODE 
-DOPENSSL_SYSNAME_WINCE -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DDSO_WIN32 -DNO_CHMOD 
-I$(WCECOMPAT)/include';
+    $base_cflags.= " /Gs0" if ($ENV{'TARGETCPU'} !~ /^SH[0-9]/);
     $base_cflags.=" $wcecdefs";
-    $opt_cflags=' /MD /Ox /O2 /Ob2';
-    $dbg_clfags=' /MDd /Od -DDEBUG -D_DEBUG';
+    $base_cflags.=" -Qsh4" if ($ENV{'TARGETCPU'} =~ /^SH4/);
+    $opt_cflags=' /MC /Ox /O2 /Ob2';
+    $dbg_clfags=' /MC /Od -DDEBUG -D_DEBUG';
     $lflags="/nologo /opt:ref $wcelflag";
     }
 else   # Win32


In addition, this patch is required to compile.

diff -ur openssl-0.9.8-stable-SNAP-20050802.orig/crypto/cryptlib.c 
openssl-0.9.8-stable-SNAP-20050802/crypto/cryptlib.c
--- openssl-0.9.8-stable-SNAP-20050802.orig/crypto/cryptlib.c   2005-07-05 
09:04:43.000000000 +0900
+++ openssl-0.9.8-stable-SNAP-20050802/crypto/cryptlib.c        2005-08-03 
00:04:13.621919400 +0900
@@ -620,7 +620,7 @@
        }
 #endif
 
-#if defined(_WIN32) && !defined(__CYGWIN__)
+#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(_WIN32_WCE)
 #include <tchar.h>
 
 #if defined(_WIN32_WINNT) && _WIN32_WINNT>=0x0333


Regards.

-- 
Satoshi Nakamura <[EMAIL PROTECTED]>
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [email protected]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to