Hi,

At 03 Aug 2005 00:25:27 +0200 Andy Polyakov wrote:
> Test 20050803 snapshot as it becomes available. It addresses this and
> the other problems/suggestions discussed so far. A.

I tested it. It's getting better, but still has some problems.

- VC-32.pl
 1. It seems semi-colon is required after }.
 2. Use /machine:MIPS instead of /machine:R4100 or something for MIPS.

- cryptlib.c
 3. MB_TASKMODAL is not supported.
 4. It causes an 'Unreferenced variable' warning.

- dso_win32.c
 5. The signature for LoadLibraryA is wrong.
 6. There is a typo.

- md2test.c and ssltest.c
 7. Require a return statement even if it is never used.

- ectest.c
 8. It causes a following warning.

.\crypto\ec\ectest.c (807) : warning C4959: char2_field_tests: this procedure 
not optimized because it
      exceeds size threshold; to optimize this procedure use /QMOb<value>
      option with value >= 4070


Here is a patch to fix these problems except for 8. About 8, you can
supress it using pragma or just add a command line option.

In addition, some problems occur when I compile for SH3, so I'll delve
into it later.


---
diff -ur openssl-0.9.8-stable-SNAP-20050803.orig/crypto/cryptlib.c 
openssl-0.9.8-stable-SNAP-20050803/crypto/cryptlib.c
--- openssl-0.9.8-stable-SNAP-20050803.orig/crypto/cryptlib.c   2005-08-03 
08:03:27.000000000 +0900
+++ openssl-0.9.8-stable-SNAP-20050803/crypto/cryptlib.c        2005-08-03 
23:33:32.157078300 +0900
@@ -669,7 +669,9 @@
 { va_list ap;
   TCHAR buf[256];
   const TCHAR *fmt;
+#ifdef STD_ERROR_HANDLE
   HANDLE h;
+#endif
 
 #ifdef STD_ERROR_HANDLE        /* what a dirty trick! */
     if ((h=GetStdHandle(STD_ERROR_HANDLE)) != NULL &&
@@ -734,7 +736,11 @@
     }
     else
 #endif
+#if !defined(_WIN32_WCE)
        MessageBox (NULL,buf,_T("OpenSSL: 
FATAL"),MB_OK|MB_ICONSTOP|MB_TASKMODAL);
+#else
+       MessageBox (NULL,buf,_T("OpenSSL: FATAL"),MB_OK|MB_ICONSTOP);
+#endif
 }
 #else
 void OPENSSL_showfatal (const char *fmta,...)
diff -ur openssl-0.9.8-stable-SNAP-20050803.orig/crypto/dso/dso_win32.c 
openssl-0.9.8-stable-SNAP-20050803/crypto/dso/dso_win32.c
--- openssl-0.9.8-stable-SNAP-20050803.orig/crypto/dso/dso_win32.c      
2005-08-02 20:03:52.000000000 +0900
+++ openssl-0.9.8-stable-SNAP-20050803/crypto/dso/dso_win32.c   2005-08-03 
23:36:13.339420300 +0900
@@ -86,13 +86,13 @@
 # undef GetProcAddress
 # define GetProcAddress GetProcAddressA
 
-static HINSTANCE LoadLibraryA(LPCSTR *lpLibFileName)
+static HINSTANCE LoadLibraryA(LPCSTR lpLibFileName)
        {
        WCHAR *fnamw;
        size_t len_0=strlen(lpLibFileName)+1,i;
 
 #ifdef _MSC_VER
-       fname = (WCHAR *)_alloca (len_0*sizeof(WCHAR));
+       fnamw = (WCHAR *)_alloca (len_0*sizeof(WCHAR));
 #else
        fnamw = (WCHAR *)alloca (len_0*sizeof(WCHAR));
 #endif
diff -ur openssl-0.9.8-stable-SNAP-20050803.orig/crypto/md2/md2test.c 
openssl-0.9.8-stable-SNAP-20050803/crypto/md2/md2test.c
--- openssl-0.9.8-stable-SNAP-20050803.orig/crypto/md2/md2test.c        
2004-07-22 19:25:48.000000000 +0900
+++ openssl-0.9.8-stable-SNAP-20050803/crypto/md2/md2test.c     2005-08-03 
23:43:58.543283300 +0900
@@ -128,6 +128,7 @@
     if (err) printf("ERROR: %d\n", err);
 #endif
        EXIT(err);
+       return 0;
        }
 
 static char *pt(unsigned char *md)
diff -ur openssl-0.9.8-stable-SNAP-20050803.orig/ssl/ssltest.c 
openssl-0.9.8-stable-SNAP-20050803/ssl/ssltest.c
--- openssl-0.9.8-stable-SNAP-20050803.orig/ssl/ssltest.c       2005-07-16 
21:05:07.000000000 +0900
+++ openssl-0.9.8-stable-SNAP-20050803/ssl/ssltest.c    2005-08-03 
23:46:06.461064800 +0900
@@ -893,6 +893,7 @@
        CRYPTO_mem_leaks(bio_err);
        if (bio_err != NULL) BIO_free(bio_err);
        EXIT(ret);
+       return 0;
        }
 
 int doit_biopair(SSL *s_ssl, SSL *c_ssl, long count,
diff -ur openssl-0.9.8-stable-SNAP-20050803.orig/util/pl/VC-32.pl 
openssl-0.9.8-stable-SNAP-20050803/util/pl/VC-32.pl
--- openssl-0.9.8-stable-SNAP-20050803.orig/util/pl/VC-32.pl    2005-08-03 
08:04:50.000000000 +0900
+++ openssl-0.9.8-stable-SNAP-20050803/util/pl/VC-32.pl 2005-08-03 
23:43:36.340868800 +0900
@@ -48,15 +48,15 @@
     $wcetgt = $ENV{'TARGETCPU'};       # just shorter name...
     SWITCH: for($wcetgt) {
        /^X86/          && do { $wcecdefs.=" -Dx86 -D_X86_";
-                               $wcelflag.=" /machine:X86";     last; }
+                               $wcelflag.=" /machine:X86";     last; };
        /^ARM/          && do { $wcecdefs.=" -DARM -D_ARM_";
-                               $wcelflag.=" /machine:$wcetgt"; last; }
+                               $wcelflag.=" /machine:$wcetgt"; last; };
        /^R4[0-9]{3}/   && do { $wcecdefs.=" -DMIPS -D_MIPS_ -DMIPS_R4000";
-                               $wcelflag.=" /machine:$wcetgt"; last; }
+                               $wcelflag.=" /machine:MIPS";    last; };
        /^SH[0-9]/      && do { $wcecdefs.=" -D$wcetgt -D_$wcetgt_ -DSHx";
-                               $wcelflag.=" /machine:$wcetgt"; last; }
+                               $wcelflag.=" /machine:$wcetgt"; last; };
        { $wcecdefs.=" -D$wcetgt -D_$wcetgt_";
-         $wcelflag.=" /machine:$wcetgt";                       last; }
+         $wcelflag.=" /machine:$wcetgt";                       last; };
     }
 
     $cc='$(CC)';
---

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