From bd879b4583b32e4d13e4b36bea0c20f530fbca0c Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Sun, 27 Mar 2022 15:20:58 -0700 Subject: [PATCH] gdiplus plugin: remove MS Visual Studio 8 patches These patches appear to have been working around some non-portable code in the headers shipped with Microsoft Visual Studio 8 (a.k.a. Microsoft Visual Studio 2005). This version of Visual Studio was EOLed on 2016-04-12. Neither the CMake nor MS Build build systems (the only CI environments for which compilation of this plugin is enabled) were using these patches. So apparently they have not been useful for a long time. --- plugin/gdiplus/GdiPlusEnums.h.patch | 15 ----------- plugin/gdiplus/GdiPlusHeaders.h.patch | 11 -------- plugin/gdiplus/GdiPlusImaging.h.patch | 11 -------- plugin/gdiplus/GdiPlusimageAttributes.h.patch | 13 ---------- plugin/gdiplus/Makefile.am | 25 +------------------ 5 files changed, 1 insertion(+), 74 deletions(-) delete mode 100644 plugin/gdiplus/GdiPlusEnums.h.patch delete mode 100644 plugin/gdiplus/GdiPlusHeaders.h.patch delete mode 100644 plugin/gdiplus/GdiPlusImaging.h.patch delete mode 100644 plugin/gdiplus/GdiPlusimageAttributes.h.patch diff --git a/plugin/gdiplus/GdiPlusEnums.h.patch b/plugin/gdiplus/GdiPlusEnums.h.patch deleted file mode 100644 index 602ca889b..000000000 --- a/plugin/gdiplus/GdiPlusEnums.h.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- /d/Program Files (x86)/Microsoft Visual Studio 8/VC/PlatformSDK/include/GdiPlusEnums.h Thu Apr 14 16:54:44 2005 -+++ ./GdiPlusEnums.h Mon Feb 25 17:19:13 2008 -@@ -531,11 +531,9 @@ - // We have to change the WMF record numbers so that they don't conflict with - // the EMF and EMF+ record numbers. - --enum EmfPlusRecordType; -- - #define GDIP_EMFPLUS_RECORD_BASE 0x00004000 - #define GDIP_WMF_RECORD_BASE 0x00010000 --#define GDIP_WMF_RECORD_TO_EMFPLUS(n) ((EmfPlusRecordType)((n) | GDIP_WMF_RECORD_BASE)) -+#define GDIP_WMF_RECORD_TO_EMFPLUS(n) ((n) | GDIP_WMF_RECORD_BASE) - #define GDIP_EMFPLUS_RECORD_TO_WMF(n) ((n) & (~GDIP_WMF_RECORD_BASE)) - #define GDIP_IS_WMF_RECORDTYPE(n) (((n) & GDIP_WMF_RECORD_BASE) != 0) - diff --git a/plugin/gdiplus/GdiPlusHeaders.h.patch b/plugin/gdiplus/GdiPlusHeaders.h.patch deleted file mode 100644 index 5af752022..000000000 --- a/plugin/gdiplus/GdiPlusHeaders.h.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- /d/Program Files (x86)/Microsoft Visual Studio 8/VC/PlatformSDK/include/GdiPlusHeaders.h Thu Apr 14 16:54:44 2005 -+++ ./GdiPlusHeaders.h Mon Feb 25 17:20:22 2008 -@@ -650,7 +650,7 @@ - - class CachedBitmap : public GdiplusBase - { -- friend Graphics; -+ friend class Graphics; - - public: - CachedBitmap(IN Bitmap *bitmap, diff --git a/plugin/gdiplus/GdiPlusImaging.h.patch b/plugin/gdiplus/GdiPlusImaging.h.patch deleted file mode 100644 index 73e6abe6f..000000000 --- a/plugin/gdiplus/GdiPlusImaging.h.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- /d/Program Files (x86)/Microsoft Visual Studio 8/VC/PlatformSDK/include/GdiPlusImaging.h Thu Apr 14 16:54:44 2005 -+++ ./GdiPlusImaging.h Mon Feb 25 17:23:08 2008 -@@ -153,7 +153,7 @@ - UINT Width; - UINT Height; - INT Stride; -- PixelFormat PixelFormat; -+ Gdiplus::PixelFormat PixelFormat; - VOID* Scan0; - UINT_PTR Reserved; - }; diff --git a/plugin/gdiplus/GdiPlusimageAttributes.h.patch b/plugin/gdiplus/GdiPlusimageAttributes.h.patch deleted file mode 100644 index 46d3eb461..000000000 --- a/plugin/gdiplus/GdiPlusimageAttributes.h.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- /d/Program Files (x86)/Microsoft Visual Studio 8/VC/PlatformSDK/include/GdiPlusimageAttributes.h Thu Apr 14 16:54:44 2005 -+++ ./GdiPlusimageAttributes.h Mon Feb 25 17:21:58 2008 -@@ -231,8 +231,8 @@ - nativeImageAttr, - type, - FALSE, -- NULL, -- NULL)); -+ (ARGB)0, -+ (ARGB)0)); - } - - Status SetOutputChannel( diff --git a/plugin/gdiplus/Makefile.am b/plugin/gdiplus/Makefile.am index 8a9794553..754c2eaa3 100644 --- a/plugin/gdiplus/Makefile.am +++ b/plugin/gdiplus/Makefile.am @@ -9,8 +9,6 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/lib/cdt if WITH_GDIPLUS -PATCHES = GdiPlusEnums.h.patch GdiPlusHeaders.h.patch GdiPlusimageAttributes.h.patch GdiPlusImaging.h.patch -PATCHED_HEADS = $(PATCHES:.h.patch=.h) noinst_LTLIBRARIES = libgvplugin_gdiplus_C.la if WITH_WIN32 @@ -45,25 +43,4 @@ if WITH_DARWIN9 libgvplugin_gdiplus_la_LDFLAGS += -Wl,-exported_symbol,_gvplugin_gdiplus_LTX_library endif -# object code is dependent on all the local GDI+ headers - -gvdevice_gdiplus.lo : $(GDIPLUS_HEADS) - -gvloadimage_gdiplus.lo : $(GDIPLUS_HEADS) - -gvrender_gdiplus.lo : $(GDIPLUS_HEADS) - -if WITH_GDIPLUS -# patched GDI+ headers are dependent on the patches -$(PATCHED_HEADS) : %.h : %.h.patch - -# all the local GDI+ headers are dependent on the originals in PlatformSDK -# if the GDI+ header needs to be patched, patch it, else just copy it over -$(GDIPLUS_HEADS) : %.h : $(PLATFORMSDKINCLUDE_ESCAPED)/%.h - if expr "$(PATCHED_HEADS)" : '.*$*.h' >/dev/null 2>&1; \ - then patch -o $*.h "$(PLATFORMSDKINCLUDE)\$*.h" $*.h.patch; \ - else cp "$(PLATFORMSDKINCLUDE)\$*.h" $*.h; \ - fi -endif - -EXTRA_DIST = $(PATCHES) gvplugin_gdiplus.vcxproj* +EXTRA_DIST = gvplugin_gdiplus.vcxproj* -- 2.40.0