summarylogtreecommitdiffstats
path: root/mingw.patch
blob: 22483cb1f1c51318aeb3104b6a5c7ba11f9095d0 (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
diff -ruN AviSynthPlus-3.7.4/avs_core/CMakeLists.txt patched/avs_core/CMakeLists.txt
--- AviSynthPlus-3.7.4/avs_core/CMakeLists.txt	2025-03-24 02:26:29.000000000 +0100
+++ patched/avs_core/CMakeLists.txt	2025-03-26 16:51:50.663811550 +0100
@@ -111,7 +111,7 @@
 elseif(CMAKE_SYSTEM_NAME STREQUAL "OpenBSD")
     set(SYSLIB "pthread")
 elseif(MSVC OR MINGW)
-    set(SYSLIB "uuid" "winmm" "vfw32" "msacm32" "gdi32" "user32" "advapi32" "ole32" "imagehlp")
+    set(SYSLIB "uuid" "winmm" "vfw32" "msacm32" "gdi32" "user32" "advapi32" "ole32" "imagehlp" "ssp")
 else()
     set(SYSLIB "pthread" "dl" "m")
 endif()
diff -ruN AviSynthPlus-3.7.4/avs_core/core/BufferPool.h patched/avs_core/core/BufferPool.h
--- AviSynthPlus-3.7.4/avs_core/core/BufferPool.h	2025-03-24 02:26:29.000000000 +0100
+++ patched/avs_core/core/BufferPool.h	2025-03-26 16:51:50.664516048 +0100
@@ -11,12 +11,12 @@
 private:
 
   struct BufferDesc;
-  typedef std::multimap<size_t, BufferDesc*> MapType;
+  typedef std::multimap<std::size_t, BufferDesc*> MapType;
 
   InternalEnvironment* Env;
   MapType Map;
 
-  void* PrivateAlloc(size_t nBytes, size_t alignment, void* user);
+  void* PrivateAlloc(std::size_t nBytes, std::size_t alignment, void* user);
   void PrivateFree(void* buffer);
 
 public:
@@ -24,7 +24,7 @@
   BufferPool(InternalEnvironment* env);
   ~BufferPool();
 
-  void* Allocate(size_t nBytes, size_t alignment, bool pool);
+  void* Allocate(std::size_t nBytes, std::size_t alignment, bool pool);
   void Free(void* ptr);
 
 };
diff -ruN AviSynthPlus-3.7.4/avs_core/core/internal.h patched/avs_core/core/internal.h
--- AviSynthPlus-3.7.4/avs_core/core/internal.h	2025-03-24 02:26:29.000000000 +0100
+++ patched/avs_core/core/internal.h	2025-03-26 16:51:50.665178233 +0100
@@ -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.7.4/avs_core/core/ThreadPool.h patched/avs_core/core/ThreadPool.h
--- AviSynthPlus-3.7.4/avs_core/core/ThreadPool.h	2025-03-24 02:26:29.000000000 +0100
+++ patched/avs_core/core/ThreadPool.h	2025-03-26 16:51:50.665748865 +0100
@@ -42,7 +42,7 @@
     return ret;
   }
 
-  virtual ~JobCompletion()
+  virtual __stdcall ~JobCompletion()
   {
     Wait();
     delete [] pairs;
diff -ruN AviSynthPlus-3.7.4/avs_core/include/avisynth.h patched/avs_core/include/avisynth.h
--- AviSynthPlus-3.7.4/avs_core/include/avisynth.h	2025-03-24 02:26:29.000000000 +0100
+++ patched/avs_core/include/avisynth.h	2025-03-26 16:51:50.667680787 +0100
@@ -1731,7 +1731,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.7.4/plugins/ImageSeq/CMakeLists.txt patched/plugins/ImageSeq/CMakeLists.txt
--- AviSynthPlus-3.7.4/plugins/ImageSeq/CMakeLists.txt	2025-03-24 02:26:29.000000000 +0100
+++ patched/plugins/ImageSeq/CMakeLists.txt	2025-03-26 16:54:10.725790671 +0100
@@ -53,10 +53,10 @@
   #                  way the DevIL developers release it.
 if(DevIL_FOUND)
     message("Found DevIL library: ${IL_LIBRARIES}") 
-    target_link_libraries(${ProjectName} "${IL_LIBRARIES}" "${FSLIB}")
+    target_link_libraries(${ProjectName} "${IL_LIBRARIES}" "${FSLIB}" "ssp")
     target_include_directories(${ProjectName} PRIVATE "${IL_INCLUDE_DIR}" ${AvsCore_SOURCE_DIR})
 else()
-    target_link_libraries(${ProjectName} "${FSLIB}")
+    target_link_libraries(${ProjectName} "${FSLIB}" "ssp")
 endif()
 
 if (MSVC_IDE)
diff -ruN AviSynthPlus-3.7.4/plugins/VDubFilter/CMakeLists.txt patched/plugins/VDubFilter/CMakeLists.txt
--- AviSynthPlus-3.7.4/plugins/VDubFilter/CMakeLists.txt	2025-03-24 02:26:29.000000000 +0100
+++ patched/plugins/VDubFilter/CMakeLists.txt	2025-03-26 16:51:50.669825796 +0100
@@ -22,7 +22,7 @@
 endif()
 
 # Library dependencies
-target_link_libraries(${ProjectName} "user32")
+target_link_libraries(${ProjectName} "user32" "ssp")
 
 # Include directories
 target_include_directories(${ProjectName} PRIVATE ${AvsCore_SOURCE_DIR})