1 --- glib-2.44.0/gio/gwin32networking.h.orig 2015-03-20 18:33:38.000000000 +0100
2 +++ glib-2.44.0/gio/gwin32networking.h 2015-03-23 21:03:15.924279829 +0100
4 /* Check if more ANSI-compliant Winsock2 functions are provided */
5 /* For run-time compatibility with Windows XP, remove when XP support dropped */
7 -typedef INT (WSAAPI *PFN_InetPton) (INT, PCTSTR, PVOID);
8 -typedef PCTSTR (WSAAPI *PFN_InetNtop) (INT, PVOID, PTSTR, size_t);
9 +typedef ULONG NET_IFINDEX;
10 +typedef INT (WSAAPI *PFN_InetPton) (INT, LPCTSTR, PVOID);
11 +typedef LPCTSTR (WSAAPI *PFN_InetNtop) (INT, PVOID, PTSTR, size_t);
12 typedef NET_IFINDEX (WINAPI *PFN_IfNameToIndex) (PCSTR);
14 typedef struct _GWin32WinsockFuncs
15 --- glib-2.58.0/gio/gwin32appinfo.c.orig 2018-08-30 19:12:08.000000000 +0200
16 +++ glib-2.58.0/gio/gwin32appinfo.c 2018-09-18 20:29:20.206457756 +0200
24 #include "gcontenttype.h"
25 --- glib-2.46.0/gio/gwin32registrykey.c.orig 2015-09-21 12:44:58.000000000 +0200
26 +++ glib-2.46.0/gio/gwin32registrykey.c 2015-09-22 18:50:25.926459740 +0200
28 #pragma warning ( disable:4005 )
32 +#include <ddk/ntstatus.h>
33 +#include <ddk/ntddk.h>
40 +#if !defined(_WDMDDK_) && !defined(_DDK_WINDDK_H)
41 typedef enum _KEY_INFORMATION_CLASS {
44 --- glib-2.60.0/glib/gstdio.c.orig 2019-03-04 21:06:14.000000000 +0100
45 +++ glib-2.60.0/glib/gstdio.c 2019-03-17 08:35:17.205976417 +0100
48 #include <sys/utime.h>
49 #include <stdlib.h> /* for MB_CUR_MAX */
53 +#include <winioctl.h>
61 #if defined (G_OS_WIN32)
62 +# if !defined(__MINGW32__)
64 /* We can't include Windows DDK and Windows SDK simultaneously,
65 * so let's copy this here from MinGW-w64 DDK.
67 } GenericReparseBuffer;
69 } REPARSE_DATA_BUFFER, *PREPARSE_DATA_BUFFER;
73 w32_error_to_errno (DWORD error_code)
75 return (result - filetime_unix_epoch_offset) / hundreds_of_usec_per_sec;
79 +# if defined(_MSC_VER) || defined(__MINGW32__)
81 # define _S_IRUSR _S_IREAD
82 # define _S_IWUSR _S_IWRITE
84 # define S_IRUSR _S_IRUSR
85 # define S_IWUSR _S_IWUSR
86 # define S_IXUSR _S_IXUSR
89 # define S_IRGRP (S_IRUSR >> 3)
90 # define S_IWGRP (S_IWUSR >> 3)
91 # define S_IXGRP (S_IXUSR >> 3)
94 # define S_IROTH (S_IRGRP >> 3)
95 # define S_IWOTH (S_IWGRP >> 3)
96 # define S_IXOTH (S_IXGRP >> 3)
97 --- glib-2.58.0/glib/giowin32.c.orig 2018-08-30 19:12:08.000000000 +0200
98 +++ glib-2.58.0/glib/giowin32.c 2018-09-15 10:12:54.423173008 +0200
103 +#include <winerror.h>
104 #include <winsock2.h>
107 --- glib-2.58.0/gio/gioerror.c.orig 2018-08-30 19:12:08.000000000 +0200
108 +++ glib-2.58.0/gio/gioerror.c 2018-09-17 20:04:51.387461074 +0200
110 #include "gioerror.h"
113 +#include <winerror.h>
114 #include <winsock2.h>
117 --- glib-2.60.0/gio/gnetworking.h.in.orig 2018-08-30 19:12:08.000000000 +0200
118 +++ glib-2.60.0/gio/gnetworking.h.in 2018-09-18 19:33:44.179829189 +0200
120 #include <winsock2.h>
121 #include <ws2tcpip.h>
123 +#include <winerror.h>
128 #include <iphlpapi.h>
131 --- glib-2.58.0/gio/gwin32networkmonitor.c.orig 2018-08-30 19:12:08.000000000 +0200
132 +++ glib-2.58.0/gio/gwin32networkmonitor.c 2018-09-26 17:22:59.000209749 +0200
135 #include <winsock2.h>
136 #include <ws2tcpip.h>
137 +#include <netioapi.h>
138 #include <iphlpapi.h>
141 --- glib-2.58.3/glib/gutils.h.orig 2019-01-21 14:38:50.000000000 +0100
142 +++ glib-2.58.3/glib/gutils.h 2019-01-31 18:01:41.630885345 +0100
144 * wants the function to be called when it *itself* exits (or is
145 * detached, in case the caller, too, is a DLL).
147 -#if (defined(__MINGW_H) && !defined(_STDLIB_H_)) || (defined(_MSC_VER) && !defined(_INC_STDLIB))
148 +#if (defined(__MINGW_H) && !defined(_STDLIB_H_) && !defined(_STDLIB_H)) || (defined(_MSC_VER) && !defined(_INC_STDLIB))
149 int atexit (void (*)(void));
151 #define g_atexit(func) atexit(func)
152 --- glib-2.60.0/glib/gstdio-private.c.orig 2019-03-04 21:06:14.000000000 +0100
153 +++ glib-2.60.0/glib/gstdio-private.c 2019-03-17 08:40:17.301017330 +0100
155 * along with this library; if not, see <http://www.gnu.org/licenses/>.
160 /* Strips "\\\\?\\" extended prefix or
161 * "\\??\\" NT Object Manager prefix from
162 * @str in-place, using memmove.
163 --- glib-2.60.0/gio/tests/g-file-info.c.orig 2019-03-04 21:06:14.000000000 +0100
164 +++ glib-2.60.0/gio/tests/g-file-info.c 2019-03-17 20:58:44.544317727 +0100
167 #include <glib/gstdio.h>
170 +#include <winioctl.h>
173 #include <io.h> /* for _get_osfhandle */
175 --- glib-2.60.0/gio/tests/network-address.c.orig 2019-03-04 21:06:14.000000000 +0100
176 +++ glib-2.60.0/gio/tests/network-address.c 2019-03-17 21:18:09.974670716 +0100
180 #include <gio/gnetworking.h>
182 +#include <ntddndis.h>
187 --- glib-2.62.0/glib/gtimezone.c.orig 2019-09-05 18:56:49.000000000 +0200
188 +++ glib-2.62.0/glib/gtimezone.c 2019-09-10 19:30:55.332089477 +0200
190 for (year = first, i = 0; *rules != NULL && year <= last; year++)
192 gboolean failed = FALSE;
193 - swprintf_s (s, 11, L"%d", year);
194 + swprintf (s, 12, L"%d", year);
198 --- glib-2.62.0/glib/gwin32.c.orig 2019-09-05 18:56:49.000000000 +0200
199 +++ glib-2.62.0/glib/gwin32.c 2019-09-10 19:40:22.822348452 +0200
200 @@ -1120,7 +1120,7 @@
201 return EXCEPTION_CONTINUE_EXECUTION;
206 "Exception code=0x%lx flags=0x%lx at 0x%p",
209 @@ -1129,7 +1129,7 @@
210 switch (er->ExceptionCode)
212 case EXCEPTION_ACCESS_VIOLATION:
215 ". Access violation - attempting to %s at address 0x%p\n",
216 er->ExceptionInformation[0] == 0 ? "read data" :
217 er->ExceptionInformation[0] == 1 ? "write data" :
218 @@ -1138,7 +1138,7 @@
219 (void *) er->ExceptionInformation[1]);
221 case EXCEPTION_IN_PAGE_ERROR:
224 ". Page access violation - attempting to %s at address 0x%p with status %Ix\n",
225 er->ExceptionInformation[0] == 0 ? "read from an inaccessible page" :
226 er->ExceptionInformation[0] == 1 ? "write to an inaccessible page" :
227 @@ -1148,7 +1148,7 @@
228 er->ExceptionInformation[2]);
231 - fprintf_s (stderr, "\n");
232 + fprintf (stderr, "\n");
236 --- glib-2.62.0/glib/gwin32-private.c.orig 2019-09-05 18:56:49.000000000 +0200
237 +++ glib-2.62.0/glib/gwin32-private.c 2019-09-10 19:45:50.857238001 +0200
239 char event_str[STR_BUFFER_SIZE] = {0};
242 - _snprintf_s (pid_str, STR_BUFFER_SIZE, G_N_ELEMENTS (pid_str), "%lu", pid);
243 + snprintf (pid_str, STR_BUFFER_SIZE, "%lu", pid);
244 pid_str[G_N_ELEMENTS (pid_str) - 1] = 0;
245 pid_str_len = strlen (pid_str);
246 - _snprintf_s (event_str, STR_BUFFER_SIZE, G_N_ELEMENTS (pid_str), "%Iu", event);
247 + snprintf (event_str, STR_BUFFER_SIZE, "%Iu", event);
248 event_str[G_N_ELEMENTS (pid_str) - 1] = 0;
249 event_str_len = strlen (event_str);
250 #undef STR_BUFFER_SIZE