Commit 51ff6bde authored by Andy Polyakov's avatar Andy Polyakov
Browse files

Engage Applink in mingw. Note that application-side module is not

compiled into *our* aplpications. That's because mingw is always
consistent with itself. Having library-side code linked into .dll
makes it possible to deploy the .dll with user-code compiled with
another compiler [which is pretty much the whole point behind Applink].
parent 28e4fe34
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -472,7 +472,7 @@ my %table=(
"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:-mno-cygwin -shared:.dll.a",
"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",

# UWIN 
"UWIN", "cc:-DTERMIOS -DL_ENDIAN -O -Wall:::UWIN::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${no_asm}:win32",
@@ -1133,6 +1133,7 @@ else
	$openssl_other_defines.="#define OPENSSL_NO_STATIC_ENGINE\n";
	}

$cpuid_obj.=" uplink.o uplink-cof.o" if ($cflags =~ /\-DOPENSSL_USE_APPLINK/);
# Compiler fix-ups
if ($target =~ /icc$/)
	{
+1 −1
Original line number Diff line number Diff line
@@ -2991,7 +2991,7 @@ $rmd160_obj = rm86-cof.o
$rc5_obj      = r586-cof.o
$dso_scheme   = win32
$shared_target= cygwin-shared
$shared_cflag = -D_WINDLL
$shared_cflag = -D_WINDLL -DOPENSSL_USE_APPLINK
$shared_ldflag = -mno-cygwin -shared
$shared_extension = .dll.a
$ranlib       = 
+6 −0
Original line number Diff line number Diff line
@@ -67,6 +67,12 @@ x86cpuid-cof.s: x86cpuid.pl perlasm/x86asm.pl
x86cpuid-out.s: x86cpuid.pl perlasm/x86asm.pl
	$(PERL) x86cpuid.pl a.out $(CFLAGS) $(PROCESSOR) > $@

uplink.o:	../ms/uplink.c
	$(CC) $(CFLAGS) -c -o $@ ../ms/uplink.c

uplink-cof.s:	../ms/uplink.pl
	$(PERL) ../ms/uplink.pl coff > $@

x86_64cpuid.s: x86_64cpuid.pl
	$(PERL) x86_64cpuid.pl $@
ia64cpuid.s: ia64cpuid.S
+6 −1
Original line number Diff line number Diff line
@@ -236,12 +236,17 @@ static long MS_CALLBACK file_ctrl(BIO *b, int cmd, long num, void *ptr)
		b->shutdown=(int)num&BIO_CLOSE;
		b->ptr=ptr;
		b->init=1;
#if BIO_FLAGS_UPLINK!=0 && defined(_IOB_ENTRIES)
#if BIO_FLAGS_UPLINK!=0
#if defined(__MINGW32__) && defined(__MSVCRT__) && !defined(_IOB_ENTRIES)
#define _IOB_ENTRIES 20
#endif
#if defined(_IOB_ENTRIES)
		/* Safety net to catch purely internal BIO_set_fp calls */
		if ((size_t)ptr >= (size_t)stdin &&
		    (size_t)ptr <  (size_t)(stdin+_IOB_ENTRIES))
			BIO_clear_flags(b,BIO_FLAGS_UPLINK);
#endif
#endif
#ifdef UP_fsetmode
		if (b->flags&BIO_FLAGS_UPLINK)
			UP_fsetmode(b->ptr,num&BIO_FP_TEXT?'t':'b');
+1 −1
Original line number Diff line number Diff line
@@ -66,7 +66,7 @@

#ifdef OPENSSL_USE_APPLINK
#define BIO_FLAGS_UPLINK 0x8000
#include "uplink.h"
#include "ms/uplink.h"
#endif

#include <openssl/crypto.h>
Loading