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.66.8/glib/gstdio.c.orig 2021-03-18 14:47:48.333693500 +0100
33 +++ glib-2.66.8/glib/gstdio.c 2021-05-22 12:33:01.585554332 +0200
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.
54 @@ -93,6 +99,7 @@ typedef struct _REPARSE_DATA_BUFFER
55 } GenericReparseBuffer;
57 } REPARSE_DATA_BUFFER, *PREPARSE_DATA_BUFFER;
61 w32_error_to_errno (DWORD error_code)
62 @@ -191,7 +198,7 @@ _g_win32_filetime_to_unix_time (const FI
63 return result / hundreds_of_usec_per_sec;
67 +# if defined(_MSC_VER) || defined(__MINGW32__)
69 # define _S_IRUSR _S_IREAD
70 # define _S_IWUSR _S_IWRITE
71 @@ -199,9 +206,13 @@ _g_win32_filetime_to_unix_time (const FI
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.66.8/glib/gutils.h.orig 2021-05-22 12:33:27.583570901 +0200
130 +++ glib-2.66.8/glib/gutils.h 2021-05-22 12:34:08.529030255 +0200
131 @@ -343,7 +343,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS
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) GLIB_DEPRECATED_MACRO_IN_2_32
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.66.8/glib/gwin32.c.orig 2021-03-18 14:47:48.347693400 +0100
187 +++ glib-2.66.8/glib/gwin32.c 2021-05-22 12:35:00.835079487 +0200
188 @@ -891,7 +891,7 @@ g_console_win32_init (void)
190 int preferred_fd = i;
195 if (!streams[i].redirect)
197 @@ -1109,7 +1109,7 @@ g_win32_veh_handler (PEXCEPTION_POINTERS
198 return EXCEPTION_CONTINUE_SEARCH;
203 "Exception code=0x%lx flags=0x%lx at 0x%p",
206 @@ -1118,7 +1118,7 @@ g_win32_veh_handler (PEXCEPTION_POINTERS
207 switch (er->ExceptionCode)
209 case EXCEPTION_ACCESS_VIOLATION:
212 ". Access violation - attempting to %s at address 0x%p\n",
213 er->ExceptionInformation[0] == 0 ? "read data" :
214 er->ExceptionInformation[0] == 1 ? "write data" :
215 @@ -1127,7 +1127,7 @@ g_win32_veh_handler (PEXCEPTION_POINTERS
216 (void *) er->ExceptionInformation[1]);
218 case EXCEPTION_IN_PAGE_ERROR:
221 ". Page access violation - attempting to %s at address 0x%p with status %Ix\n",
222 er->ExceptionInformation[0] == 0 ? "read from an inaccessible page" :
223 er->ExceptionInformation[0] == 1 ? "write to an inaccessible page" :
224 @@ -1137,7 +1137,7 @@ g_win32_veh_handler (PEXCEPTION_POINTERS
225 er->ExceptionInformation[2]);
228 - fprintf_s (stderr, "\n");
229 + fprintf (stderr, "\n");
233 --- glib-2.62.0/glib/gwin32-private.c.orig 2019-09-05 18:56:49.000000000 +0200
234 +++ glib-2.62.0/glib/gwin32-private.c 2019-09-10 19:45:50.857238001 +0200
236 char event_str[STR_BUFFER_SIZE] = {0};
239 - _snprintf_s (pid_str, STR_BUFFER_SIZE, G_N_ELEMENTS (pid_str), "%lu", pid);
240 + snprintf (pid_str, STR_BUFFER_SIZE, "%lu", pid);
241 pid_str[G_N_ELEMENTS (pid_str) - 1] = 0;
242 pid_str_len = strlen (pid_str);
243 - _snprintf_s (event_str, STR_BUFFER_SIZE, G_N_ELEMENTS (pid_str), "%Iu", event);
244 + snprintf (event_str, STR_BUFFER_SIZE, "%Iu", event);
245 event_str[G_N_ELEMENTS (pid_str) - 1] = 0;
246 event_str_len = strlen (event_str);
247 #undef STR_BUFFER_SIZE