X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=glib2-win32.patch;h=826c342a2009dfa9bc40f0f8fafda004e42f2e7e;hb=34981f85b17f375e7f5454f9d5d0cf5fa0cd6b10;hp=a82281854169b50f857dbc8e83fe6aa5bd349dc0;hpb=21a22fdc677b51fe47a60555c0a6363b8fde0cf6;p=packages%2Fcrossmingw32-glib2.git diff --git a/glib2-win32.patch b/glib2-win32.patch index a822818..826c342 100644 --- a/glib2-win32.patch +++ b/glib2-win32.patch @@ -1,22 +1,86 @@ ---- 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.40.0/glib/grand.c.orig 2014-02-22 16:29:07.000000000 +0100 ++++ glib-2.40.0/glib/grand.c 2014-03-25 18:45:39.693348981 +0100 +@@ -55,6 +55,7 @@ + #endif + #ifdef G_OS_WIN32 ++#include + #include + #endif +--- 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.46.0/glib/gstrfuncs.c.orig 2015-09-12 18:05:31.000000000 +0200 ++++ glib-2.46.0/glib/gstrfuncs.c 2015-09-22 17:09:13.736714571 +0200 +@@ -1272,7 +1272,7 @@ + gchar buf[1024]; + GError *error = NULL; + +-#if defined(G_OS_WIN32) ++#if defined(G_OS_WIN32) && !defined(__MINGW32__) + strerror_s (buf, sizeof (buf), errnum); + msg = buf; + #elif defined(HAVE_STRERROR_R) +--- glib-2.46.0/gio/gwin32appinfo.c.orig 2015-09-21 14:37:29.000000000 +0200 ++++ glib-2.46.0/gio/gwin32appinfo.c 2015-09-22 17:34:28.039984356 +0200 +@@ -34,6 +34,11 @@ + #include + + #include ++#include ++ ++#ifndef LOAD_LIBRARY_AS_IMAGE_RESOURCE ++#define LOAD_LIBRARY_AS_IMAGE_RESOURCE 0x20 ++#endif + + /* We need to watch 8 places: + * 0) HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations +--- 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,21 @@ + #pragma warning ( disable:4005 ) + #endif + #include ++#ifdef __MINGW32__ ++#include ++#include ++#if !defined HKEY_PERFORMANCE_NLSTEXT ++#define HKEY_PERFORMANCE_NLSTEXT (( HKEY ) (ULONG_PTR)((LONG)0x80000060) ) ++#endif ++#if ! defined HKEY_PERFORMANCE_TEXT ++#define HKEY_PERFORMANCE_TEXT (( HKEY ) (ULONG_PTR)((LONG)0x80000050) ) ++#endif ++#else + #include + #include ++#endif + +-#ifndef _WDMDDK_ ++#if !defined(_WDMDDK_) && !defined(__WINDDK_H) + typedef enum _KEY_INFORMATION_CLASS { + KeyBasicInformation, + KeyNodeInformation, +--- glib-2.46.1/glib/gwin32.c.orig 2015-10-14 15:04:10.000000000 +0200 ++++ glib-2.46.1/glib/gwin32.c 2015-10-16 18:30:22.408973356 +0200 +@@ -59,6 +59,9 @@ + #ifdef _MSC_VER + #pragma comment (lib, "ntoskrnl.lib") + #endif ++ ++#else ++#include + #endif + + #include "glib.h"