forked from mxe/mxe
-
Notifications
You must be signed in to change notification settings - Fork 0
/
lzma-1-fixes.patch
209 lines (168 loc) · 5.37 KB
/
lzma-1-fixes.patch
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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
This file is part of MXE. See LICENSE.md for licensing information.
Contains ad hoc patches for cross building.
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jonas Kvinge <jonas@jkvinge.net>
Date: Tue, 11 Oct 2022 18:27:06 +0200
Subject: [PATCH 1/1] MinGW build fixes
diff --git a/C/7zip_gcc_c.mak b/C/7zip_gcc_c.mak
index 1111111..2222222 100644
--- a/C/7zip_gcc_c.mak
+++ b/C/7zip_gcc_c.mak
@@ -93,7 +93,7 @@ DEL_OBJ_EXE = -$(RM) $(O)\*.o $(O)\$(PROG).exe $(O)\$(PROG).dll
endif
-LIB2 = -lOle32 -loleaut32 -luuid -ladvapi32 -lUser32
+LIB2 = -lOle32 -loleaut32 -luuid -ladvapi32 -luser32
CXXFLAGS_EXTRA = -DUNICODE -D_UNICODE
# -Wno-delete-non-virtual-dtor
@@ -157,7 +157,7 @@ $(PROGPATH_STATIC): $(OBJS)
ifndef NO_DEFAULT_RES
$O/resource.o: resource.rc
- windres.exe $(RFLAGS) resource.rc $O/resource.o
+ $(WINDRES) $(RFLAGS) resource.rc $O/resource.o
endif
diff --git a/C/Alloc.c b/C/Alloc.c
index 1111111..2222222 100644
--- a/C/Alloc.c
+++ b/C/Alloc.c
@@ -6,7 +6,7 @@
#include <stdio.h>
#ifdef _WIN32
-#include <Windows.h>
+#include <windows.h>
#endif
#include <stdlib.h>
diff --git a/C/CpuArch.c b/C/CpuArch.c
index 1111111..2222222 100644
--- a/C/CpuArch.c
+++ b/C/CpuArch.c
@@ -217,7 +217,7 @@ BoolInt CPU_Is_InOrder()
}
#if !defined(MY_CPU_AMD64) && defined(_WIN32)
-#include <Windows.h>
+#include <windows.h>
static BoolInt CPU_Sys_Is_SSE_Supported()
{
OSVERSIONINFO vi;
@@ -275,7 +275,7 @@ BoolInt CPU_IsSupported_SHA()
// #include <stdio.h>
#ifdef _WIN32
-#include <Windows.h>
+#include <windows.h>
#endif
BoolInt CPU_IsSupported_AVX2()
@@ -351,7 +351,7 @@ BoolInt CPU_IsSupported_PageGB()
#ifdef _WIN32
-#include <Windows.h>
+#include <windows.h>
BoolInt CPU_IsSupported_CRC32() { return IsProcessorFeaturePresent(PF_ARM_V8_CRC32_INSTRUCTIONS_AVAILABLE) ? 1 : 0; }
BoolInt CPU_IsSupported_CRYPTO() { return IsProcessorFeaturePresent(PF_ARM_V8_CRYPTO_INSTRUCTIONS_AVAILABLE) ? 1 : 0; }
diff --git a/C/DllSecur.c b/C/DllSecur.c
index 1111111..2222222 100644
--- a/C/DllSecur.c
+++ b/C/DllSecur.c
@@ -5,7 +5,7 @@
#ifdef _WIN32
-#include <Windows.h>
+#include <windows.h>
#include "DllSecur.h"
diff --git a/C/Threads.h b/C/Threads.h
index 1111111..2222222 100644
--- a/C/Threads.h
+++ b/C/Threads.h
@@ -5,7 +5,7 @@
#define __7Z_THREADS_H
#ifdef _WIN32
-#include <Windows.h>
+#include <windows.h>
#else
#if defined(__linux__)
diff --git a/CPP/7zip/7zip_gcc.mak b/CPP/7zip/7zip_gcc.mak
index 1111111..2222222 100644
--- a/CPP/7zip/7zip_gcc.mak
+++ b/CPP/7zip/7zip_gcc.mak
@@ -113,8 +113,8 @@ MY_MKDIR=mkdir
DEL_OBJ_EXE = -$(RM) $(O)\*.o $(O)\$(PROG).exe $(O)\$(PROG).dll
endif
-LIB2_GUI = -lOle32 -lGdi32 -lComctl32 -lComdlg32 $(LIB_HTMLHELP)
-LIB2 = -loleaut32 -luuid -ladvapi32 -lUser32 $(LIB2_GUI)
+LIB2_GUI = -lole32 -lgdi32 -lcomctl32 -lcomdlg32 $(LIB_HTMLHELP)
+LIB2 = -loleaut32 -luuid -ladvapi32 -luser32 $(LIB2_GUI)
CXXFLAGS_EXTRA = -DUNICODE -D_UNICODE
# -Wno-delete-non-virtual-dtor
@@ -206,7 +206,7 @@ $(PROGPATH_STATIC): $(OBJS)
ifndef NO_DEFAULT_RES
$O/resource.o: resource.rc
- windres.exe $(RFLAGS) resource.rc $O/resource.o
+ $(WINDRES) $(RFLAGS) resource.rc $O/resource.o
endif
$O/LzmaAlone.o: LzmaAlone.cpp
diff --git a/CPP/7zip/Bundles/LzmaCon/makefile.gcc b/CPP/7zip/Bundles/LzmaCon/makefile.gcc
index 1111111..2222222 100644
--- a/CPP/7zip/Bundles/LzmaCon/makefile.gcc
+++ b/CPP/7zip/Bundles/LzmaCon/makefile.gcc
@@ -77,6 +77,7 @@ WIN_OBJS = \
$O/FileIO.o \
$O/PropVariant.o \
$O/System.o \
+ $O/Registry.o \
$O/SystemInfo.o \
COMPRESS_OBJS = \
diff --git a/CPP/7zip/Common/FileStreams.cpp b/CPP/7zip/Common/FileStreams.cpp
index 1111111..2222222 100644
--- a/CPP/7zip/Common/FileStreams.cpp
+++ b/CPP/7zip/Common/FileStreams.cpp
@@ -1,6 +1,7 @@
// FileStreams.cpp
#include "StdAfx.h"
+#include <stdio.h>
// #include <stdio.h>
diff --git a/CPP/7zip/MyVersionInfo.rc b/CPP/7zip/MyVersionInfo.rc
index 1111111..2222222 100644
--- a/CPP/7zip/MyVersionInfo.rc
+++ b/CPP/7zip/MyVersionInfo.rc
@@ -1,2 +1,2 @@
#include "MyVersion.h"
-#include "..\..\C\7zVersion.rc"
+#include "../../C/7zVersion.rc"
diff --git a/CPP/Common/MyInitGuid.h b/CPP/Common/MyInitGuid.h
index 1111111..2222222 100644
--- a/CPP/Common/MyInitGuid.h
+++ b/CPP/Common/MyInitGuid.h
@@ -29,7 +29,7 @@ Also we need IID_IUnknown that is initialized in some file for linking:
#include <basetyps.h>
#endif
-#include <InitGuid.h>
+#include <initguid.h>
#ifdef UNDER_CE
DEFINE_GUID(IID_IUnknown,
diff --git a/CPP/Common/MyString.h b/CPP/Common/MyString.h
index 1111111..2222222 100644
--- a/CPP/Common/MyString.h
+++ b/CPP/Common/MyString.h
@@ -4,6 +4,7 @@
#define __COMMON_MY_STRING_H
#include <string.h>
+#include <windows.h>
#ifndef _WIN32
#include <wctype.h>
diff --git a/CPP/Common/MyWindows.h b/CPP/Common/MyWindows.h
index 1111111..2222222 100644
--- a/CPP/Common/MyWindows.h
+++ b/CPP/Common/MyWindows.h
@@ -5,7 +5,7 @@
#ifdef _WIN32
-#include <Windows.h>
+#include <windows.h>
#ifdef UNDER_CE
#undef VARIANT_TRUE
diff --git a/CPP/Windows/FileIO.h b/CPP/Windows/FileIO.h
index 1111111..2222222 100644
--- a/CPP/Windows/FileIO.h
+++ b/CPP/Windows/FileIO.h
@@ -17,7 +17,7 @@
#ifdef _WIN32
#if defined(_WIN32) && !defined(UNDER_CE)
-#include <WinIoCtl.h>
+#include <winioctl.h>
#endif
#else