summaryrefslogtreecommitdiff
path: root/recipes
diff options
context:
space:
mode:
authorPiotr Brzeziński <thewildtree@outlook.com>2023-10-16 14:55:34 +0200
committerTim-Philipp Müller <tim@centricular.com>2023-10-16 19:36:36 +0100
commit4abc1eb31143f9d58558f80089c455aed38cd05e (patch)
tree42de1d7083dbef87284fe4594623b832625c0327 /recipes
parent222806b3ef552d28da7450a75d7d3aea67f0596c (diff)
glib: Remove unused patches
Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/1284>
Diffstat (limited to 'recipes')
-rw-r--r--recipes/glib/0001-Add-missing-extern-to-the-dllexport-version-of-GLIB_.patch46
-rw-r--r--recipes/glib/0001-Windows-fix-FD_READ-condition-flag-still-set-on-reco.patch34
-rw-r--r--recipes/glib/0001-gioerror-Map-WSAENETRESET-on-Windows-to-G_IO_ERROR_C.patch34
-rw-r--r--recipes/glib/0001-glib-Use-g_getenv-everywhere-instead-of-getenv.patch195
-rw-r--r--recipes/glib/0001-gslice-Inline-win32-implementation-of-g_getenv-to-av.patch89
-rw-r--r--recipes/glib/0001-gthread-win32-Use-SetThreadDescription-Win32-API-for.patch84
-rw-r--r--recipes/glib/0001-macos-fix-frexpl-checks-in-cross-compilation.patch27
-rw-r--r--recipes/glib/0001-macros-Define-G_GNUC_FALLTHROUGH-for-more-compilers.patch37
-rw-r--r--recipes/glib/0001-meson-Don-t-use-assert-in-test-code.patch58
-rw-r--r--recipes/glib/0001-meson-Fix-gnulib-printf-checks.patch83
-rw-r--r--recipes/glib/0001-meson-fix-buildtype-args-and-vscrt-usage.patch105
-rw-r--r--recipes/glib/0001-meson-host_system-can-be-ios-when-cross-compiling.patch30
-rw-r--r--recipes/glib/0002-meson-Autodetect-when-building-for-iOS.patch35
-rw-r--r--recipes/glib/0003-meson-Only-look-for-_NSGetEnviron-when-building-for-.patch35
14 files changed, 0 insertions, 892 deletions
diff --git a/recipes/glib/0001-Add-missing-extern-to-the-dllexport-version-of-GLIB_.patch b/recipes/glib/0001-Add-missing-extern-to-the-dllexport-version-of-GLIB_.patch
deleted file mode 100644
index 0a7d5771..00000000
--- a/recipes/glib/0001-Add-missing-extern-to-the-dllexport-version-of-GLIB_.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From fdfadfc27604b58886d7a33cf5f78bb0617733e6 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin@martin.st>
-Date: Tue, 31 Mar 2020 23:15:23 +0300
-Subject: [PATCH] Add missing 'extern' to the dllexport version of
- GLIB_VAR/GOBJECT_VAR
-
-The __declspec(dllexport) attribute in itself doesn't imply
-'extern' - thus any intended variable declaration with
-GLIB_VAR/GOBJECT_VAR would actually be a variable definition. With
-C compilers defaulting to -fcommon, this isn't an issue, but
-upcoming compilers (GCC 10 and Clang 11) will default to -fno-common,
-ending up with duplicate definitions of these variables.
----
- glib/gtypes.h | 2 +-
- gobject/gparamspecs.h | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/glib/gtypes.h b/glib/gtypes.h
-index df65836a0..23c5a1295 100644
---- a/glib/gtypes.h
-+++ b/glib/gtypes.h
-@@ -565,7 +565,7 @@ G_END_DECLS
- # else /* !GLIB_STATIC_COMPILATION */
- # ifdef GLIB_COMPILATION
- # ifdef DLL_EXPORT
--# define GLIB_VAR __declspec(dllexport)
-+# define GLIB_VAR extern __declspec(dllexport)
- # else /* !DLL_EXPORT */
- # define GLIB_VAR extern
- # endif /* !DLL_EXPORT */
-diff --git a/gobject/gparamspecs.h b/gobject/gparamspecs.h
-index 0309f9bb3..d0e4d5953 100644
---- a/gobject/gparamspecs.h
-+++ b/gobject/gparamspecs.h
-@@ -1150,7 +1150,7 @@ GParamSpec* g_param_spec_variant (const gchar *name,
- # else /* !GOBJECT_STATIC_COMPILATION */
- # ifdef GOBJECT_COMPILATION
- # ifdef DLL_EXPORT
--# define GOBJECT_VAR __declspec(dllexport)
-+# define GOBJECT_VAR extern __declspec(dllexport)
- # else /* !DLL_EXPORT */
- # define GOBJECT_VAR extern
- # endif /* !DLL_EXPORT */
---
-2.25.1
-
diff --git a/recipes/glib/0001-Windows-fix-FD_READ-condition-flag-still-set-on-reco.patch b/recipes/glib/0001-Windows-fix-FD_READ-condition-flag-still-set-on-reco.patch
deleted file mode 100644
index c2a91d30..00000000
--- a/recipes/glib/0001-Windows-fix-FD_READ-condition-flag-still-set-on-reco.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 6900d53ed863a3e3d7e4e36376ac811ab0cca531 Mon Sep 17 00:00:00 2001
-From: Marco Mastropaolo <marco@mastropaolo.com>
-Date: Thu, 24 Dec 2020 09:08:40 +0000
-Subject: [PATCH] Windows: fix FD_READ condition flag still set on recoverable
- UDP socket errors.
-
-Contrary to what the WSARecvFrom seem to imply, a UDP socket is perfectly recoverable and usable after a WSAECONNRESET error (and, I assume, WSAENETRESET).
-However GSocket condition has the FD_READ bit set after a UDP socket fails with WSAECONNRESET, even if no data is available on the socket anymore; this causes select calls to report the socket as readable when, in fact, it's not.
-
-The change resets FD_READ flag on a socket upon the above error conditions; there's no 'if' to filter between datagram and stream sockets as the change should be harmless in the case of stream sockets which are, however, very unlikely to be usable after a WSAECONNRESET.
----
- gio/gsocket.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/gio/gsocket.c b/gio/gsocket.c
-index 0f8f9259f..e911de781 100644
---- a/gio/gsocket.c
-+++ b/gio/gsocket.c
-@@ -5475,10 +5475,10 @@ g_socket_receive_message_with_timeout (GSocket *socket,
- if (errsv == WSAEINTR)
- continue;
-
-+ win32_unset_event_mask (socket, FD_READ);
-+
- if (errsv == WSAEWOULDBLOCK)
- {
-- win32_unset_event_mask (socket, FD_READ);
--
- if (timeout_us != 0)
- {
- if (!block_on_timeout (socket, G_IO_IN, timeout_us,
---
-2.31.0
-
diff --git a/recipes/glib/0001-gioerror-Map-WSAENETRESET-on-Windows-to-G_IO_ERROR_C.patch b/recipes/glib/0001-gioerror-Map-WSAENETRESET-on-Windows-to-G_IO_ERROR_C.patch
deleted file mode 100644
index 2ff28be9..00000000
--- a/recipes/glib/0001-gioerror-Map-WSAENETRESET-on-Windows-to-G_IO_ERROR_C.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From a8acbba46a3161add008d50830740fb0201f560a Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <sebastian@centricular.com>
-Date: Mon, 17 Aug 2020 13:11:22 +0300
-Subject: [PATCH] gioerror: Map WSAENETRESET on Windows to
- G_IO_ERROR_CONNECTION_CLOSED
-
-This has almost the same semantics as WSAECONNRESET and for all
-practical purposes is handled the same. The main difference is about
-*who* reset the connection: the peer or something in the network.
-
-For UDP sockets this happens when receiving packets and previously sent
-packets returned an ICMP "Time(-to-live) expired" message. This is
-similar to WSAECONNRESET, which on UDP sockets happens when receiving
-packets and previously sent packets returned an ICMP "Port Unreachable"
-message.
----
- gio/gioerror.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/gio/gioerror.c b/gio/gioerror.c
-index 1ec120d98..477906c0c 100644
---- a/gio/gioerror.c
-+++ b/gio/gioerror.c
-@@ -343,6 +343,7 @@ g_io_error_from_win32_error (gint error_code)
- return G_IO_ERROR_NOT_SUPPORTED;
-
- case WSAECONNRESET:
-+ case WSAENETRESET:
- case WSAESHUTDOWN:
- return G_IO_ERROR_CONNECTION_CLOSED;
-
---
-2.31.0
-
diff --git a/recipes/glib/0001-glib-Use-g_getenv-everywhere-instead-of-getenv.patch b/recipes/glib/0001-glib-Use-g_getenv-everywhere-instead-of-getenv.patch
deleted file mode 100644
index aed7d113..00000000
--- a/recipes/glib/0001-glib-Use-g_getenv-everywhere-instead-of-getenv.patch
+++ /dev/null
@@ -1,195 +0,0 @@
-From 7b8ad9f0944e327a570df1df8976991ae4dd2efe Mon Sep 17 00:00:00 2001
-From: Nirbheek Chauhan <nirbheek@centricular.com>
-Date: Thu, 23 Jul 2020 13:20:39 +0530
-Subject: [PATCH] glib: Use g_getenv everywhere instead of getenv
-
-`getenv()` doesn't work well on Windows, f.ex., it can't fetch env
-vars set with `SetEnvironmentVariable()`. This also means that it
-doesn't work at all when targeting UWP since that's the only way to
-set env vars in that case.
----
- glib/gconvert.c | 7 ++++---
- glib/giowin32.c | 2 +-
- glib/gmain.c | 2 +-
- glib/gslice.c | 2 +-
- glib/gspawn-win32.c | 2 +-
- glib/gtimezone.c | 3 ++-
- glib/gwin32.c | 16 ++++++++--------
- 7 files changed, 18 insertions(+), 16 deletions(-)
-
-diff --git a/glib/gconvert.c b/glib/gconvert.c
-index c5857df1c..c1aded1ce 100644
---- a/glib/gconvert.c
-+++ b/glib/gconvert.c
-@@ -49,6 +49,7 @@
- #include "gthreadprivate.h"
- #include "gunicode.h"
- #include "gfileutils.h"
-+#include "genviron.h"
-
- #include "glibintl.h"
-
-@@ -1131,14 +1132,14 @@ g_get_filename_charsets (const gchar ***filename_charsets)
- if (!(cache->charset && strcmp (cache->charset, charset) == 0))
- {
- const gchar *new_charset;
-- gchar *p;
-+ const gchar *p;
- gint i;
-
- g_free (cache->charset);
- g_strfreev (cache->filename_charsets);
- cache->charset = g_strdup (charset);
-
-- p = getenv ("G_FILENAME_ENCODING");
-+ p = g_getenv ("G_FILENAME_ENCODING");
- if (p != NULL && p[0] != '\0')
- {
- cache->filename_charsets = g_strsplit (p, ",", 0);
-@@ -1154,7 +1155,7 @@ g_get_filename_charsets (const gchar ***filename_charsets)
- }
- }
- }
-- else if (getenv ("G_BROKEN_FILENAMES") != NULL)
-+ else if (g_getenv ("G_BROKEN_FILENAMES") != NULL)
- {
- cache->filename_charsets = g_new0 (gchar *, 2);
- cache->is_utf8 = g_get_charset (&new_charset);
-diff --git a/glib/giowin32.c b/glib/giowin32.c
-index 3e38e2a81..b0b6c3d85 100644
---- a/glib/giowin32.c
-+++ b/glib/giowin32.c
-@@ -263,7 +263,7 @@ condition_to_string (GIOCondition condition)
- static gboolean
- g_io_win32_get_debug_flag (void)
- {
-- return (getenv ("G_IO_WIN32_DEBUG") != NULL);
-+ return (g_getenv ("G_IO_WIN32_DEBUG") != NULL);
- }
-
- static void
-diff --git a/glib/gmain.c b/glib/gmain.c
-index b1df470e1..a515450e0 100644
---- a/glib/gmain.c
-+++ b/glib/gmain.c
-@@ -648,7 +648,7 @@ g_main_context_new (void)
- if (g_once_init_enter (&initialised))
- {
- #ifdef G_MAIN_POLL_DEBUG
-- if (getenv ("G_MAIN_POLL_DEBUG") != NULL)
-+ if (g_getenv ("G_MAIN_POLL_DEBUG") != NULL)
- _g_main_poll_debug = TRUE;
- #endif
-
-diff --git a/glib/gslice.c b/glib/gslice.c
-index 4c758c3be..258bd2aea 100644
---- a/glib/gslice.c
-+++ b/glib/gslice.c
-@@ -363,7 +363,7 @@ slice_config_init (SliceConfig *config)
-
- *config = slice_config;
-
-- val = getenv ("G_SLICE");
-+ val = g_getenv ("G_SLICE");
- if (val != NULL)
- {
- gint flags;
-diff --git a/glib/gspawn-win32.c b/glib/gspawn-win32.c
-index c1b024c03..1b79606f7 100644
---- a/glib/gspawn-win32.c
-+++ b/glib/gspawn-win32.c
-@@ -72,7 +72,7 @@
- { \
- if (debug == -1) \
- { \
-- if (getenv ("G_SPAWN_WIN32_DEBUG") != NULL) \
-+ if (g_getenv ("G_SPAWN_WIN32_DEBUG") != NULL) \
- debug = 1; \
- else \
- debug = 0; \
-diff --git a/glib/gtimezone.c b/glib/gtimezone.c
-index e3fec1bb8..1829719a7 100644
---- a/glib/gtimezone.c
-+++ b/glib/gtimezone.c
-@@ -37,6 +37,7 @@
- #include "gslice.h"
- #include "gdatetime.h"
- #include "gdate.h"
-+#include "genviron.h"
-
- #ifdef G_OS_WIN32
-
-@@ -414,7 +415,7 @@ zone_info_unix (const gchar *identifier,
- gchar *resolved_identifier = NULL;
- const gchar *tzdir;
-
-- tzdir = getenv ("TZDIR");
-+ tzdir = g_getenv ("TZDIR");
- if (tzdir == NULL)
- tzdir = "/usr/share/zoneinfo";
-
-diff --git a/glib/gwin32.c b/glib/gwin32.c
-index 2f2fe05a8..88fe9479f 100644
---- a/glib/gwin32.c
-+++ b/glib/gwin32.c
-@@ -109,7 +109,7 @@ g_win32_getlocale (void)
- {
- LCID lcid;
- LANGID langid;
-- gchar *ev;
-+ const gchar *ev;
- gint primary, sub;
- char iso639[10];
- char iso3166[10];
-@@ -120,9 +120,9 @@ g_win32_getlocale (void)
- * since GTK+ 2.10.7 setting either LC_ALL or LANG also sets the
- * Win32 locale and C library locale through code in gtkmain.c.
- */
-- if (((ev = getenv ("LC_ALL")) != NULL && ev[0] != '\0')
-- || ((ev = getenv ("LC_MESSAGES")) != NULL && ev[0] != '\0')
-- || ((ev = getenv ("LANG")) != NULL && ev[0] != '\0'))
-+ if (((ev = g_getenv ("LC_ALL")) != NULL && ev[0] != '\0')
-+ || ((ev = g_getenv ("LC_MESSAGES")) != NULL && ev[0] != '\0')
-+ || ((ev = g_getenv ("LANG")) != NULL && ev[0] != '\0'))
- return g_strdup (ev);
-
- lcid = GetThreadLocale ();
-@@ -1084,7 +1084,7 @@ g_win32_veh_handler (PEXCEPTION_POINTERS ExceptionInfo)
- case EXCEPTION_ILLEGAL_INSTRUCTION:
- break;
- default:
-- catch_list = getenv ("G_VEH_CATCH");
-+ catch_list = g_getenv ("G_VEH_CATCH");
-
- while (!catch &&
- catch_list != NULL &&
-@@ -1143,7 +1143,7 @@ g_win32_veh_handler (PEXCEPTION_POINTERS ExceptionInfo)
-
- fflush (stderr);
-
-- debugger_env = getenv ("G_DEBUGGER");
-+ debugger_env = g_getenv ("G_DEBUGGER");
-
- if (debugger_env == NULL)
- return EXCEPTION_CONTINUE_SEARCH;
-@@ -1173,7 +1173,7 @@ g_win32_veh_handler (PEXCEPTION_POINTERS ExceptionInfo)
- NULL,
- NULL,
- TRUE,
-- getenv ("G_DEBUGGER_OLD_CONSOLE") != NULL ? 0 : CREATE_NEW_CONSOLE,
-+ g_getenv ("G_DEBUGGER_OLD_CONSOLE") != NULL ? 0 : CREATE_NEW_CONSOLE,
- NULL,
- NULL,
- &si,
-@@ -1213,7 +1213,7 @@ g_crash_handler_win32_init (void)
- * break advanced exception handling such as in CLRs like C# or other managed
- * code. See: https://blogs.msdn.microsoft.com/jmstall/2006/05/24/beware-of-the-vectored-exception-handler-and-managed-code/
- */
-- if (getenv ("G_DEBUGGER") == NULL && getenv("G_VEH_CATCH") == NULL)
-+ if (g_getenv ("G_DEBUGGER") == NULL && g_getenv("G_VEH_CATCH") == NULL)
- return;
-
- WinVEH_handle = AddVectoredExceptionHandler (0, &g_win32_veh_handler);
---
-2.27.0.windows.1
-
diff --git a/recipes/glib/0001-gslice-Inline-win32-implementation-of-g_getenv-to-av.patch b/recipes/glib/0001-gslice-Inline-win32-implementation-of-g_getenv-to-av.patch
deleted file mode 100644
index c4920a87..00000000
--- a/recipes/glib/0001-gslice-Inline-win32-implementation-of-g_getenv-to-av.patch
+++ /dev/null
@@ -1,89 +0,0 @@
-From b538cb0c8c829ba76d4a04be0c198e5d3b7c311c Mon Sep 17 00:00:00 2001
-From: Philip Withnall <pwithnall@endlessos.org>
-Date: Thu, 15 Oct 2020 10:20:10 +0100
-Subject: [PATCH] gslice: Inline win32 implementation of g_getenv() to avoid
- deadlock
-
-The win32 implementation of `g_getenv()` uses GSlice (from within
-GQuark), which results in a deadlock when examining the `G_SLICE`
-environment variable.
-
-Fix that by inlining a basic implementation of `g_getenv()` at that call
-site.
-
-Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
-
-Fixes: #2225
----
- glib/gslice.c | 44 ++++++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 44 insertions(+)
-
-diff --git a/glib/gslice.c b/glib/gslice.c
-index e6f278539..589619080 100644
---- a/glib/gslice.c
-+++ b/glib/gslice.c
-@@ -361,10 +361,52 @@ static void
- slice_config_init (SliceConfig *config)
- {
- const gchar *val;
-+ gchar *val_allocated = NULL;
-
- *config = slice_config;
-
-+ /* Note that the empty string (`G_SLICE=""`) is treated differently from the
-+ * envvar being unset. In the latter case, we also check whether running under
-+ * valgrind. */
-+#ifndef G_OS_WIN32
- val = g_getenv ("G_SLICE");
-+#else
-+ /* The win32 implementation of g_getenv() has to do UTF-8 ↔ UTF-16 conversions
-+ * which use the slice allocator, leading to deadlock. Use a simple in-place
-+ * implementation here instead.
-+ *
-+ * Ignore references to other environment variables: only support values which
-+ * are a combination of always-malloc and debug-blocks. */
-+ {
-+
-+ wchar_t wvalue[128]; /* at least big enough for `always-malloc,debug-blocks` */
-+ int len;
-+
-+ len = GetEnvironmentVariableW (L"G_SLICE", wvalue, G_N_ELEMENTS (wvalue));
-+
-+ if (len == 0)
-+ {
-+ if (GetLastError () == ERROR_ENVVAR_NOT_FOUND)
-+ val = NULL;
-+ else
-+ val = "";
-+ }
-+ else if (len >= G_N_ELEMENTS (wvalue))
-+ {
-+ /* @wvalue isn’t big enough. Give up. */
-+ g_warning ("Unsupported G_SLICE value");
-+ val = NULL;
-+ }
-+ else
-+ {
-+ /* it’s safe to use g_utf16_to_utf8() here as it only allocates using
-+ * malloc() rather than GSlice */
-+ val = val_allocated = g_utf16_to_utf8 (wvalue, -1, NULL, NULL, NULL);
-+ }
-+
-+ }
-+#endif /* G_OS_WIN32 */
-+
- if (val != NULL)
- {
- gint flags;
-@@ -392,6 +434,8 @@ slice_config_init (SliceConfig *config)
- config->always_malloc = TRUE;
- #endif
- }
-+
-+ g_free (val_allocated);
- }
-
- static void
---
-2.25.1
-
diff --git a/recipes/glib/0001-gthread-win32-Use-SetThreadDescription-Win32-API-for.patch b/recipes/glib/0001-gthread-win32-Use-SetThreadDescription-Win32-API-for.patch
deleted file mode 100644
index 0b64e063..00000000
--- a/recipes/glib/0001-gthread-win32-Use-SetThreadDescription-Win32-API-for.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-From 2fd36c88b86173e4ee577009c81eaf83d7ff2d16 Mon Sep 17 00:00:00 2001
-From: Seungha Yang <seungha@centricular.com>
-Date: Fri, 15 Jan 2021 01:21:51 +0900
-Subject: [PATCH] gthread-win32: Use SetThreadDescription Win32 API for setting
- thread name
-
-Since Windows 10 1607, we can make use of SetThreadDescription() API
-for setting thread name. Unlike previously used exception based
-method, this API will preserve configured thread name on dump file.
----
- glib/gthread-win32.c | 54 +++++++++++++++++++++++++++++++++++++++++++-
- 1 file changed, 53 insertions(+), 1 deletion(-)
-
-diff --git a/glib/gthread-win32.c b/glib/gthread-win32.c
-index 89df0da..8164835 100644
---- a/glib/gthread-win32.c
-+++ b/glib/gthread-win32.c
-@@ -536,10 +536,62 @@ SetThreadName (DWORD dwThreadID,
- #endif
- }
-
-+typedef HRESULT (WINAPI *pSetThreadDescription) (HANDLE hThread,
-+ PCWSTR lpThreadDescription);
-+static pSetThreadDescription SetThreadDescriptionFunc = NULL;
-+HMODULE kernel32_module = NULL;
-+
-+static gboolean
-+g_thread_win32_load_library (void)
-+{
-+ /* FIXME: Add support for UWP app */
-+#if !defined(G_WINAPI_ONLY_APP)
-+ static volatile gsize _init_once = 0;
-+ if (g_once_init_enter (&_init_once))
-+ {
-+ kernel32_module = LoadLibraryW (L"kernel32.dll");
-+ if (kernel32_module)
-+ {
-+ SetThreadDescriptionFunc =
-+ (pSetThreadDescription) GetProcAddress (kernel32_module,
-+ "SetThreadDescription");
-+ if (!SetThreadDescriptionFunc)
-+ FreeLibrary (kernel32_module);
-+ }
-+ g_once_init_leave (&_init_once, 1);
-+ }
-+#endif
-+
-+ return !!SetThreadDescriptionFunc;
-+}
-+
-+static gboolean
-+g_thread_win32_set_thread_desc (const gchar *name)
-+{
-+ HRESULT hr;
-+ wchar_t *namew;
-+
-+ if (!g_thread_win32_load_library () || !name)
-+ return FALSE;
-+
-+ namew = g_utf8_to_utf16 (name, -1, NULL, NULL, NULL);
-+ if (!namew)
-+ return FALSE;
-+
-+ hr = SetThreadDescriptionFunc (GetCurrentThread (), namew);
-+
-+ g_free (namew);
-+ return SUCCEEDED (hr);
-+}
-+
- void
- g_system_thread_set_name (const gchar *name)
- {
-- SetThreadName ((DWORD) -1, name);
-+ /* Prefer SetThreadDescription over exception based way if available,
-+ * since thread description set by SetThreadDescription will be preserved
-+ * in dump file */
-+ if (!g_thread_win32_set_thread_desc (name))
-+ SetThreadName ((DWORD) -1, name);
- }
-
- /* {{{1 Epilogue */
---
-2.29.2
-
diff --git a/recipes/glib/0001-macos-fix-frexpl-checks-in-cross-compilation.patch b/recipes/glib/0001-macos-fix-frexpl-checks-in-cross-compilation.patch
deleted file mode 100644
index b2548f6d..00000000
--- a/recipes/glib/0001-macos-fix-frexpl-checks-in-cross-compilation.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 64dda3ad87af85c657389ce69ec49204175d8332 Mon Sep 17 00:00:00 2001
-From: Andoni Morales Alastruey <ylatuya@gmail.com>
-Date: Tue, 24 Nov 2020 13:05:17 +0000
-Subject: [PATCH] macos: fix frexpl checks in cross-compilation
-
-Cross-compilation to arm64 for Apple Silicon is not possible
-due to the hardcoded settings for frexpl.
-See: #1868
----
- glib/gnulib/gl_cv_func_frexpl_works/meson.build | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/glib/gnulib/gl_cv_func_frexpl_works/meson.build b/glib/gnulib/gl_cv_func_frexpl_works/meson.build
-index 303ec63d7..50e614e89 100644
---- a/glib/gnulib/gl_cv_func_frexpl_works/meson.build
-+++ b/glib/gnulib/gl_cv_func_frexpl_works/meson.build
-@@ -120,7 +120,6 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
- else
- if (host_system.startswith ('aix') or
- host_system.startswith ('beos') or
-- host_system.startswith ('darwin') or
- host_system.startswith ('irix'))
- gl_cv_func_frexpl_works = false
- gl_cv_func_frexpl_broken_beyond_repair = true
---
-2.23.0
-
diff --git a/recipes/glib/0001-macros-Define-G_GNUC_FALLTHROUGH-for-more-compilers.patch b/recipes/glib/0001-macros-Define-G_GNUC_FALLTHROUGH-for-more-compilers.patch
deleted file mode 100644
index 0691341c..00000000
--- a/recipes/glib/0001-macros-Define-G_GNUC_FALLTHROUGH-for-more-compilers.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 5f38ae5ffca3213addc5b279a46d537792d031db Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Timm=20B=C3=A4der?= <mail@baedert.org>
-Date: Fri, 28 Feb 2020 08:59:23 +0100
-Subject: [PATCH] macros: Define G_GNUC_FALLTHROUGH for more compilers
-
-Some compilers have __GNUC__ defined as a value less than 6, but do
-support implicit-fallthrough via __attribute__((fallthrough)). Define
-G_GNUC_FALLTHROUGH for those that support __has_attribute.
----
- glib/gmacros.h | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/glib/gmacros.h b/glib/gmacros.h
-index 1f4d779be..fb14aa81a 100644
---- a/glib/gmacros.h
-+++ b/glib/gmacros.h
-@@ -532,7 +532,7 @@
- /**
- * G_GNUC_FALLTHROUGH:
- *
-- * Expands to the GNU C `fallthrough` statement attribute if the compiler is gcc.
-+ * Expands to the GNU C `fallthrough` statement attribute if the compiler supports it.
- * This allows declaring case statement to explicitly fall through in switch
- * statements. To enable this feature, use `-Wimplicit-fallthrough` during
- * compilation.
-@@ -559,6 +559,8 @@
- */
- #if __GNUC__ > 6
- #define G_GNUC_FALLTHROUGH __attribute__((fallthrough))
-+#elif g_macro__has_attribute (fallthrough)
-+#define G_GNUC_FALLTHROUGH __attribute__((fallthrough))
- #else
- #define G_GNUC_FALLTHROUGH
- #endif /* __GNUC__ */
---
-2.31.0
-
diff --git a/recipes/glib/0001-meson-Don-t-use-assert-in-test-code.patch b/recipes/glib/0001-meson-Don-t-use-assert-in-test-code.patch
deleted file mode 100644
index 36398737..00000000
--- a/recipes/glib/0001-meson-Don-t-use-assert-in-test-code.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From 2744d7921dd1a1851113eaa12297404f5f523439 Mon Sep 17 00:00:00 2001
-From: Seungha Yang <seungha@centricular.com>
-Date: Sun, 8 Mar 2020 15:39:23 +0900
-Subject: [PATCH] meson: Don't use assert in test code
-
-The test code can be built on Windows using Cygwin or MSYS2.
-Even though it's test code, it might bring assertion dialog box
-for native Windows while meson configure.
----
- meson.build | 20 +++++++++++++-------
- 1 file changed, 13 insertions(+), 7 deletions(-)
-
-diff --git a/meson.build b/meson.build
-index f837465b4..36be4ab05 100644
---- a/meson.build
-+++ b/meson.build
-@@ -2013,8 +2013,6 @@ cmdline_test_code = '''
- #include <sys/stat.h>
- #include <stdio.h>
- #include <stdlib.h>
--#undef NDEBUG
--#include <assert.h>
-
- static int
- __getcmdline (void)
-@@ -2028,16 +2026,24 @@ __getcmdline (void)
- struct stat stat_buf;
-
- int fd = open ("/proc/self/cmdline", O_RDONLY|O_BINARY);
-- assert (fd >= 0);
-- assert (fstat (fd, &stat_buf) == 0);
-+ if (fd < 0)
-+ exit (1);
-+ if (fstat (fd, &stat_buf))
-+ exit (1);
-
- if (stat_buf.st_size > 0 && S_ISREG (stat_buf.st_mode))
-- assert (read (fd, result, BUFSIZE) > 0);
-+ {
-+ if (read (fd, result, BUFSIZE) <= 0)
-+ exit (1);
-+ }
- else
- {
- FILE *f = fdopen (fd, "r");
-- assert (f != NULL);
-- assert (fread (result, 1, BUFSIZE, f) > 0);
-+ if (f == NULL)
-+ exit (1);
-+
-+ if (fread (result, 1, BUFSIZE, f) <= 0)
-+ exit (1);
- }
-
- return 0;
---
-2.17.1
-
diff --git a/recipes/glib/0001-meson-Fix-gnulib-printf-checks.patch b/recipes/glib/0001-meson-Fix-gnulib-printf-checks.patch
deleted file mode 100644
index 3d978941..00000000
--- a/recipes/glib/0001-meson-Fix-gnulib-printf-checks.patch
+++ /dev/null
@@ -1,83 +0,0 @@
-From dade900c537bcdc54910a679c25368573f0e8c61 Mon Sep 17 00:00:00 2001
-From: Nirbheek Chauhan <nirbheek@centricular.com>
-Date: Mon, 8 Jun 2020 18:43:04 +0530
-Subject: [PATCH] meson: Fix gnulib printf checks
-
-Some typos, and accidental usage of the strings `'true'` / `'false'`
-instead of the booleans `true` / `false`.
----
- .../meson.build | 20 +++++++++----------
- glib/meson.build | 2 +-
- 2 files changed, 10 insertions(+), 12 deletions(-)
-
-diff --git a/glib/gnulib/gl_cv_func_printf_infinite_long_double/meson.build b/glib/gnulib/gl_cv_func_printf_infinite_long_double/meson.build
-index b7a714c..509e781 100644
---- a/glib/gnulib/gl_cv_func_printf_infinite_long_double/meson.build
-+++ b/glib/gnulib/gl_cv_func_printf_infinite_long_double/meson.build
-@@ -170,41 +170,39 @@ if gl_cv_func_printf_long_double
- if not meson.is_cross_build() or meson.has_exe_wrapper()
- run_result = cc.run(printf_infinite_long_double_test,
- name : 'printf supports infinite \'long double\' arguments')
-- gl_cv_func_printf_infinite_long_double = (run_result.compiled() and run_result.returncode() == 0) ? 'true' : 'false'
-+ gl_cv_func_printf_infinite_long_double = (run_result.compiled() and run_result.returncode() == 0)
- else
- if host_machine.cpu_family() == 'x86_64'
-- gl_cv_func_printf_infinite_long_double = 'false'
-+ gl_cv_func_printf_infinite_long_double = false
- else
- if host_system == 'linux'
-- gl_cv_func_printf_infinite_long_double = 'true'
-+ gl_cv_func_printf_infinite_long_double = true
- elif (host_system.startswith ('freebsd1') or
- host_system.startswith ('freebsd2') or
- host_system.startswith ('freebsd3') or
- host_system.startswith ('freebsd4') or
- host_system.startswith ('freebsd5'))
-- gl_cv_func_printf_infinite_long_double = 'false'
-+ gl_cv_func_printf_infinite_long_double = false
- elif (host_system.startswith ('freebsd') or
- host_system.startswith ('kfreebsd'))
-- gl_cv_func_printf_infinite_long_double = 'true'
-+ gl_cv_func_printf_infinite_long_double = true
- elif (host_system.startswith ('hpux7') or
- host_system.startswith ('hpux8') or
- host_system.startswith ('hpux9') or
- host_system.startswith ('hpux10'))
- gl_cv_func_printf_infinite = false
- elif host_system.startswith ('hpux')
-- gl_cv_func_printf_infinite_long_double = 'true'
-+ gl_cv_func_printf_infinite_long_double = true
- elif host_system == 'windows'
- # Guess yes on MSVC, no on mingw.
- if cc.get_id() == 'msvc' or cc.get_id() == 'clang-cl'
-- gl_cv_func_printf_infinite = 'true'
-+ gl_cv_func_printf_infinite_long_double = true
- else
-- gl_cv_func_printf_infinite = 'false'
-+ gl_cv_func_printf_infinite_long_double = false
- endif
- else
-- gl_cv_func_printf_infinite_long_double = 'false'
-+ gl_cv_func_printf_infinite_long_double = false
- endif
- endif
- endif
--else
-- gl_cv_func_printf_infinite_long_double = 'irrelevant'
- endif
-diff --git a/glib/meson.build b/glib/meson.build
-index ef96772..914089c 100644
---- a/glib/meson.build
-+++ b/glib/meson.build
-@@ -99,7 +99,7 @@ else
- glib_conf.set('NEED_PRINTF_INFINITE_DOUBLE', 1)
- endif
-
-- if gl_cv_func_printf_long_double and gl_cv_func_printf_infinite_long_double != 'false'
-+ if gl_cv_func_printf_long_double and gl_cv_func_printf_infinite_long_double
- glib_conf.set('NEED_PRINTF_INFINITE_LONG_DOUBLE', 1)
- endif
-
---
-2.27.0.windows.1
-
diff --git a/recipes/glib/0001-meson-fix-buildtype-args-and-vscrt-usage.patch b/recipes/glib/0001-meson-fix-buildtype-args-and-vscrt-usage.patch
deleted file mode 100644
index 54a1225b..00000000
--- a/recipes/glib/0001-meson-fix-buildtype-args-and-vscrt-usage.patch
+++ /dev/null
@@ -1,105 +0,0 @@
-From e7cfe62e7383c332355fc71ff0f63d23c8149d60 Mon Sep 17 00:00:00 2001
-From: Nirbheek Chauhan <nirbheek@centricular.com>
-Date: Thu, 5 Mar 2020 00:36:50 +0530
-Subject: [PATCH 1/2] meson: Fix check for builtype arguments
-
-`get_option('buildtype')` will return `'custom'` for most combinations
-of `-Doptimization` and `-Ddebug`, but those two will always be set
-correctly if only `-Dbuildtype` is set. So we should look at those
-options directly.
-
-For the two-way mapping between `buildtype` and `optimization`
-+ `debug`, see this table:
-https://mesonbuild.com/Builtin-options.html#build-type-options
----
- meson.build | 8 ++++++--
- 1 file changed, 6 insertions(+), 2 deletions(-)
-
-diff --git a/meson.build b/meson.build
-index 36be4ab05..ab4d487ba 100644
---- a/meson.build
-+++ b/meson.build
-@@ -214,11 +214,15 @@ glibconfig_conf.set('glib_os', glib_os)
- # for dependencies that don't normally come with pkg-config files for Visual Studio builds
- buildtype = get_option('buildtype')
-
-+# Use debug/optimization flags to determine whether to enable debug or disable
-+# cast checks
- glib_debug_cflags = []
--if buildtype.startswith('debug')
-+if get_option('debug')
- glib_debug_cflags += ['-DG_ENABLE_DEBUG']
--elif buildtype == 'release'
-+ message('Enabling various debug infrastructure')
-+elif get_option('optimization') in ['2', '3', 's']
- glib_debug_cflags += ['-DG_DISABLE_CAST_CHECKS']
-+ message('Disabling cast checks')
- endif
-
- add_project_arguments(glib_debug_cflags, language: 'c')
---
-2.26.0
-
-
-From b462e2c80ce77b7edc4a90b20a14c8bf1d9f5492 Mon Sep 17 00:00:00 2001
-From: Nirbheek Chauhan <nirbheek@centricular.com>
-Date: Thu, 12 Mar 2020 17:42:27 +0530
-Subject: [PATCH 2/2] meson: Use the b_vscrt option for selecting the CRT
-
-This option has been available since 0.48, and we should use it
-instead of only guessing based on buildtype.
----
- gio/tests/meson.build | 2 +-
- meson.build | 16 ++++++++++++----
- 2 files changed, 13 insertions(+), 5 deletions(-)
-
-diff --git a/gio/tests/meson.build b/gio/tests/meson.build
-index 788cf978b..755033be8 100644
---- a/gio/tests/meson.build
-+++ b/gio/tests/meson.build
-@@ -105,7 +105,7 @@ if not dbus1_dep.found()
- # MSVC: Search for the DBus library by the configuration, which corresponds
- # to the output of CMake builds of DBus. Note that debugoptimized
- # is really a Release build with .PDB files.
-- if buildtype == 'debug'
-+ if vs_crt == 'debug'
- dbus1_dep = cc.find_library('dbus-1d', required : false)
- else
- dbus1_dep = cc.find_library('dbus-1', required : false)
-diff --git a/meson.build b/meson.build
-index ab4d487ba..1e3ba4d38 100644
---- a/meson.build
-+++ b/meson.build
-@@ -210,9 +210,17 @@ else
- endif
- glibconfig_conf.set('glib_os', glib_os)
-
--# We need to know the build type to determine what .lib files we need on Visual Studio
--# for dependencies that don't normally come with pkg-config files for Visual Studio builds
--buildtype = get_option('buildtype')
-+# We need to know the CRT being used to determine what .lib files we need on
-+# Visual Studio for dependencies that don't normally come with pkg-config files
-+vs_crt = 'release'
-+vs_crt_opt = get_option('b_vscrt')
-+if vs_crt_opt in ['mdd', 'mtd']
-+ vs_crt = 'debug'
-+elif vs_crt_opt == 'from_buildtype'
-+ if get_option('buildtype') == 'debug'
-+ vs_crt = 'debug'
-+ endif
-+endif
-
- # Use debug/optimization flags to determine whether to enable debug or disable
- # cast checks
-@@ -1852,7 +1860,7 @@ else
- # MSVC: Search for the PCRE library by the configuration, which corresponds
- # to the output of CMake builds of PCRE. Note that debugoptimized
- # is really a Release build with .PDB files.
-- if buildtype == 'debug'
-+ if vs_crt == 'debug'
- pcre = cc.find_library('pcred', required : false)
- else
- pcre = cc.find_library('pcre', required : false)
---
-2.26.0
-
diff --git a/recipes/glib/0001-meson-host_system-can-be-ios-when-cross-compiling.patch b/recipes/glib/0001-meson-host_system-can-be-ios-when-cross-compiling.patch
deleted file mode 100644
index 5ef2dd21..00000000
--- a/recipes/glib/0001-meson-host_system-can-be-ios-when-cross-compiling.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From c6af3c774973594a34b97e7ac6ed2feb064b8d3e Mon Sep 17 00:00:00 2001
-From: Nirbheek Chauhan <nirbheek@centricular.com>
-Date: Fri, 29 May 2020 00:31:35 +0530
-Subject: [PATCH 1/3] meson: host_system can be ios when cross-compiling
-
-Cross-compile system names aren't standardized in Meson yet[1], but we
-already use this name in `tests/meson.build`, so use it here too for
-consistency.
-
-1. https://mesonbuild.com/Reference-tables.html#operating-system-names
----
- meson.build | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/meson.build b/meson.build
-index 00f767ef9..f9fb01e20 100644
---- a/meson.build
-+++ b/meson.build
-@@ -2142,7 +2142,7 @@ if host_system == 'windows'
- export_dynamic_ldflags = []
- elif host_system == 'cygwin'
- export_dynamic_ldflags = ['-Wl,--export-all-symbols']
--elif host_system == 'darwin'
-+elif host_system in ['darwin', 'ios']
- export_dynamic_ldflags = []
- elif host_system == 'sunos'
- export_dynamic_ldflags = []
---
-2.26.2
-
diff --git a/recipes/glib/0002-meson-Autodetect-when-building-for-iOS.patch b/recipes/glib/0002-meson-Autodetect-when-building-for-iOS.patch
deleted file mode 100644
index 12e900b4..00000000
--- a/recipes/glib/0002-meson-Autodetect-when-building-for-iOS.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 3c78d0cec68740231d6d2baac64f9a3584f67ee1 Mon Sep 17 00:00:00 2001
-From: Nirbheek Chauhan <nirbheek@centricular.com>
-Date: Fri, 29 May 2020 00:31:35 +0530
-Subject: [PATCH 2/3] meson: Autodetect when building for iOS
-
-Instead of relying on `system` to be set correctly in the
-cross-compile file, detect when we're building for iOS/watchOS/tvOS.
----
- meson.build | 10 ++++++++++
- 1 file changed, 10 insertions(+)
-
-diff --git a/meson.build b/meson.build
-index f9fb01e20..51554ef62 100644
---- a/meson.build
-+++ b/meson.build
-@@ -33,6 +33,16 @@ endif
-
- host_system = host_machine.system()
-
-+if host_system == 'darwin'
-+ ios_test_code = '''#include <TargetConditionals.h>
-+ #if ! TARGET_OS_IPHONE
-+ #error "Not iOS/tvOS/watchOS/iPhoneSimulator"
-+ #endif'''
-+ if cc.compiles(ios_test_code, name : 'building for iOS')
-+ host_system = 'ios'
-+ endif
-+endif
-+
- glib_version = meson.project_version()
- glib_api_version = '2.0'
- version_arr = glib_version.split('.')
---
-2.26.2
-
diff --git a/recipes/glib/0003-meson-Only-look-for-_NSGetEnviron-when-building-for-.patch b/recipes/glib/0003-meson-Only-look-for-_NSGetEnviron-when-building-for-.patch
deleted file mode 100644
index e4fdfbd7..00000000
--- a/recipes/glib/0003-meson-Only-look-for-_NSGetEnviron-when-building-for-.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From a28b52d7db5f60e96c7c7f5ff0c42e9661e5e32a Mon Sep 17 00:00:00 2001
-From: Nirbheek Chauhan <nirbheek@centricular.com>
-Date: Fri, 29 May 2020 00:31:35 +0530
-Subject: [PATCH 3/3] meson: Only look for _NSGetEnviron when building for
- macOS
-
-On iOS it can cause build failures with some SDK versions, and its
-usage will also cause the app to be rejected on submission.
----
- meson.build | 7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/meson.build b/meson.build
-index 51554ef62..f51daf6b3 100644
---- a/meson.build
-+++ b/meson.build
-@@ -512,9 +512,14 @@ functions = [
- 'wcslen',
- 'wcsnlen',
- 'sysctlbyname',
-- '_NSGetEnviron',
- ]
-
-+# _NSGetEnviron is available on iOS too, but its usage gets apps rejected from
-+# the app store since it's considered 'private API'
-+if host_system == 'darwin'
-+ functions += ['_NSGetEnviron']
-+endif
-+
- if glib_conf.has('HAVE_SYS_STATVFS_H')
- functions += ['statvfs']
- else
---
-2.26.2
-