summarylogtreecommitdiffstats
path: root/mingw.patch
blob: c7b5a7c9c4e106f70b5b9e1c05335b5a3ad2d4a2 (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
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
210
211
212
213
diff -ruN AviSynthPlus-3.6.1/avs_core/CMakeLists.txt patched/avs_core/CMakeLists.txt
--- AviSynthPlus-3.6.1/avs_core/CMakeLists.txt	2020-06-20 01:37:04.000000000 +0200
+++ patched/avs_core/CMakeLists.txt	2020-07-17 21:53:08.176666698 +0200
@@ -99,7 +99,7 @@
 
 # Windows DLL dependencies
 if (MSVC OR MINGW)
-  target_link_libraries("AvsCore" "uuid" "winmm" "vfw32" "msacm32" "gdi32" "user32" "advapi32" "ole32" "imagehlp")
+  target_link_libraries("AvsCore" "uuid" "winmm" "vfw32" "msacm32" "gdi32" "user32" "advapi32" "ole32" "imagehlp" "ssp")
 else()
   target_link_libraries("AvsCore" "pthread" "dl" "${FSLIB}")
 endif()
diff -ruN AviSynthPlus-3.6.1/avs_core/core/info.h patched/avs_core/core/info.h
--- AviSynthPlus-3.6.1/avs_core/core/info.h	2020-06-20 01:37:04.000000000 +0200
+++ patched/avs_core/core/info.h	2020-07-17 21:32:55.526666695 +0200
@@ -31,6 +31,7 @@
 #include <array>
 #include <iomanip>
 #include <vector>
+#include <cstring>
 
 class BitmapFont {
 
diff -ruN AviSynthPlus-3.6.1/avs_core/core/internal.h patched/avs_core/core/internal.h
--- AviSynthPlus-3.6.1/avs_core/core/internal.h	2020-06-20 01:37:04.000000000 +0200
+++ patched/avs_core/core/internal.h	2020-07-17 21:32:55.526666695 +0200
@@ -47,7 +47,7 @@
 #include <limits.h>
 #endif
 #include "InternalEnvironment.h"
-#ifdef INTEL_INTRINSICS
+#if defined(INTEL_INTRINSICS) && !defined(__MINGW32__)
 #ifdef AVS_WINDOWS
 #include <intrin.h>
 #else
diff -ruN AviSynthPlus-3.6.1/avs_core/filters/AviSource/avi_source.cpp patched/avs_core/filters/AviSource/avi_source.cpp
--- AviSynthPlus-3.6.1/avs_core/filters/AviSource/avi_source.cpp	2020-06-20 01:37:04.000000000 +0200
+++ patched/avs_core/filters/AviSource/avi_source.cpp	2020-07-17 21:32:55.530000028 +0200
@@ -259,7 +259,7 @@
     return result;
 }
 
-#ifndef MSVC
+#if !defined(MSVC) && !defined(__MINGW32__)
 static __inline LRESULT
 ICDecompressEx(HIC hic,DWORD dwFlags,LPBITMAPINFOHEADER lpbiSrc,LPVOID lpSrc,INT xSrc,INT ySrc,INT dxSrc,INT dySrc,LPBITMAPINFOHEADER lpbiDst,LPVOID lpDst,INT xDst,INT yDst,INT dxDst,INT dyDst)
 {
diff -ruN AviSynthPlus-3.6.1/avs_core/include/avisynth.h patched/avs_core/include/avisynth.h
--- AviSynthPlus-3.6.1/avs_core/include/avisynth.h	2020-06-20 01:37:04.000000000 +0200
+++ patched/avs_core/include/avisynth.h	2020-07-17 21:32:55.530000028 +0200
@@ -1620,7 +1620,7 @@
 {
 public:
 
-  virtual ~IJobCompletion() {}
+  virtual __stdcall ~IJobCompletion() {}
   virtual void __stdcall Wait() = 0;
   virtual AVSValue __stdcall Get(size_t i) = 0;
   virtual size_t __stdcall Size() const = 0;
diff -ruN AviSynthPlus-3.6.1/plugins/ImageSeq/CMakeLists.txt patched/plugins/ImageSeq/CMakeLists.txt
--- AviSynthPlus-3.6.1/plugins/ImageSeq/CMakeLists.txt	2020-06-20 01:37:04.000000000 +0200
+++ patched/plugins/ImageSeq/CMakeLists.txt	2020-07-17 21:59:10.696666696 +0200
@@ -28,14 +28,14 @@
   # Specify include directories
   target_include_directories(${ProjectName} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/lib/DevIL_x86 ${AvsCore_SOURCE_DIR})
   # Windows DLL dependencies
-  target_link_libraries(${ProjectName} "${CMAKE_CURRENT_SOURCE_DIR}/lib/DevIL_x86/DevIL.lib")
+  target_link_libraries(${ProjectName} "${CMAKE_CURRENT_SOURCE_DIR}/lib/DevIL_x86/DevIL.lib" "ssp")
   # Copy binary dependencies to a common folder for easy deployment
   configure_file("${PROJECT_SOURCE_DIR}/lib/DevIL_x86/DevIL.dll" "${CMAKE_BINARY_DIR}/Output/system/DevIL.dll" COPYONLY)
 else()   # 64-bit
   # Specify include directories
   target_include_directories(${ProjectName} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/lib/DevIL_x64 ${AvsCore_SOURCE_DIR})
   # Windows DLL dependencies
-  target_link_libraries(${ProjectName} "${CMAKE_CURRENT_SOURCE_DIR}/lib/DevIL_x64/DevIL.lib")
+  target_link_libraries(${ProjectName} "${CMAKE_CURRENT_SOURCE_DIR}/lib/DevIL_x64/DevIL.lib" "ssp")
   # Copy binary dependencies to a common folder for easy deployment
   configure_file("${PROJECT_SOURCE_DIR}/lib/DevIL_x64/DevIL.dll" "${CMAKE_BINARY_DIR}/Output/system/DevIL.dll" COPYONLY)
 endif()
diff -ruN AviSynthPlus-3.6.1/plugins/Shibatch/PFC/chainlist.h patched/plugins/Shibatch/PFC/chainlist.h
--- AviSynthPlus-3.6.1/plugins/Shibatch/PFC/chainlist.h	2020-06-20 01:37:04.000000000 +0200
+++ patched/plugins/Shibatch/PFC/chainlist.h	2020-07-17 21:32:55.530000028 +0200
@@ -157,4 +157,4 @@
 };
 
 
-#endif _PFC_CHAINLIST_H_
\ No newline at end of file
+#endif // _PFC_CHAINLIST_H_
diff -ruN AviSynthPlus-3.6.1/plugins/Shibatch/PFC/other.h patched/plugins/Shibatch/PFC/other.h
--- AviSynthPlus-3.6.1/plugins/Shibatch/PFC/other.h	2020-06-20 01:37:04.000000000 +0200
+++ patched/plugins/Shibatch/PFC/other.h	2020-07-17 22:16:40.930000023 +0200
@@ -88,4 +88,4 @@
 	fpu_control_default() : fpu_control(_MCW_DN|_MCW_RC,_DN_FLUSH|_RC_NEAR) {}
 };
 
-#endif
\ No newline at end of file
+#endif
diff -ruN AviSynthPlus-3.6.1/plugins/Shibatch/PFC/pfc.h patched/plugins/Shibatch/PFC/pfc.h
--- AviSynthPlus-3.6.1/plugins/Shibatch/PFC/pfc.h	2020-06-20 01:37:04.000000000 +0200
+++ patched/plugins/Shibatch/PFC/pfc.h	2020-07-17 22:17:12.656666677 +0200
@@ -8,6 +8,10 @@
 #include <windows.h>
 #endif
 
+#ifdef __MINGW32__
+#include <minwindef.h>
+#endif
+
 #define PFC_ALLOCA_LIMIT (4096)
 
 #define INDEX_INVALID ((unsigned)(-1))
@@ -20,7 +24,11 @@
 #include <assert.h>
 
 #include <math.h>
+#ifdef __STRICT_ANSI__
+#undef __STRICT_ANSI__
 #include <float.h>
+#define __STRICT_ANSI__
+#endif
 
 #ifdef _MSC_VER
 
@@ -56,4 +64,4 @@
 #include "byte_order_helper.h"
 #include "other.h"
 #include "chainlist.h"
-#endif //___PFC_H___
\ No newline at end of file
+#endif //___PFC_H___
diff -ruN AviSynthPlus-3.6.1/plugins/Shibatch/PFC/profiler.h patched/plugins/Shibatch/PFC/profiler.h
--- AviSynthPlus-3.6.1/plugins/Shibatch/PFC/profiler.h	2020-06-20 01:37:04.000000000 +0200
+++ patched/plugins/Shibatch/PFC/profiler.h	2020-07-17 21:32:55.530000028 +0200
@@ -1,6 +1,8 @@
 #ifndef _PFC_PROFILER_H_
 #define _PFC_PROFILER_H_
 
+#include <debugapi.h>
+
 class profiler_static
 {
 private:
@@ -54,4 +56,4 @@
 
 
 
-#endif
\ No newline at end of file
+#endif
diff -ruN AviSynthPlus-3.6.1/plugins/Shibatch/PFC/ptr_list.h patched/plugins/Shibatch/PFC/ptr_list.h
--- AviSynthPlus-3.6.1/plugins/Shibatch/PFC/ptr_list.h	2020-06-20 01:37:04.000000000 +0200
+++ patched/plugins/Shibatch/PFC/ptr_list.h	2020-07-17 22:22:51.496666689 +0200
@@ -127,20 +127,20 @@
 
 	inline void delete_mask(const bool * mask) {delete_mask(bit_array_table(mask,get_count()));}
 
-	inline void sort(int (__cdecl *compare )(const T ** elem1, const T** elem2 ) )
+	/*inline void sort(int (__cdecl *compare )(const T ** elem1, const T** elem2 ) )
 	{
 		ptr_list::sort((int (__cdecl *)(const void ** elem1, const void ** elem2 )) compare);
-	}
+	}*/
 
 	inline bool bsearch(int (__cdecl *compare )(T* elem1, T* elem2 ),T* item,int * index) const
 	{
 		return ptr_list::bsearch((int (__cdecl *)(void* elem1, void* elem2 ))compare,void_cast(item),index);
 	}
 
-	inline bool bsearch_ref(int (__cdecl *compare )(T* &elem1, T* &elem2 ),T* &item,int * index) const
+	/*inline bool bsearch_ref(int (__cdecl *compare )(T* &elem1, T* &elem2 ),T* &item,int * index) const
 	{
 		return ptr_list::bsearch_ref((int (__cdecl *)(void* &elem1, void* &elem2 ))compare,*(const void**)&item,index);
-	}
+	}*/
 
 	inline bool bsearch_range(int (__cdecl *compare )(T* elem1, T* elem2 ),T* item,int * index,int * count) const
 	{
@@ -202,4 +202,4 @@
 	~ptr_list_autofree_t() {free_all();}
 };
 
-#endif //__PFC_PTR_LIST_H_
\ No newline at end of file
+#endif //__PFC_PTR_LIST_H_
diff -ruN AviSynthPlus-3.6.1/plugins/Shibatch/PFC/utf8.cpp patched/plugins/Shibatch/PFC/utf8.cpp
--- AviSynthPlus-3.6.1/plugins/Shibatch/PFC/utf8.cpp	2020-06-20 01:37:04.000000000 +0200
+++ patched/plugins/Shibatch/PFC/utf8.cpp	2020-07-17 22:36:59.546666689 +0200
@@ -2,6 +2,7 @@
 
 #include <locale.h>
 
+#include <winnls.h>
 //utf8 stuff
 
 #ifndef BYTE
diff -ruN AviSynthPlus-3.6.1/plugins/Shibatch/supereq.h patched/plugins/Shibatch/supereq.h
--- AviSynthPlus-3.6.1/plugins/Shibatch/supereq.h	2020-06-20 01:37:04.000000000 +0200
+++ patched/plugins/Shibatch/supereq.h	2020-07-17 22:39:54.570000027 +0200
@@ -39,8 +39,11 @@
 AVSValue __cdecl Create_SuperEq(AVSValue args, void*, IScriptEnvironment* env);
 AVSValue __cdecl Create_SuperEqCustom(AVSValue args, void*, IScriptEnvironment* env);
 
-
+#ifdef MSVC
 class _declspec(novtable) supereq_base
+#else
+class supereq_base
+#endif
 {
 public:
 	virtual void equ_makeTable(double *bc,class paramlist *param,double fs);