On 2006.10.20 at 15:41:35 +0400, Victor B. Wagner wrote:

I was to quick to send previous patch. Two additional changes
are required: changing order of
#include <openssl/engine.h> 
and #include "apps.h" in apps/apps.c
and order of <openssl/rand.h> and "../e_os.h" in test/randtest.c

Updated patch attached.
Index: Configure
===================================================================
RCS file: /cvs-openssl/openssl/Configure,v
retrieving revision 1.541
diff -u -r1.541 Configure
--- Configure   17 Oct 2006 13:38:08 -0000      1.541
+++ Configure   20 Oct 2006 11:49:31 -0000
@@ -475,7 +475,7 @@
 "BC-32","bcc32::::WIN32::BN_LLONG DES_PTR RC4_INDEX 
EXPORT_VAR_AS_FN:${no_asm}:win32",
 
 # MinGW
-"mingw", "gcc:-mno-cygwin -DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 
-Wall -D_WIN32_WINNT=0x333:::MINGW32:-lwsock32 -lgdi32:BN_LLONG ${x86_gcc_des} 
${x86_gcc_opts} EXPORT_VAR_AS_FN:${x86_coff_asm}:win32:cygwin-shared:-D_WINDLL 
-DOPENSSL_USE_APPLINK:-mno-cygwin -shared:.dll.a",
+"mingw", "gcc:-mno-cygwin -DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 
-Wall -D_WIN32_WINNT=0x333:::MINGW32:-lws2_32 -lwsock32 -lgdi32:BN_LLONG 
${x86_gcc_des} ${x86_gcc_opts} 
EXPORT_VAR_AS_FN:${x86_coff_asm}:win32:cygwin-shared:-D_WINDLL 
-DOPENSSL_USE_APPLINK:-Wl,--export-all -mno-cygwin -shared:.dll.a",
 
 # UWIN 
 "UWIN", "cc:-DTERMIOS -DL_ENDIAN -O -Wall:::UWIN::BN_LLONG ${x86_gcc_des} 
${x86_gcc_opts}:${no_asm}:win32",
@@ -930,7 +930,6 @@
 
 my $IsMK1MF=scalar grep /^$target$/,@MK1MF_Builds;
 
-$IsMK1MF=1 if ($target eq "mingw" && $^O ne "cygwin" && !is_msys());
 
 $exe_ext=".exe" if ($target eq "Cygwin" || $target eq "DJGPP" || $target eq 
"mingw");
 $exe_ext=".pm"  if ($target =~ /vos/);
@@ -1832,10 +1831,4 @@
        return $errorcnt;
        }
 
-# Attempt to detect MSYS environment
 
-sub is_msys
-       {
-       return 1 if (exists $ENV{"TERM"} && $ENV{"TERM"} eq "msys");
-       return 0;
-       }
Index: Makefile.shared
===================================================================
RCS file: /cvs-openssl/openssl/Makefile.shared,v
retrieving revision 1.57
diff -u -r1.57 Makefile.shared
--- Makefile.shared     20 May 2006 08:52:34 -0000      1.57
+++ Makefile.shared     20 Oct 2006 11:49:31 -0000
@@ -7,6 +7,7 @@
 
 # CC contains the current compiler.  This one MUST be defined
 CC=cc
+NM=nm
 CFLAGS=$(CFLAG)
 # LDFLAGS contains flags to be used when temporary object files (when building
 # shared libraries) are created, or when an application is linked.
@@ -101,7 +102,7 @@
     LIBDEPS="$${LIBDEPS:-$(LIBDEPS)}"; \
     SHAREDCMD="$${SHAREDCMD:-$(CC)}"; \
     SHAREDFLAGS="$${SHAREDFLAGS:-$(CFLAGS) $(SHARED_LDFLAGS)}"; \
-    nm -Pg $$SHOBJECTS | grep ' [BDT] ' | cut -f1 -d' ' > lib$(LIBNAME).exp; \
+    $(NM) -Pg $$SHOBJECTS | grep ' [BDT] ' | cut -f1 -d' ' > 
lib$(LIBNAME).exp; \
     LIBPATH=`for x in $$LIBDEPS; do if echo $$x | grep '^ *-L' > /dev/null 
2>&1; then echo $$x | sed -e 's/^ *-L//'; fi; done | uniq`; \
     LIBPATH=`echo $$LIBPATH | sed -e 's/ /:/g'`; \
     LD_LIBRARY_PATH=$$LIBPATH:$$LD_LIBRARY_PATH \
Index: apps/apps.c
===================================================================
RCS file: /cvs-openssl/openssl/apps/apps.c,v
retrieving revision 1.114
diff -u -r1.114 apps.c
--- apps/apps.c 12 May 2006 17:11:58 -0000      1.114
+++ apps/apps.c 20 Oct 2006 11:49:32 -0000
@@ -126,6 +126,9 @@
 #include <openssl/pkcs12.h>
 #include <openssl/ui.h>
 #include <openssl/safestack.h>
+#define NON_MAIN
+#include "apps.h"
+#undef NON_MAIN
 #ifndef OPENSSL_NO_ENGINE
 #include <openssl/engine.h>
 #endif
@@ -134,9 +137,6 @@
 #endif
 #include <openssl/bn.h>
 
-#define NON_MAIN
-#include "apps.h"
-#undef NON_MAIN
 
 #ifdef _WIN32
 static int WIN32_rename(const char *from, const char *to);
Index: crypto/bio/b_sock.c
===================================================================
RCS file: /cvs-openssl/openssl/crypto/bio/b_sock.c,v
retrieving revision 1.46
diff -u -r1.46 b_sock.c
--- crypto/bio/b_sock.c 11 Apr 2006 21:34:18 -0000      1.46
+++ crypto/bio/b_sock.c 20 Oct 2006 11:49:33 -0000
@@ -60,6 +60,7 @@
 #include <stdlib.h>
 #include <errno.h>
 #define USE_SOCKETS
+#include "e_os.h"
 #include "cryptlib.h"
 #include <openssl/bio.h>
 #if defined(OPENSSL_SYS_NETWARE) && defined(NETWARE_BSDSOCK)
Index: crypto/rand/randtest.c
===================================================================
RCS file: /cvs-openssl/openssl/crypto/rand/randtest.c,v
retrieving revision 1.8
diff -u -r1.8 randtest.c
--- crypto/rand/randtest.c      28 Aug 2005 22:49:55 -0000      1.8
+++ crypto/rand/randtest.c      20 Oct 2006 11:49:37 -0000
@@ -58,9 +58,9 @@
 
 #include <stdio.h>
 #include <stdlib.h>
+#include "../e_os.h"
 #include <openssl/rand.h>
 
-#include "../e_os.h"
 
 /* some FIPS 140-1 random number test */
 /* some simple tests */
Index: engines/ccgost/gost_eng.c
===================================================================
RCS file: /cvs-openssl/openssl/engines/ccgost/gost_eng.c,v
retrieving revision 1.2
diff -u -r1.2 gost_eng.c
--- engines/ccgost/gost_eng.c   21 Sep 2006 13:24:46 -0000      1.2
+++ engines/ccgost/gost_eng.c   20 Oct 2006 11:49:39 -0000
@@ -141,20 +141,11 @@
        return ret;
        }       
 
-#ifdef _WIN32
-extern __declspec( dllexport ) 
-#endif
        
-/*#ifndef OPENSSL_NO_DYNAMIC_ENGINE*/
 IMPLEMENT_DYNAMIC_BIND_FN(bind_gost)
 
-#ifdef _WIN32
-extern __declspec( dllexport ) 
-#endif
 
 IMPLEMENT_DYNAMIC_CHECK_FN()
-/*#else*/
-/*#endif OPENSSL_NO_DYNAMIC_ENGINE */
 
 static int gost_digests(ENGINE *e, const EVP_MD **digest,
        const int **nids, int nid)
Index: ssl/ssl_sess.c
===================================================================
RCS file: /cvs-openssl/openssl/ssl/ssl_sess.c,v
retrieving revision 1.62
diff -u -r1.62 ssl_sess.c
--- ssl/ssl_sess.c      30 Mar 2006 02:44:56 -0000      1.62
+++ ssl/ssl_sess.c      20 Oct 2006 11:49:39 -0000
@@ -136,9 +136,9 @@
  */
 
 #include <stdio.h>
+#include "ssl_locl.h"
 #include <openssl/lhash.h>
 #include <openssl/rand.h>
-#include "ssl_locl.h"
 
 static void SSL_SESSION_list_remove(SSL_CTX *ctx, SSL_SESSION *s);
 static void SSL_SESSION_list_add(SSL_CTX *ctx,SSL_SESSION *s);

Reply via email to