From c3de1709e8f33a4fd3105a6e7cfc12e017968520 Mon Sep 17 00:00:00 2001 From: Daniel Williams Date: Mon, 14 Apr 2008 00:34:23 +0000 Subject: [PATCH] - Revert upstream changes to g_static_mutex_get_mutex_impl_shortcut that broke users of GMutex and GStaticMutex (bgo#316221) --- glib2.spec | 11 ++++++++++- revert-316221.patch | 18 ++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 revert-316221.patch diff --git a/glib2.spec b/glib2.spec index f805f40..f54b693 100644 --- a/glib2.spec +++ b/glib2.spec @@ -3,7 +3,7 @@ Summary: A library of handy utility functions Name: glib2 Version: 2.16.3 -Release: 2%{?dist} +Release: 3%{?dist} License: LGPLv2+ Group: System Environment/Libraries URL: http://www.gtk.org @@ -22,6 +22,10 @@ BuildRequires: glibc-devel # fix a possible crasher, http://bugzilla.gnome.org/show_bug.cgi?id=527132 Patch0: appinfo.patch +# revert a broken fix for http://bugzilla.gnome.org/show_bug.cgi?id=316221 +# committed on March 12, 2008 +Patch1: revert-316221.patch + %description GLib is the low-level core library that forms the basis for projects such as GTK+ and GNOME. It provides data structure @@ -54,6 +58,7 @@ of version 2 of the GLib library. %prep %setup -q -n glib-%{version} %patch0 -p1 -b .appinfo +%patch1 -R -p1 -b .revert-316221 %build %configure --disable-gtk-doc --enable-static @@ -126,6 +131,10 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/lib*.a %changelog +* Sun Apr 13 2008 Dan Williams - 2.16.3-3 +- Revert upstream changes to g_static_mutex_get_mutex_impl_shortcut that broke + users of GMutex and GStaticMutex (bgo#316221) + * Wed Apr 9 2008 Matthias Clasen - 2.16.3-2 - Fix a possible crash in application launching (bgo#527132) diff --git a/revert-316221.patch b/revert-316221.patch new file mode 100644 index 0000000..3355266 --- /dev/null +++ b/revert-316221.patch @@ -0,0 +1,18 @@ +--- trunk/glib/gthread.h 2007/10/21 17:01:29 5792 ++++ trunk/glib/gthread.h 2008/03/12 15:36:38 6691 +@@ -140,9 +140,15 @@ + /* internal function for fallback static mutex implementation */ + GMutex* g_static_mutex_get_mutex_impl (GMutex **mutex); + ++#ifdef __cplusplus + #define g_static_mutex_get_mutex_impl_shortcut(mutex) \ + (g_atomic_pointer_get ((gpointer*)(void*)mutex) ? *(mutex) : \ + g_static_mutex_get_mutex_impl (mutex)) ++#else ++#define g_static_mutex_get_mutex_impl_shortcut(mutex) \ ++ (g_atomic_pointer_get (mutex) ? *(mutex) : \ ++ g_static_mutex_get_mutex_impl (mutex)) ++#endif + + /* shorthands for conditional and unconditional function calls */ +