1 --- glib-2.58.0/gio/gwin32appinfo.c.orig 2018-08-30 19:12:08.000000000 +0200
2 +++ glib-2.58.0/gio/gwin32appinfo.c 2018-09-18 20:29:20.206457756 +0200
10 #include "gcontenttype.h"
11 --- glib-2.66.6/gio/gwin32registrykey.c.orig 2021-02-07 19:11:29.468421063 +0100
12 +++ glib-2.66.6/gio/gwin32registrykey.c 2021-02-07 19:51:00.202244362 +0100
14 #pragma warning ( disable:4005 )
18 +#include <ddk/ntstatus.h>
19 +#include <ddk/ntddk.h>
25 #include "gstrfuncsprivate.h"
28 +#if !defined(_WDMDDK_) && !defined(_DDK_WINDDK_H)
29 typedef enum _KEY_INFORMATION_CLASS {
32 --- glib-2.60.0/glib/gstdio.c.orig 2019-03-04 21:06:14.000000000 +0100
33 +++ glib-2.60.0/glib/gstdio.c 2019-03-17 08:35:17.205976417 +0100
36 #include <sys/utime.h>
37 #include <stdlib.h> /* for MB_CUR_MAX */
41 +#include <winioctl.h>
49 #if defined (G_OS_WIN32)
50 +# if !defined(__MINGW32__)
52 /* We can't include Windows DDK and Windows SDK simultaneously,
53 * so let's copy this here from MinGW-w64 DDK.
55 } GenericReparseBuffer;
57 } REPARSE_DATA_BUFFER, *PREPARSE_DATA_BUFFER;
61 w32_error_to_errno (DWORD error_code)
63 return (result - filetime_unix_epoch_offset) / hundreds_of_usec_per_sec;
67 +# if defined(_MSC_VER) || defined(__MINGW32__)
69 # define _S_IRUSR _S_IREAD
70 # define _S_IWUSR _S_IWRITE
72 # define S_IRUSR _S_IRUSR
73 # define S_IWUSR _S_IWUSR
74 # define S_IXUSR _S_IXUSR
77 # define S_IRGRP (S_IRUSR >> 3)
78 # define S_IWGRP (S_IWUSR >> 3)
79 # define S_IXGRP (S_IXUSR >> 3)
82 # define S_IROTH (S_IRGRP >> 3)
83 # define S_IWOTH (S_IWGRP >> 3)
84 # define S_IXOTH (S_IXGRP >> 3)
85 --- glib-2.58.0/glib/giowin32.c.orig 2018-08-30 19:12:08.000000000 +0200
86 +++ glib-2.58.0/glib/giowin32.c 2018-09-15 10:12:54.423173008 +0200
91 +#include <winerror.h>
95 --- glib-2.58.0/gio/gioerror.c.orig 2018-08-30 19:12:08.000000000 +0200
96 +++ glib-2.58.0/gio/gioerror.c 2018-09-17 20:04:51.387461074 +0200
101 +#include <winerror.h>
102 #include <winsock2.h>
105 --- glib-2.66.0/gio/gnetworking.h.in.orig 2020-09-10 17:57:49.379170952 +0200
106 +++ glib-2.66.0/gio/gnetworking.h.in 2020-09-10 18:00:37.804925178 +0200
108 #include <winsock2.h>
109 #include <ws2tcpip.h>
111 +#include <winerror.h>
116 #include <iphlpapi.h>
119 --- glib-2.58.0/gio/gwin32networkmonitor.c.orig 2018-08-30 19:12:08.000000000 +0200
120 +++ glib-2.58.0/gio/gwin32networkmonitor.c 2018-09-26 17:22:59.000209749 +0200
123 #include <winsock2.h>
124 #include <ws2tcpip.h>
125 +#include <netioapi.h>
126 #include <iphlpapi.h>
129 --- glib-2.58.3/glib/gutils.h.orig 2019-01-21 14:38:50.000000000 +0100
130 +++ glib-2.58.3/glib/gutils.h 2019-01-31 18:01:41.630885345 +0100
132 * wants the function to be called when it *itself* exits (or is
133 * detached, in case the caller, too, is a DLL).
135 -#if (defined(__MINGW_H) && !defined(_STDLIB_H_)) || (defined(_MSC_VER) && !defined(_INC_STDLIB))
136 +#if (defined(__MINGW_H) && !defined(_STDLIB_H_) && !defined(_STDLIB_H)) || (defined(_MSC_VER) && !defined(_INC_STDLIB))
137 int atexit (void (*)(void));
139 #define g_atexit(func) atexit(func)
140 --- glib-2.60.0/glib/gstdio-private.c.orig 2019-03-04 21:06:14.000000000 +0100
141 +++ glib-2.60.0/glib/gstdio-private.c 2019-03-17 08:40:17.301017330 +0100
143 * along with this library; if not, see <http://www.gnu.org/licenses/>.
148 /* Strips "\\\\?\\" extended prefix or
149 * "\\??\\" NT Object Manager prefix from
150 * @str in-place, using memmove.
151 --- glib-2.60.0/gio/tests/g-file-info.c.orig 2019-03-04 21:06:14.000000000 +0100
152 +++ glib-2.60.0/gio/tests/g-file-info.c 2019-03-17 20:58:44.544317727 +0100
155 #include <glib/gstdio.h>
158 +#include <winioctl.h>
161 #include <io.h> /* for _get_osfhandle */
163 --- glib-2.60.0/gio/tests/network-address.c.orig 2019-03-04 21:06:14.000000000 +0100
164 +++ glib-2.60.0/gio/tests/network-address.c 2019-03-17 21:18:09.974670716 +0100
168 #include <gio/gnetworking.h>
170 +#include <ntddndis.h>
175 --- glib-2.62.0/glib/gtimezone.c.orig 2019-09-05 18:56:49.000000000 +0200
176 +++ glib-2.62.0/glib/gtimezone.c 2019-09-10 19:30:55.332089477 +0200
178 for (year = first, i = 0; *rules != NULL && year <= last; year++)
180 gboolean failed = FALSE;
181 - swprintf_s (s, 11, L"%d", year);
182 + swprintf (s, 12, L"%d", year);
186 --- glib-2.62.0/glib/gwin32.c.orig 2019-09-05 18:56:49.000000000 +0200
187 +++ glib-2.62.0/glib/gwin32.c 2019-09-10 19:40:22.822348452 +0200
188 @@ -1120,7 +1120,7 @@
189 return EXCEPTION_CONTINUE_EXECUTION;
194 "Exception code=0x%lx flags=0x%lx at 0x%p",
197 @@ -1129,7 +1129,7 @@
198 switch (er->ExceptionCode)
200 case EXCEPTION_ACCESS_VIOLATION:
203 ". Access violation - attempting to %s at address 0x%p\n",
204 er->ExceptionInformation[0] == 0 ? "read data" :
205 er->ExceptionInformation[0] == 1 ? "write data" :
206 @@ -1138,7 +1138,7 @@
207 (void *) er->ExceptionInformation[1]);
209 case EXCEPTION_IN_PAGE_ERROR:
212 ". Page access violation - attempting to %s at address 0x%p with status %Ix\n",
213 er->ExceptionInformation[0] == 0 ? "read from an inaccessible page" :
214 er->ExceptionInformation[0] == 1 ? "write to an inaccessible page" :
215 @@ -1148,7 +1148,7 @@
216 er->ExceptionInformation[2]);
219 - fprintf_s (stderr, "\n");
220 + fprintf (stderr, "\n");
224 --- glib-2.62.0/glib/gwin32-private.c.orig 2019-09-05 18:56:49.000000000 +0200
225 +++ glib-2.62.0/glib/gwin32-private.c 2019-09-10 19:45:50.857238001 +0200
227 char event_str[STR_BUFFER_SIZE] = {0};
230 - _snprintf_s (pid_str, STR_BUFFER_SIZE, G_N_ELEMENTS (pid_str), "%lu", pid);
231 + snprintf (pid_str, STR_BUFFER_SIZE, "%lu", pid);
232 pid_str[G_N_ELEMENTS (pid_str) - 1] = 0;
233 pid_str_len = strlen (pid_str);
234 - _snprintf_s (event_str, STR_BUFFER_SIZE, G_N_ELEMENTS (pid_str), "%Iu", event);
235 + snprintf (event_str, STR_BUFFER_SIZE, "%Iu", event);
236 event_str[G_N_ELEMENTS (pid_str) - 1] = 0;
237 event_str_len = strlen (event_str);
238 #undef STR_BUFFER_SIZE