diff options
author | 2023-04-01 20:27:12 -0400 | |
---|---|---|
committer | 2023-04-01 20:56:45 -0400 | |
commit | fb1425d22b02df8435b8c0e49a695e9f4b5e38d0 (patch) | |
tree | ebd53f335cb791014beba9305f3ef36ca84d49ab /dev-libs/glib/files | |
parent | dev-libs/gjs: Drop old versions (diff) | |
download | gentoo-fb1425d22b02df8435b8c0e49a695e9f4b5e38d0.tar.gz gentoo-fb1425d22b02df8435b8c0e49a695e9f4b5e38d0.tar.bz2 gentoo-fb1425d22b02df8435b8c0e49a695e9f4b5e38d0.zip |
dev-libs/glib: Drop old versions
Signed-off-by: Matt Turner <mattst88@gentoo.org>
Diffstat (limited to 'dev-libs/glib/files')
-rw-r--r-- | dev-libs/glib/files/glib-2.74.5-tests-Skip-assert-msg-test.py-if-gdb-fails.patch | 33 | ||||
-rw-r--r-- | dev-libs/glib/files/glib-2.76.0-g_strdup-c++.patch | 132 |
2 files changed, 0 insertions, 165 deletions
diff --git a/dev-libs/glib/files/glib-2.74.5-tests-Skip-assert-msg-test.py-if-gdb-fails.patch b/dev-libs/glib/files/glib-2.74.5-tests-Skip-assert-msg-test.py-if-gdb-fails.patch deleted file mode 100644 index ed8fc97b3992..000000000000 --- a/dev-libs/glib/files/glib-2.74.5-tests-Skip-assert-msg-test.py-if-gdb-fails.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 19a8df9d8bff279a55b0fa3bb7ba4fbf7fcbefa8 Mon Sep 17 00:00:00 2001 -From: Matt Turner <mattst88@gmail.com> -Date: Thu, 2 Mar 2023 00:13:22 -0500 -Subject: [PATCH] tests: Skip assert-msg-test.py if gdb fails - -Similar to commit 6e44151bf74d, skip the test if gdb is unable to read -/proc/PID/mem, which gdb does as a fallback if ptrace is unavailable. - -This allows the test to skip when run under Gentoo's sandbox. ---- - glib/tests/assert-msg-test.py | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/glib/tests/assert-msg-test.py b/glib/tests/assert-msg-test.py -index 4936fa083..33aa2249e 100755 ---- a/glib/tests/assert-msg-test.py -+++ b/glib/tests/assert-msg-test.py -@@ -158,9 +158,9 @@ class TestAssertMessage(unittest.TestCase): - - # Some CI environments disable ptrace (as they’re running in a - # container). If so, skip the test as there’s nothing we can do. -- if ( -- result.info.returncode != 0 -- and "ptrace: Operation not permitted" in result.err -+ if result.info.returncode != 0 and ( -+ "ptrace: Operation not permitted" in result.err -+ or "warning: opening /proc/PID/mem file for lwp" in result.err - ): - self.skipTest("GDB is not functional due to ptrace being disabled") - --- -2.39.2 - diff --git a/dev-libs/glib/files/glib-2.76.0-g_strdup-c++.patch b/dev-libs/glib/files/glib-2.76.0-g_strdup-c++.patch deleted file mode 100644 index 23b0a1b641c1..000000000000 --- a/dev-libs/glib/files/glib-2.76.0-g_strdup-c++.patch +++ /dev/null @@ -1,132 +0,0 @@ -https://bugs.gentoo.org/901035 -https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3322 -https://gitlab.gnome.org/GNOME/glib/-/commit/cc7f2f81cc59751fcc689731dcd60af5da5723ba - -From cc7f2f81cc59751fcc689731dcd60af5da5723ba Mon Sep 17 00:00:00 2001 -From: Xi Ruoyao <xry111@xry111.site> -Date: Mon, 13 Mar 2023 16:23:37 +0800 -Subject: [PATCH] gstrfuncs: Improve inline version of g_strdup() to avoid - breaking C++ code - -Wrap the logic into a G_ALWAYS_INLINE function, instead of using a -complex statement-expression which is not allowed in braced initializer -lists and expanded into some bad thing when it's used as -`::g_strdup(...)`. - -We cannot use `__builtin_constant_p (str)` because GCC documentation -clearly states that it always produces 0 when str is a const char * -argument of an inline function. But `__builtin_constant_p (!str)`, -`__builtin_constant_p (!!str)`, and -`__builtin_constant_p (strlen (str))` functions properly with `-O1` or -above enabled. - -Fixes #2936. ---- a/glib/gstrfuncs.h -+++ b/glib/gstrfuncs.h -@@ -204,23 +204,6 @@ gboolean (g_str_has_prefix) (const gchar *str, - (g_str_has_suffix) (STR, SUFFIX) \ - ) - --#define g_strdup(STR) \ -- (__builtin_constant_p ((STR)) ? \ -- (G_LIKELY ((STR) != NULL) ? \ -- G_GNUC_EXTENSION ({ \ -- const char *const ___str = ((STR)); \ -- const char *const __str = _G_STR_NONNULL (___str); \ -- const size_t __str_len = strlen (__str) + 1; \ -- char *__dup_str = (char *) g_malloc (__str_len); \ -- (char *) memcpy (__dup_str, __str, __str_len); \ -- }) \ -- : \ -- (char *) (NULL) \ -- ) \ -- : \ -- (g_strdup) ((STR)) \ -- ) -- - #endif /* !defined (__GI_SCANNER__) */ - #endif /* !defined (__GTK_DOC_IGNORE__) */ - #endif /* G_GNUC_CHECK_VERSION (2, 0) */ -@@ -318,6 +301,32 @@ GLIB_AVAILABLE_IN_ALL - gchar* g_strjoin (const gchar *separator, - ...) G_GNUC_MALLOC G_GNUC_NULL_TERMINATED; - -+#if G_GNUC_CHECK_VERSION(2, 0) -+#ifndef __GTK_DOC_IGNORE__ -+#ifndef __GI_SCANNER__ -+ -+G_ALWAYS_INLINE static inline char * -+g_strdup_inline (const char *str) -+{ -+ if (__builtin_constant_p (!str) && !str) -+ return NULL; -+ -+ if (__builtin_constant_p (!!str) && !!str && __builtin_constant_p (strlen (str))) -+ { -+ const size_t len = strlen (str) + 1; -+ char *dup_str = (char *) g_malloc (len); -+ return (char *) memcpy (dup_str, str, len); -+ } -+ -+ return g_strdup (str); -+} -+ -+#define g_strdup(x) g_strdup_inline (x) -+ -+#endif /* !defined (__GI_SCANNER__) */ -+#endif /* !defined (__GTK_DOC_IGNORE__) */ -+#endif /* G_GNUC_CHECK_VERSION (2, 0) */ -+ - /* Make a copy of a string interpreting C string -style escape - * sequences. Inverse of g_strescape. The recognized sequences are \b - * \f \n \r \t \\ \" and the octal format. ---- a/glib/tests/cxx.cpp -+++ b/glib/tests/cxx.cpp -@@ -349,6 +349,36 @@ test_strdup_macro (void) - g_free (str); - } - -+static void -+test_strdup_macro_qualified (void) -+{ -+ gchar *str; -+ -+ g_assert_null (::g_strdup (NULL)); -+ -+ str = ::g_strdup ("C++ is cool too!"); -+ g_assert_nonnull (str); -+ g_assert_cmpstr (str, ==, "C++ is cool too!"); -+ g_free (str); -+} -+ -+static void -+test_strdup_macro_nested_initializer (void) -+{ -+ struct -+ { -+ char *p, *q; -+ } strings = { -+ g_strdup (NULL), -+ g_strdup ("C++ is cool too!"), -+ }; -+ -+ g_assert_null (strings.p); -+ g_assert_nonnull (strings.q); -+ g_assert_cmpstr (strings.q, ==, "C++ is cool too!"); -+ g_free (strings.q); -+} -+ - static void - test_str_has_prefix (void) - { -@@ -527,6 +557,8 @@ main (int argc, char *argv[]) - g_test_add_func ("/C++/str-equal", test_str_equal); - g_test_add_func ("/C++/strdup", test_strdup); - g_test_add_func ("/C++/strdup/macro", test_strdup_macro); -+ g_test_add_func ("/C++/strdup/macro/qualified", test_strdup_macro_qualified); -+ g_test_add_func ("/C++/strdup/macro/nested-initializer", test_strdup_macro_nested_initializer); - g_test_add_func ("/C++/str-has-prefix", test_str_has_prefix); - g_test_add_func ("/C++/str-has-prefix/macro", test_str_has_prefix_macro); - g_test_add_func ("/C++/str-has-suffix", test_str_has_suffix); --- -GitLab |