]>
Commit | Line | Data |
---|---|---|
23e253c6 JB |
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 | |
3 | @@ -22,6 +22,7 @@ | |
321a0229 | 4 | |
23e253c6 | 5 | #include "config.h" |
321a0229 | 6 | |
23e253c6 JB |
7 | +#include <wctype.h> |
8 | #include <string.h> | |
321a0229 | 9 | |
23e253c6 | 10 | #include "gcontenttype.h" |
61b158f2 JB |
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 | |
13 | @@ -25,12 +25,17 @@ | |
321a0229 JB |
14 | #pragma warning ( disable:4005 ) |
15 | #endif | |
16 | #include <windows.h> | |
17 | +#ifdef __MINGW32__ | |
18 | +#include <ddk/ntstatus.h> | |
19 | +#include <ddk/ntddk.h> | |
321a0229 JB |
20 | +#else |
21 | #include <ntstatus.h> | |
22 | #include <winternl.h> | |
23 | +#endif | |
24 | ||
61b158f2 JB |
25 | #include "gstrfuncsprivate.h" |
26 | ||
321a0229 | 27 | -#ifndef _WDMDDK_ |
23e253c6 | 28 | +#if !defined(_WDMDDK_) && !defined(_DDK_WINDDK_H) |
321a0229 JB |
29 | typedef enum _KEY_INFORMATION_CLASS { |
30 | KeyBasicInformation, | |
31 | KeyNodeInformation, | |
22b91ab3 JB |
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 | |
34 | @@ -39,6 +39,11 @@ | |
23e253c6 JB |
35 | #include <io.h> |
36 | #include <sys/utime.h> | |
83471978 JB |
37 | #include <stdlib.h> /* for MB_CUR_MAX */ |
38 | +#include <ctype.h> | |
39 | +#include <malloc.h> | |
ba7709b3 | 40 | +#ifdef __MINGW32__ |
23e253c6 | 41 | +#include <winioctl.h> |
ba7709b3 | 42 | +#endif |
23e253c6 JB |
43 | #else |
44 | #include <utime.h> | |
45 | #include <errno.h> | |
22b91ab3 | 46 | @@ -57,6 +62,7 @@ |
23e253c6 JB |
47 | #endif |
48 | ||
49 | #if defined (G_OS_WIN32) | |
50 | +# if !defined(__MINGW32__) | |
34981f85 | 51 | |
23e253c6 JB |
52 | /* We can't include Windows DDK and Windows SDK simultaneously, |
53 | * so let's copy this here from MinGW-w64 DDK. | |
22b91ab3 | 54 | @@ -93,6 +99,7 @@ typedef struct _REPARSE_DATA_BUFFER |
23e253c6 JB |
55 | } GenericReparseBuffer; |
56 | }; | |
57 | } REPARSE_DATA_BUFFER, *PREPARSE_DATA_BUFFER; | |
58 | +# endif | |
59 | ||
60 | static int | |
61 | w32_error_to_errno (DWORD error_code) | |
22b91ab3 JB |
62 | @@ -191,7 +198,7 @@ _g_win32_filetime_to_unix_time (const FI |
63 | return result / hundreds_of_usec_per_sec; | |
83471978 JB |
64 | } |
65 | ||
66 | -# ifdef _MSC_VER | |
67 | +# if defined(_MSC_VER) || defined(__MINGW32__) | |
68 | # ifndef S_IXUSR | |
69 | # define _S_IRUSR _S_IREAD | |
70 | # define _S_IWUSR _S_IWRITE | |
22b91ab3 | 71 | @@ -199,9 +206,13 @@ _g_win32_filetime_to_unix_time (const FI |
83471978 JB |
72 | # define S_IRUSR _S_IRUSR |
73 | # define S_IWUSR _S_IWUSR | |
74 | # define S_IXUSR _S_IXUSR | |
75 | +# endif | |
76 | +# ifndef S_IXGRP | |
77 | # define S_IRGRP (S_IRUSR >> 3) | |
78 | # define S_IWGRP (S_IWUSR >> 3) | |
79 | # define S_IXGRP (S_IXUSR >> 3) | |
80 | +# endif | |
81 | +# ifndef S_IXOTH | |
82 | # define S_IROTH (S_IRGRP >> 3) | |
83 | # define S_IWOTH (S_IWGRP >> 3) | |
84 | # define S_IXOTH (S_IXGRP >> 3) | |
23e253c6 JB |
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 | |
87 | @@ -70,6 +70,7 @@ | |
34981f85 | 88 | #include "glib.h" |
23e253c6 JB |
89 | |
90 | #include <stdlib.h> | |
91 | +#include <winerror.h> | |
92 | #include <winsock2.h> | |
93 | #include <windows.h> | |
94 | #include <conio.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 | |
97 | @@ -23,6 +23,7 @@ | |
98 | #include "gioerror.h" | |
99 | ||
100 | #ifdef G_OS_WIN32 | |
101 | +#include <winerror.h> | |
102 | #include <winsock2.h> | |
103 | #endif | |
104 | ||
9cf3c785 JB |
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 | |
107 | @@ -25,8 +25,11 @@ | |
23e253c6 JB |
108 | #include <winsock2.h> |
109 | #include <ws2tcpip.h> | |
110 | #include <windns.h> | |
111 | +#include <winerror.h> | |
112 | #include <mswsock.h> | |
83471978 | 113 | +#ifndef __MINGW32__ |
9cf3c785 | 114 | #include <wspiapi.h> |
83471978 | 115 | +#endif |
23e253c6 | 116 | #include <iphlpapi.h> |
83471978 JB |
117 | #undef interface |
118 | ||
23e253c6 JB |
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 | |
121 | @@ -28,6 +28,7 @@ | |
122 | ||
123 | #include <winsock2.h> | |
124 | #include <ws2tcpip.h> | |
125 | +#include <netioapi.h> | |
126 | #include <iphlpapi.h> | |
127 | #include <stdio.h> | |
128 | ||
22b91ab3 JB |
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 | |
c0eb6085 JB |
132 | * wants the function to be called when it *itself* exits (or is |
133 | * detached, in case the caller, too, is a DLL). | |
134 | */ | |
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)); | |
138 | #endif | |
22b91ab3 | 139 | #define g_atexit(func) atexit(func) GLIB_DEPRECATED_MACRO_IN_2_32 |
83471978 JB |
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 | |
142 | @@ -17,6 +17,8 @@ | |
143 | * along with this library; if not, see <http://www.gnu.org/licenses/>. | |
144 | */ | |
145 | ||
146 | +#include <wctype.h> | |
147 | + | |
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 | |
153 | @@ -30,6 +30,9 @@ | |
154 | #include <stdio.h> | |
155 | #include <glib/gstdio.h> | |
156 | #include <windows.h> | |
157 | +#ifdef __MINGW32__ | |
158 | +#include <winioctl.h> | |
159 | +#endif | |
160 | #include <shlobj.h> | |
161 | #include <io.h> /* for _get_osfhandle */ | |
162 | #endif | |
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 | |
165 | @@ -3,6 +3,9 @@ | |
166 | ||
167 | #include <gio/gio.h> | |
168 | #include <gio/gnetworking.h> | |
169 | +#ifdef __MINGW32__ | |
170 | +#include <ntddndis.h> | |
171 | +#endif | |
172 | ||
173 | static void | |
174 | test_basic (void) | |
f4c21751 JB |
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 | |
177 | @@ -817,7 +817,7 @@ | |
178 | for (year = first, i = 0; *rules != NULL && year <= last; year++) | |
179 | { | |
180 | gboolean failed = FALSE; | |
181 | - swprintf_s (s, 11, L"%d", year); | |
182 | + swprintf (s, 12, L"%d", year); | |
183 | ||
184 | if (!failed) | |
185 | { | |
22b91ab3 JB |
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 | |
44e00312 JB |
188 | @@ -891,7 +891,7 @@ g_console_win32_init (void) |
189 | int new_fd; | |
190 | int preferred_fd = i; | |
191 | HANDLE std_handle; | |
192 | - errno_t errsv = 0; | |
193 | + int errsv = 0; | |
194 | ||
195 | if (!streams[i].redirect) | |
196 | continue; | |
22b91ab3 JB |
197 | @@ -1109,7 +1109,7 @@ g_win32_veh_handler (PEXCEPTION_POINTERS |
198 | return EXCEPTION_CONTINUE_SEARCH; | |
f4c21751 JB |
199 | } |
200 | ||
201 | - fprintf_s (stderr, | |
202 | + fprintf (stderr, | |
203 | "Exception code=0x%lx flags=0x%lx at 0x%p", | |
204 | er->ExceptionCode, | |
205 | er->ExceptionFlags, | |
22b91ab3 | 206 | @@ -1118,7 +1118,7 @@ g_win32_veh_handler (PEXCEPTION_POINTERS |
f4c21751 JB |
207 | switch (er->ExceptionCode) |
208 | { | |
209 | case EXCEPTION_ACCESS_VIOLATION: | |
210 | - fprintf_s (stderr, | |
211 | + fprintf (stderr, | |
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" : | |
22b91ab3 | 215 | @@ -1127,7 +1127,7 @@ g_win32_veh_handler (PEXCEPTION_POINTERS |
f4c21751 JB |
216 | (void *) er->ExceptionInformation[1]); |
217 | break; | |
218 | case EXCEPTION_IN_PAGE_ERROR: | |
219 | - fprintf_s (stderr, | |
220 | + fprintf (stderr, | |
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" : | |
22b91ab3 | 224 | @@ -1137,7 +1137,7 @@ g_win32_veh_handler (PEXCEPTION_POINTERS |
f4c21751 JB |
225 | er->ExceptionInformation[2]); |
226 | break; | |
227 | default: | |
228 | - fprintf_s (stderr, "\n"); | |
229 | + fprintf (stderr, "\n"); | |
230 | break; | |
231 | } | |
232 | ||
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 | |
235 | @@ -40,10 +40,10 @@ | |
236 | char event_str[STR_BUFFER_SIZE] = {0}; | |
237 | gsize event_str_len; | |
238 | ||
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 |