]> git.pld-linux.org Git - packages/crossmingw32-glib2.git/blobdiff - glib2-win32.patch
- updated to 2.60.1
[packages/crossmingw32-glib2.git] / glib2-win32.patch
index a82281854169b50f857dbc8e83fe6aa5bd349dc0..fa6dae5237859975ab8eef957fe3038eacf2cea8 100644 (file)
---- glib-2.32.4/gio/gcontenttype.c.orig        2012-07-14 22:33:18.000000000 +0200
-+++ glib-2.32.4/gio/gcontenttype.c     2012-07-24 16:48:52.400116342 +0200
-@@ -332,7 +332,7 @@
-   /* our test suite and potentially other code used -1 in the past, which is
-    * not documented and not allowed; guard against that */
--  g_return_val_if_fail (data_size != (gsize) -1, g_strdup (XDG_MIME_TYPE_UNKNOWN));
-+  g_return_val_if_fail (data_size != (gsize) -1, g_strdup ("*"));
-   if (filename)
-     {
---- glib-2.34.0/gio/gregistrysettingsbackend.c.orig    2012-08-19 16:39:53.000000000 +0200
-+++ glib-2.34.0/gio/gregistrysettingsbackend.c 2012-09-26 17:54:44.204962755 +0200
-@@ -233,7 +233,7 @@
-   if (result_code == ERROR_KEY_DELETED)
-     trace ("(%s)", win32_message);
-   else
--    g_message (win32_message);
-+    g_message ("%s", win32_message);
- };
+--- glib-2.44.0/gio/gwin32networking.h.orig    2015-03-20 18:33:38.000000000 +0100
++++ glib-2.44.0/gio/gwin32networking.h 2015-03-23 21:03:15.924279829 +0100
+@@ -24,8 +24,9 @@
+ /* Check if more ANSI-compliant Winsock2 functions are provided */
+ /* For run-time compatibility with Windows XP, remove when XP support dropped */
  
+-typedef INT (WSAAPI *PFN_InetPton) (INT, PCTSTR, PVOID);
+-typedef PCTSTR (WSAAPI *PFN_InetNtop) (INT, PVOID, PTSTR, size_t);
++typedef ULONG NET_IFINDEX;
++typedef INT (WSAAPI *PFN_InetPton) (INT, LPCTSTR, PVOID);
++typedef LPCTSTR (WSAAPI *PFN_InetNtop) (INT, PVOID, PTSTR, size_t);
+ typedef NET_IFINDEX (WINAPI *PFN_IfNameToIndex) (PCSTR);
  
+ typedef struct _GWin32WinsockFuncs
+--- glib-2.58.0/gio/gwin32appinfo.c.orig       2018-08-30 19:12:08.000000000 +0200
++++ glib-2.58.0/gio/gwin32appinfo.c    2018-09-18 20:29:20.206457756 +0200
+@@ -22,6 +22,7 @@
+ #include "config.h"
++#include <wctype.h>
+ #include <string.h>
+ #include "gcontenttype.h"
+--- glib-2.46.0/gio/gwin32registrykey.c.orig   2015-09-21 12:44:58.000000000 +0200
++++ glib-2.46.0/gio/gwin32registrykey.c        2015-09-22 18:50:25.926459740 +0200
+@@ -25,10 +25,15 @@
+ #pragma warning ( disable:4005 )
+ #endif
+ #include <windows.h>
++#ifdef __MINGW32__
++#include <ddk/ntstatus.h>
++#include <ddk/ntddk.h>
++#else
+ #include <ntstatus.h>
+ #include <winternl.h>
++#endif
+-#ifndef _WDMDDK_
++#if !defined(_WDMDDK_) && !defined(_DDK_WINDDK_H)
+ typedef enum _KEY_INFORMATION_CLASS {
+   KeyBasicInformation,
+   KeyNodeInformation,
+--- glib-2.60.0/glib/gstdio.c.orig     2019-03-04 21:06:14.000000000 +0100
++++ glib-2.60.0/glib/gstdio.c  2019-03-17 08:35:17.205976417 +0100
+@@ -37,6 +37,11 @@
+ #include <io.h>
+ #include <sys/utime.h>
+ #include <stdlib.h> /* for MB_CUR_MAX */
++#include <ctype.h>
++#include <malloc.h>
++#ifdef __MINGW32__
++#include <winioctl.h>
++#endif
+ #else
+ #include <utime.h>
+ #include <errno.h>
+@@ -55,6 +60,7 @@
+ #endif
+ #if defined (G_OS_WIN32)
++#  if !defined(__MINGW32__)
+ /* We can't include Windows DDK and Windows SDK simultaneously,
+  * so let's copy this here from MinGW-w64 DDK.
+@@ -91,6 +97,7 @@
+     } GenericReparseBuffer;
+   };
+ } REPARSE_DATA_BUFFER, *PREPARSE_DATA_BUFFER;
++#  endif
+ static int
+ w32_error_to_errno (DWORD error_code)
+@@ -145,7 +152,7 @@
+   return (result - filetime_unix_epoch_offset) / hundreds_of_usec_per_sec;
+ }
+-#  ifdef _MSC_VER
++#  if defined(_MSC_VER) || defined(__MINGW32__)
+ #    ifndef S_IXUSR
+ #      define _S_IRUSR _S_IREAD
+ #      define _S_IWUSR _S_IWRITE
+@@ -153,9 +160,13 @@
+ #      define S_IRUSR _S_IRUSR
+ #      define S_IWUSR _S_IWUSR
+ #      define S_IXUSR _S_IXUSR
++#    endif
++#    ifndef S_IXGRP
+ #      define S_IRGRP (S_IRUSR >> 3)
+ #      define S_IWGRP (S_IWUSR >> 3)
+ #      define S_IXGRP (S_IXUSR >> 3)
++#    endif
++#    ifndef S_IXOTH
+ #      define S_IROTH (S_IRGRP >> 3)
+ #      define S_IWOTH (S_IWGRP >> 3)
+ #      define S_IXOTH (S_IXGRP >> 3)
+--- glib-2.58.0/glib/giowin32.c.orig   2018-08-30 19:12:08.000000000 +0200
++++ glib-2.58.0/glib/giowin32.c        2018-09-15 10:12:54.423173008 +0200
+@@ -70,6 +70,7 @@
+ #include "glib.h"
+ #include <stdlib.h>
++#include <winerror.h>
+ #include <winsock2.h>
+ #include <windows.h>
+ #include <conio.h>
+--- glib-2.58.0/gio/gioerror.c.orig    2018-08-30 19:12:08.000000000 +0200
++++ glib-2.58.0/gio/gioerror.c 2018-09-17 20:04:51.387461074 +0200
+@@ -23,6 +23,7 @@
+ #include "gioerror.h"
+ #ifdef G_OS_WIN32
++#include <winerror.h>
+ #include <winsock2.h>
+ #endif
+--- glib-2.60.0/gio/gnetworking.h.in.orig      2018-08-30 19:12:08.000000000 +0200
++++ glib-2.60.0/gio/gnetworking.h.in   2018-09-18 19:33:44.179829189 +0200
+@@ -29,8 +29,11 @@
+ #include <winsock2.h>
+ #include <ws2tcpip.h>
+ #include <windns.h>
++#include <winerror.h>
+ #include <mswsock.h>
++#ifndef __MINGW32__
+ @WSPIAPI_INCLUDE@
++#endif
+ #include <iphlpapi.h>
+ #undef interface
+--- glib-2.58.0/gio/gwin32networkmonitor.c.orig        2018-08-30 19:12:08.000000000 +0200
++++ glib-2.58.0/gio/gwin32networkmonitor.c     2018-09-26 17:22:59.000209749 +0200
+@@ -28,6 +28,7 @@
+ #include <winsock2.h>
+ #include <ws2tcpip.h>
++#include <netioapi.h>
+ #include <iphlpapi.h>
+ #include <stdio.h>
+--- glib-2.58.3/glib/gutils.h.orig     2019-01-21 14:38:50.000000000 +0100
++++ glib-2.58.3/glib/gutils.h  2019-01-31 18:01:41.630885345 +0100
+@@ -214,7 +214,7 @@
+  * wants the function to be called when it *itself* exits (or is
+  * detached, in case the caller, too, is a DLL).
+  */
+-#if (defined(__MINGW_H) && !defined(_STDLIB_H_)) || (defined(_MSC_VER) && !defined(_INC_STDLIB))
++#if (defined(__MINGW_H) && !defined(_STDLIB_H_) && !defined(_STDLIB_H)) || (defined(_MSC_VER) && !defined(_INC_STDLIB))
+ int atexit (void (*)(void));
+ #endif
+ #define g_atexit(func) atexit(func)
+--- glib-2.60.0/glib/gstdio-private.c.orig     2019-03-04 21:06:14.000000000 +0100
++++ glib-2.60.0/glib/gstdio-private.c  2019-03-17 08:40:17.301017330 +0100
+@@ -17,6 +17,8 @@
+  * along with this library; if not, see <http://www.gnu.org/licenses/>.
+  */
++#include <wctype.h>
++
+ /* Strips "\\\\?\\" extended prefix or
+  * "\\??\\" NT Object Manager prefix from
+  * @str in-place, using memmove.
+--- glib-2.60.0/gio/tests/g-file-info.c.orig   2019-03-04 21:06:14.000000000 +0100
++++ glib-2.60.0/gio/tests/g-file-info.c        2019-03-17 20:58:44.544317727 +0100
+@@ -30,6 +30,9 @@
+ #include <stdio.h>
+ #include <glib/gstdio.h>
+ #include <windows.h>
++#ifdef __MINGW32__
++#include <winioctl.h>
++#endif
+ #include <shlobj.h>
+ #include <io.h> /* for _get_osfhandle */
+ #endif
+--- glib-2.60.0/gio/tests/network-address.c.orig       2019-03-04 21:06:14.000000000 +0100
++++ glib-2.60.0/gio/tests/network-address.c    2019-03-17 21:18:09.974670716 +0100
+@@ -3,6 +3,9 @@
+ #include <gio/gio.h>
+ #include <gio/gnetworking.h>
++#ifdef __MINGW32__
++#include <ntddndis.h>
++#endif
+ static void
+ test_basic (void)
This page took 0.090527 seconds and 4 git commands to generate.