summaryrefslogtreecommitdiff
path: root/openssl/opensslwnt.patch
blob: b68e03715f2a9e6d9064d3562ef05916aa74041d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
--- misc/openssl-0.9.8v/crypto/x509v3/v3_pci.c	2007-03-05 01:06:47.000000000 +0100
+++ build/openssl-0.9.8v/crypto/x509v3/v3_pci.c	2010-03-26 12:04:20.961547300 +0100
@@ -2,7 +2,7 @@
 /* Contributed to the OpenSSL Project 2004
  * by Richard Levitte (richard@levitte.org)
  */
-/* Copyright (c) 2004 Kungliga Tekniska Hgskolan
+/* Copyright (c) 2004 Kungliga Tekniska Hoegskolan
  * (Royal Institute of Technology, Stockholm, Sweden).
  * All rights reserved.
  *
--- misc/openssl-0.9.8v/crypto/x509v3/v3_pcia.c	2004-12-28 01:21:33.000000000 +0100
+++ build/openssl-0.9.8v/crypto/x509v3/v3_pcia.c	2010-03-26 12:04:20.961547300 +0100
@@ -2,7 +2,7 @@
 /* Contributed to the OpenSSL Project 2004
  * by Richard Levitte (richard@levitte.org)
  */
-/* Copyright (c) 2004 Kungliga Tekniska Hgskolan
+/* Copyright (c) 2004 Kungliga Tekniska Hoegskolan
  * (Royal Institute of Technology, Stockholm, Sweden).
  * All rights reserved.
  *
--- misc/openssl-0.9.8v/ms/do_ms.bat	2009-07-28 14:51:19.000000000 +0200
+++ build/openssl-0.9.8v/ms/do_ms.bat	2010-03-26 12:19:19.399047300 +0100
@@ -1,11 +1,11 @@
 
-perl util\mkfiles.pl >MINFO
-perl util\mk1mf.pl no-asm VC-WIN32 >ms\nt.mak
-perl util\mk1mf.pl dll no-asm VC-WIN32 >ms\ntdll.mak
+%1 util\mkfiles.pl >MINFO
+if %2 == VC-WIN32 goto not64a
+perl ms\uplink.pl win64a > ms\uptable.asm
+ml64 -c -Foms\uptable.obj ms\uptable.asm
+:not64a
+%1 util\mk1mf.pl no-asm %2 >ms\nt.mak
+%1 util\mk1mf.pl dll no-asm %2 >ms\ntdll.mak
-if x%OSVERSION% == x goto skipce
-perl util\mk1mf.pl no-asm VC-CE >ms\ce.mak
-perl util\mk1mf.pl dll no-asm VC-CE >ms\cedll.mak
-:skipce
 
-perl util\mkdef.pl 32 libeay > ms\libeay32.def
-perl util\mkdef.pl 32 ssleay > ms\ssleay32.def
+%1 util\mkdef.pl 32 libeay > ms\libeay32.def
+%1 util\mkdef.pl 32 ssleay > ms\ssleay32.def
--- misc/openssl-0.9.8v/util/mk1mf.pl	2009-09-20 14:46:42.000000000 +0200
+++ build/openssl-0.9.8v/util/mk1mf.pl	2010-03-26 12:04:20.977172300 +0100
@@ -128,7 +128,7 @@
 $inc_def="outinc";
 $tmp_def="tmp";
 
-$perl="perl" unless defined $perl;
+$perl="$ENV{PERL}" unless defined $perl;
 $mkdir="-mkdir" unless defined $mkdir;
 
 ($ssl,$crypto)=("ssl","crypto");
@@ -290,6 +290,11 @@
 	chop;
 
 	($key,$val)=/^([^=]+)=(.*)/;
+
+	# On some Windows machines, $val has linefeeds at the end, which confuses
+	# subsequent code in this file. So we strip all whitespace at the end.
+	$val =~ s/\s+$//;
+
 	if ($key eq "RELATIVE_DIRECTORY")
 		{
 		if ($lib ne "")
@@ -529,7 +529,7 @@
 # Set your compiler options
 PLATFORM=$platform
 CC=$bin_dir${cc}
-CFLAG=$cflags
+CFLAG=$cflags \$(SOLARINC)
 APP_CFLAG=$app_cflag
 LIB_CFLAG=$lib_cflag
 SHLIB_CFLAG=$shl_cflag
@@ -544,7 +544,7 @@
 
 LINK=$link
 LFLAGS=$lflags
-RSC=$rsc
+RSC=$rsc \$(SOLARINC)
 
 # The output directory for everything intersting
 OUT_D=$out_dir
@@ -730,7 +735,7 @@
 printf OUT <<EOF;
 #ifdef $platform_cpp_symbol
   /* auto-generated/updated by util/mk1mf.pl for crypto/cversion.c */
-  #define CFLAGS "$cc $cflags"
+  #define CFLAGS "$cflags"
   #define PLATFORM "$platform"
 EOF
 printf OUT "  #define DATE \"%s\"\n", scalar gmtime();
--- misc/openssl-0.9.8v/util/pl/VC-32.pl	2010-02-04 02:10:24.000000000 +0100
+++ build/openssl-0.9.8v/util/pl/VC-32.pl	2010-03-26 12:04:20.977172300 +0100
@@ -32,7 +32,7 @@
 $l_flags =~ s/-L(\S+)/\/libpath:$1/g;
 
 # C compiler stuff
-$cc='cl';
+$cc=$ENV{'CC'};
 if ($FLAVOR =~ /WIN64/)
     {
     # Note that we currently don't have /WX on Win64! There is a lot of
@@ -103,21 +103,21 @@
     }
 
     $cc='$(CC)';
-    $base_cflags=' /W3 /WX /GF /Gy /nologo -DUNICODE -D_UNICODE -DOPENSSL_SYSNAME_WINCE -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DDSO_WIN32 -DNO_CHMOD -DOPENSSL_SMALL_FOOTPRINT';
+    $base_cflags=' -W3 -GF -Gy -nologo -DUNICODE -D_UNICODE -DOPENSSL_SYSNAME_WINCE -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DDSO_WIN32 -DNO_CHMOD -DOPENSSL_SMALL_FOOTPRINT';
     $base_cflags.=" $wcecdefs";
     $base_cflags.=' -I$(WCECOMPAT)/include'		if (defined($ENV{'WCECOMPAT'}));
     $base_cflags.=' -I$(PORTSDK_LIBPATH)/../../include'	if (defined($ENV{'PORTSDK_LIBPATH'}));
-    $opt_cflags=' /MC /O1i';	# optimize for space, but with intrinsics...
-    $dbg_cflags=' /MC /Od -DDEBUG -D_DEBUG';
+    $opt_cflags=' -MC -O1i';	# optimize for space, but with intrinsics...
+    $dbg_cflags=' -MC -Od -DDEBUG -D_DEBUG';
     $lflags="/nologo /opt:ref $wcelflag";
     }
 else	# Win32
     {
-    $base_cflags= " $mf_cflag";
+    $base_cflags= " $mf_cflag";
-    my $f = $shlib || $fips ?' /MD':' /MT';
-    $lib_cflag='/Zl' if (!$shlib);	# remove /DEFAULTLIBs from static lib
-    $opt_cflags=$f.' /Ox /O2 /Ob2';
-    $dbg_cflags=$f.'d /Od -DDEBUG -D_DEBUG';
+    my $f = $shlib || $fips ? (($ENV{MSVC_USE_DEBUG_RUNTIME} eq "TRUE") ? ' -MDd' : ' -MD' ):' -MT';
+    $lib_cflag='-Zl' if (!$shlib);	# remove /DEFAULTLIBs from static lib
+    $opt_cflags=$f.' -Ox -O2 -Ob2';
+    $dbg_cflags=$f.'d -Od -DDEBUG -D_DEBUG';
     $lflags="/nologo /subsystem:console /opt:ref";
     }
 $mlflags='';
@@ -138,7 +138,7 @@
 
 $obj='.obj';
 $asm_suffix='.asm';
-$ofile="/Fo";
+$ofile="-Fo.\\";
 
 # EXE linking stuff
 $link="link";
--- build/openssl-0.9.8v/ms/uplink.c
+++ build/openssl-0.9.8v/ms/uplink.c
@@ -1,5 +1,6 @@
 #if (defined(_WIN64) || defined(_WIN32_WCE)) && !defined(UNICODE)
 #define UNICODE
+#define _CRT_NON_CONFORMING_SWPRINTFS
 #endif
 #if defined(UNICODE) && !defined(_UNICODE)
 #define _UNICODE