glib2/ppc-cast.patch

39 lines
1.7 KiB
Diff
Raw Normal View History

2007-07-13 01:54:21 +00:00
diff -up glib-2.13.7/glib/gthread.c.ppc-cast glib-2.13.7/glib/gthread.c
--- glib-2.13.7/glib/gthread.c.ppc-cast 2007-07-12 21:43:31.000000000 -0400
+++ glib-2.13.7/glib/gthread.c 2007-07-12 21:43:45.000000000 -0400
@@ -223,11 +223,11 @@ void
g_once_init_leave (volatile gsize *value_location,
gsize initialization_value)
{
- g_return_if_fail (g_atomic_pointer_get (value_location) == 0);
2007-07-13 02:24:09 +00:00
+ g_return_if_fail (g_atomic_pointer_get ((gpointer*) value_location) == 0);
2007-07-13 01:54:21 +00:00
g_return_if_fail (initialization_value != 0);
g_return_if_fail (g_once_init_list != NULL);
- g_atomic_pointer_set (value_location, initialization_value);
2007-07-13 02:24:09 +00:00
+ g_atomic_pointer_set ((gpointer*) value_location, (gpointer) initialization_value);
2007-07-13 01:54:21 +00:00
g_mutex_lock (g_once_mutex);
2007-07-13 02:24:09 +00:00
g_once_init_list = g_slist_remove (g_once_init_list, (gpointer*) value_location);
2007-07-13 01:54:21 +00:00
g_cond_broadcast (g_once_cond);
@@ -255,7 +255,7 @@ g_static_mutex_get_mutex_impl (GMutex**
g_mutex_lock (g_once_mutex);
if (!(*mutex))
- g_atomic_pointer_set (mutex, g_mutex_new());
2007-07-13 02:24:09 +00:00
+ g_atomic_pointer_set ((gpointer*) mutex, g_mutex_new());
2007-07-13 01:54:21 +00:00
g_mutex_unlock (g_once_mutex);
diff -up glib-2.13.7/glib/gthread.h.ppc-cast glib-2.13.7/glib/gthread.h
--- glib-2.13.7/glib/gthread.h.ppc-cast 2007-07-12 21:43:27.000000000 -0400
+++ glib-2.13.7/glib/gthread.h 2007-07-12 21:43:43.000000000 -0400
@@ -332,7 +332,7 @@ void g_once_init_leav
G_INLINE_FUNC gboolean
g_once_init_enter (volatile gsize *value_location)
{
- if G_LIKELY (g_atomic_pointer_get (value_location) !=0)
2007-07-13 02:24:09 +00:00
+ if G_LIKELY (g_atomic_pointer_get ((gpointer*) value_location) !=0)
2007-07-13 01:54:21 +00:00
return FALSE;
else
return g_once_init_enter_impl (value_location);