]>
Commit | Line | Data |
---|---|---|
c1cc1c67 JB |
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 | |
3 | @@ -24,8 +24,9 @@ | |
4 | /* Check if more ANSI-compliant Winsock2 functions are provided */ | |
5 | /* For run-time compatibility with Windows XP, remove when XP support dropped */ | |
6 | ||
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); | |
13 | ||
14 | typedef struct _GWin32WinsockFuncs | |
23e253c6 JB |
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 | |
17 | @@ -22,6 +22,7 @@ | |
321a0229 | 18 | |
23e253c6 | 19 | #include "config.h" |
321a0229 | 20 | |
23e253c6 JB |
21 | +#include <wctype.h> |
22 | #include <string.h> | |
321a0229 | 23 | |
23e253c6 | 24 | #include "gcontenttype.h" |
321a0229 JB |
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 | |
23e253c6 | 27 | @@ -25,10 +25,15 @@ |
321a0229 JB |
28 | #pragma warning ( disable:4005 ) |
29 | #endif | |
30 | #include <windows.h> | |
31 | +#ifdef __MINGW32__ | |
32 | +#include <ddk/ntstatus.h> | |
33 | +#include <ddk/ntddk.h> | |
321a0229 JB |
34 | +#else |
35 | #include <ntstatus.h> | |
36 | #include <winternl.h> | |
37 | +#endif | |
38 | ||
39 | -#ifndef _WDMDDK_ | |
23e253c6 | 40 | +#if !defined(_WDMDDK_) && !defined(_DDK_WINDDK_H) |
321a0229 JB |
41 | typedef enum _KEY_INFORMATION_CLASS { |
42 | KeyBasicInformation, | |
43 | KeyNodeInformation, | |
83471978 JB |
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 | |
46 | @@ -37,6 +37,11 @@ | |
23e253c6 JB |
47 | #include <io.h> |
48 | #include <sys/utime.h> | |
83471978 JB |
49 | #include <stdlib.h> /* for MB_CUR_MAX */ |
50 | +#include <ctype.h> | |
51 | +#include <malloc.h> | |
ba7709b3 | 52 | +#ifdef __MINGW32__ |
23e253c6 | 53 | +#include <winioctl.h> |
ba7709b3 | 54 | +#endif |
23e253c6 JB |
55 | #else |
56 | #include <utime.h> | |
57 | #include <errno.h> | |
83471978 | 58 | @@ -55,6 +60,7 @@ |
23e253c6 JB |
59 | #endif |
60 | ||
61 | #if defined (G_OS_WIN32) | |
62 | +# if !defined(__MINGW32__) | |
34981f85 | 63 | |
23e253c6 JB |
64 | /* We can't include Windows DDK and Windows SDK simultaneously, |
65 | * so let's copy this here from MinGW-w64 DDK. | |
83471978 | 66 | @@ -91,6 +97,7 @@ |
23e253c6 JB |
67 | } GenericReparseBuffer; |
68 | }; | |
69 | } REPARSE_DATA_BUFFER, *PREPARSE_DATA_BUFFER; | |
70 | +# endif | |
71 | ||
72 | static int | |
73 | w32_error_to_errno (DWORD error_code) | |
83471978 JB |
74 | @@ -145,7 +152,7 @@ |
75 | return (result - filetime_unix_epoch_offset) / hundreds_of_usec_per_sec; | |
76 | } | |
77 | ||
78 | -# ifdef _MSC_VER | |
79 | +# if defined(_MSC_VER) || defined(__MINGW32__) | |
80 | # ifndef S_IXUSR | |
81 | # define _S_IRUSR _S_IREAD | |
82 | # define _S_IWUSR _S_IWRITE | |
83 | @@ -153,9 +160,13 @@ | |
84 | # define S_IRUSR _S_IRUSR | |
85 | # define S_IWUSR _S_IWUSR | |
86 | # define S_IXUSR _S_IXUSR | |
87 | +# endif | |
88 | +# ifndef S_IXGRP | |
89 | # define S_IRGRP (S_IRUSR >> 3) | |
90 | # define S_IWGRP (S_IWUSR >> 3) | |
91 | # define S_IXGRP (S_IXUSR >> 3) | |
92 | +# endif | |
93 | +# ifndef S_IXOTH | |
94 | # define S_IROTH (S_IRGRP >> 3) | |
95 | # define S_IWOTH (S_IWGRP >> 3) | |
96 | # define S_IXOTH (S_IXGRP >> 3) | |
23e253c6 JB |
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 | |
99 | @@ -70,6 +70,7 @@ | |
34981f85 | 100 | #include "glib.h" |
23e253c6 JB |
101 | |
102 | #include <stdlib.h> | |
103 | +#include <winerror.h> | |
104 | #include <winsock2.h> | |
105 | #include <windows.h> | |
106 | #include <conio.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 | |
109 | @@ -23,6 +23,7 @@ | |
110 | #include "gioerror.h" | |
111 | ||
112 | #ifdef G_OS_WIN32 | |
113 | +#include <winerror.h> | |
114 | #include <winsock2.h> | |
115 | #endif | |
116 | ||
83471978 JB |
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 | |
119 | @@ -29,8 +29,11 @@ | |
23e253c6 JB |
120 | #include <winsock2.h> |
121 | #include <ws2tcpip.h> | |
122 | #include <windns.h> | |
123 | +#include <winerror.h> | |
124 | #include <mswsock.h> | |
83471978 | 125 | +#ifndef __MINGW32__ |
23e253c6 | 126 | @WSPIAPI_INCLUDE@ |
83471978 | 127 | +#endif |
23e253c6 | 128 | #include <iphlpapi.h> |
83471978 JB |
129 | #undef interface |
130 | ||
23e253c6 JB |
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 | |
133 | @@ -28,6 +28,7 @@ | |
134 | ||
135 | #include <winsock2.h> | |
136 | #include <ws2tcpip.h> | |
137 | +#include <netioapi.h> | |
138 | #include <iphlpapi.h> | |
139 | #include <stdio.h> | |
140 | ||
c0eb6085 JB |
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 | |
143 | @@ -214,7 +214,7 @@ | |
144 | * wants the function to be called when it *itself* exits (or is | |
145 | * detached, in case the caller, too, is a DLL). | |
146 | */ | |
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)); | |
150 | #endif | |
151 | #define g_atexit(func) atexit(func) | |
83471978 JB |
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 | |
154 | @@ -17,6 +17,8 @@ | |
155 | * along with this library; if not, see <http://www.gnu.org/licenses/>. | |
156 | */ | |
157 | ||
158 | +#include <wctype.h> | |
159 | + | |
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 | |
165 | @@ -30,6 +30,9 @@ | |
166 | #include <stdio.h> | |
167 | #include <glib/gstdio.h> | |
168 | #include <windows.h> | |
169 | +#ifdef __MINGW32__ | |
170 | +#include <winioctl.h> | |
171 | +#endif | |
172 | #include <shlobj.h> | |
173 | #include <io.h> /* for _get_osfhandle */ | |
174 | #endif | |
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 | |
177 | @@ -3,6 +3,9 @@ | |
178 | ||
179 | #include <gio/gio.h> | |
180 | #include <gio/gnetworking.h> | |
181 | +#ifdef __MINGW32__ | |
182 | +#include <ntddndis.h> | |
183 | +#endif | |
184 | ||
185 | static void | |
186 | test_basic (void) | |
f4c21751 JB |
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 | |
189 | @@ -817,7 +817,7 @@ | |
190 | for (year = first, i = 0; *rules != NULL && year <= last; year++) | |
191 | { | |
192 | gboolean failed = FALSE; | |
193 | - swprintf_s (s, 11, L"%d", year); | |
194 | + swprintf (s, 12, L"%d", year); | |
195 | ||
196 | if (!failed) | |
197 | { | |
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; | |
202 | } | |
203 | ||
204 | - fprintf_s (stderr, | |
205 | + fprintf (stderr, | |
206 | "Exception code=0x%lx flags=0x%lx at 0x%p", | |
207 | er->ExceptionCode, | |
208 | er->ExceptionFlags, | |
209 | @@ -1129,7 +1129,7 @@ | |
210 | switch (er->ExceptionCode) | |
211 | { | |
212 | case EXCEPTION_ACCESS_VIOLATION: | |
213 | - fprintf_s (stderr, | |
214 | + fprintf (stderr, | |
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]); | |
220 | break; | |
221 | case EXCEPTION_IN_PAGE_ERROR: | |
222 | - fprintf_s (stderr, | |
223 | + fprintf (stderr, | |
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]); | |
229 | break; | |
230 | default: | |
231 | - fprintf_s (stderr, "\n"); | |
232 | + fprintf (stderr, "\n"); | |
233 | break; | |
234 | } | |
235 | ||
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 | |
238 | @@ -40,10 +40,10 @@ | |
239 | char event_str[STR_BUFFER_SIZE] = {0}; | |
240 | gsize event_str_len; | |
241 | ||
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 |