nixpkgs/pkgs/tools/archivers/7zz/fix-cross-mingw-build.patch
2023-08-22 21:19:21 -04:00

155 lines
3.5 KiB
Diff

--- a/C/7zVersion.rc
+++ b/C/7zVersion.rc
@@ -5,7 +5,7 @@
#define MY_VFT_APP 0x00000001L
#define MY_VFT_DLL 0x00000002L
-// #include <WinVer.h>
+// #include <winver.h>
#ifndef MY_VERSION
#include "7zVersion.h"
--- a/C/7zip_gcc_c.mak
+++ b/C/7zip_gcc_c.mak
@@ -106,7 +106,7 @@
endif
-LIB2 = -lOle32 -loleaut32 -luuid -ladvapi32 -lUser32 -lShell32
+LIB2 = -lole32 -loleaut32 -luuid -ladvapi32 -luser32 -lshell32
CFLAGS_EXTRA = -DUNICODE -D_UNICODE
# -Wno-delete-non-virtual-dtor
--- a/CPP/7zip/7zip_gcc.mak
+++ b/CPP/7zip/7zip_gcc.mak
@@ -124,8 +124,8 @@
DEL_OBJ_EXE = -$(RM) $(O)\*.o $(O)\$(PROG).exe $(O)\$(PROG).dll
endif
-LIB2_GUI = -lOle32 -lGdi32 -lComctl32 -lComdlg32 -lShell32 $(LIB_HTMLHELP)
-LIB2 = -loleaut32 -luuid -ladvapi32 -lUser32 $(LIB2_GUI)
+LIB2_GUI = -lole32 -lgdi32 -lcomctl32 -lcomdlg32 -lshell32 $(LIB_HTMLHELP)
+LIB2 = -loleaut32 -luuid -ladvapi32 -luser32 $(LIB2_GUI)
CXXFLAGS_EXTRA = -DUNICODE -D_UNICODE
# -Wno-delete-non-virtual-dtor
--- a/C/Util/7zipInstall/resource.rc
+++ b/C/Util/7zipInstall/resource.rc
@@ -1,6 +1,6 @@
#include <winnt.h>
#include <WinUser.h>
-#include <CommCtrl.h>
+#include <commctrl.h>
#define USE_COPYRIGHT_CR
#include "../../7zVersion.rc"
--- a/C/Util/7zipUninstall/resource.rc
+++ b/C/Util/7zipUninstall/resource.rc
@@ -1,6 +1,6 @@
#include <winnt.h>
#include <WinUser.h>
-#include <CommCtrl.h>
+#include <commctrl.h>
#define USE_COPYRIGHT_CR
#include "../../7zVersion.rc"
--- a/CPP/7zip/Crypto/RandGen.cpp
+++ b/CPP/7zip/Crypto/RandGen.cpp
@@ -19,7 +19,7 @@
#ifdef USE_STATIC_RtlGenRandom
-// #include <NTSecAPI.h>
+// #include <ntsecapi.h>
EXTERN_C_BEGIN
#ifndef RtlGenRandom
--- a/CPP/7zip/GuiCommon.rc
+++ b/CPP/7zip/GuiCommon.rc
@@ -4,7 +4,7 @@
// #include <WinUser.h>
// for Windows CE:
-#include <CommCtrl.h>
+#include <commctrl.h>
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
--- a/CPP/7zip/UI/FileManager/PanelItemOpen.cpp
+++ b/CPP/7zip/UI/FileManager/PanelItemOpen.cpp
@@ -4,7 +4,7 @@
#include "../../../Common/MyWindows.h"
-#include <TlHelp32.h>
+#include <tlhelp32.h>
#include "../../../Common/IntToString.h"
--- a/CPP/7zip/UI/FileManager/SysIconUtils.h
+++ b/CPP/7zip/UI/FileManager/SysIconUtils.h
@@ -5,7 +5,7 @@
#include "../../../Common/MyWindows.h"
-#include <CommCtrl.h>
+#include <commctrl.h>
#include "../../../Common/MyString.h"
--- a/CPP/Windows/Control/ComboBox.h
+++ b/CPP/Windows/Control/ComboBox.h
@@ -5,7 +5,7 @@
#include "../../Common/MyWindows.h"
-#include <CommCtrl.h>
+#include <commctrl.h>
#include "../Window.h"
--- a/CPP/Windows/Control/ImageList.h
+++ b/CPP/Windows/Control/ImageList.h
@@ -3,7 +3,7 @@
#ifndef __WINDOWS_CONTROL_IMAGE_LIST_H
#define __WINDOWS_CONTROL_IMAGE_LIST_H
-#include <CommCtrl.h>
+#include <commctrl.h>
#include "../Defs.h"
--- a/CPP/Windows/Control/ListView.h
+++ b/CPP/Windows/Control/ListView.h
@@ -5,7 +5,7 @@
#include "../../Common/MyWindows.h"
-#include <CommCtrl.h>
+#include <commctrl.h>
#include "../Window.h"
--- a/CPP/Windows/Control/ProgressBar.h
+++ b/CPP/Windows/Control/ProgressBar.h
@@ -5,7 +5,7 @@
#include "../../Common/MyWindows.h"
-#include <CommCtrl.h>
+#include <commctrl.h>
#include "../Window.h"
--- a/CPP/Windows/SecurityUtils.h
+++ b/CPP/Windows/SecurityUtils.h
@@ -3,7 +3,7 @@
#ifndef __WINDOWS_SECURITY_UTILS_H
#define __WINDOWS_SECURITY_UTILS_H
-#include <NTSecAPI.h>
+#include <ntsecapi.h>
#include "Defs.h"