Fix build with newer mingw versions
authorAndre Heinecke <aheinecke@intevation.de>
Mon, 4 Aug 2014 20:18:41 +0000 (22:18 +0200)
committerAndre Heinecke <aheinecke@intevation.de>
Mon, 4 Aug 2014 20:18:41 +0000 (22:18 +0200)
    This adds an upstream fix to the gnulibs of libtasn
    and gnutls

    * patches/gnutls-2.12.23/gnulib-mingw-w64-fix.patch,
      patches/libtasn1-2.14/gnulib-mingw-w64-fix.patch: New.

patches/gnutls-2.12.23/gnulib-mingw-w64-fix.patch [new file with mode: 0755]
patches/libtasn1-2.14/gnulib-mingw-w64-fix.patch [new file with mode: 0755]

diff --git a/patches/gnutls-2.12.23/gnulib-mingw-w64-fix.patch b/patches/gnutls-2.12.23/gnulib-mingw-w64-fix.patch
new file mode 100755 (executable)
index 0000000..5a6b520
--- /dev/null
@@ -0,0 +1,71 @@
+#! /bin/sh
+patch -p1 -l -f $* < $0
+exit $?
+
+2014-08-04  Andre Heinecke  <aheinecke@intevation.de>
+
+    Apply gnulib commit 8672534
+    * gl/msvc-inval.c: Use __cdecl instead of cdecl
+    * lib/gl/msvc-inval.c: Wtf, they have it twice o.O
+
+
+diff -ru a/gl/msvc-inval.c b/gl/msvc-inval.c
+--- a/gl/msvc-inval.c  2014-08-04 20:41:03.938286457 +0200
++++ b/gl/msvc-inval.c  2014-08-04 20:41:40.138286520 +0200
+@@ -28,7 +28,7 @@
+
+ # if MSVC_INVALID_PARAMETER_HANDLING == DEFAULT_HANDLING
+
+-static void cdecl
++static void __cdecl
+ gl_msvc_invalid_parameter_handler (const wchar_t *expression,
+                                    const wchar_t *function,
+                                    const wchar_t *file,
+@@ -45,7 +45,7 @@
+
+ #  if defined _MSC_VER
+
+-static void cdecl
++static void __cdecl
+ gl_msvc_invalid_parameter_handler (const wchar_t *expression,
+                                    const wchar_t *function,
+                                    const wchar_t *file,
+@@ -94,7 +94,7 @@
+     }
+ }
+
+-static void cdecl
++static void __cdecl
+ gl_msvc_invalid_parameter_handler (const wchar_t *expression,
+                                    const wchar_t *function,
+                                    const wchar_t *file,
+diff -ru a/lib/gl/msvc-inval.c b/lib/gl/msvc-inval.c
+--- a/lib/gl/msvc-inval.c      2014-08-04 20:41:03.938286457 +0200
++++ b/lib/gl/msvc-inval.c      2014-08-04 20:41:40.138286520 +0200
+@@ -28,7 +28,7 @@
+
+ # if MSVC_INVALID_PARAMETER_HANDLING == DEFAULT_HANDLING
+
+-static void cdecl
++static void __cdecl
+ gl_msvc_invalid_parameter_handler (const wchar_t *expression,
+                                    const wchar_t *function,
+                                    const wchar_t *file,
+@@ -45,7 +45,7 @@
+
+ #  if defined _MSC_VER
+
+-static void cdecl
++static void __cdecl
+ gl_msvc_invalid_parameter_handler (const wchar_t *expression,
+                                    const wchar_t *function,
+                                    const wchar_t *file,
+@@ -94,7 +94,7 @@
+     }
+ }
+
+-static void cdecl
++static void __cdecl
+ gl_msvc_invalid_parameter_handler (const wchar_t *expression,
+                                    const wchar_t *function,
+                                    const wchar_t *file,
diff --git a/patches/libtasn1-2.14/gnulib-mingw-w64-fix.patch b/patches/libtasn1-2.14/gnulib-mingw-w64-fix.patch
new file mode 100755 (executable)
index 0000000..825ea74
--- /dev/null
@@ -0,0 +1,40 @@
+#! /bin/sh
+patch -p1 -l -f $* < $0
+exit $?
+
+2014-08-04  Andre Heinecke  <aheinecke@intevation.de>
+
+    Apply gnulib commit 8672534
+    * gl/msvc-inval.c: Use __cdecl instead of cdecl
+
+
+diff -ru libtasn1-2.14.orig/gl/msvc-inval.c libtasn1-2.14/gl/msvc-inval.c
+--- libtasn1-2.14.orig/gl/msvc-inval.c 2014-08-04 20:41:03.938286457 +0200
++++ libtasn1-2.14/gl/msvc-inval.c      2014-08-04 20:41:40.138286520 +0200
+@@ -28,7 +28,7 @@
+
+ # if MSVC_INVALID_PARAMETER_HANDLING == DEFAULT_HANDLING
+
+-static void cdecl
++static void __cdecl
+ gl_msvc_invalid_parameter_handler (const wchar_t *expression,
+                                    const wchar_t *function,
+                                    const wchar_t *file,
+@@ -45,7 +45,7 @@
+
+ #  if defined _MSC_VER
+
+-static void cdecl
++static void __cdecl
+ gl_msvc_invalid_parameter_handler (const wchar_t *expression,
+                                    const wchar_t *function,
+                                    const wchar_t *file,
+@@ -94,7 +94,7 @@
+     }
+ }
+
+-static void cdecl
++static void __cdecl
+ gl_msvc_invalid_parameter_handler (const wchar_t *expression,
+                                    const wchar_t *function,
+                                    const wchar_t *file,