summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorSebastian Dröge <sdroege@src.gnome.org>2008-03-12 15:36:38 +0000
committerSebastian Dröge <sdroege@src.gnome.org>2008-03-12 15:36:38 +0000
commit0dc34bf29a1a5a9e2ef1000ba9ace7e2c2b1f5e0 (patch)
tree24b0a9966bce9b390c42b8caba5ab377a393f4c5 /configure.in
parent7de2454b0806cd1b204afa9ab5a055aac8270e61 (diff)
Bug 316221 - G_LOCK warns about breaking strict-aliasing rules
* configure.in: * glib/gthread.h: Prevent the compiler from warning about breaking strict-aliasing rules when using gcc 4.3 and G_LOCK on C sources. svn path=/trunk/; revision=6691
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in6
1 files changed, 6 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index e4c152108..22ac45565 100644
--- a/configure.in
+++ b/configure.in
@@ -2820,9 +2820,15 @@ struct _GStaticMutex
} static_mutex;
};
#define G_STATIC_MUTEX_INIT { NULL, { { $g_mutex_contents} } }
+#ifdef __cplusplus
#define g_static_mutex_get_mutex(mutex) \\
(g_thread_use_default_impl ? ((GMutex*) ((mutex)->static_mutex.pad)) : \\
g_static_mutex_get_mutex_impl_shortcut (&((mutex)->runtime_mutex)))
+#else
+#define g_static_mutex_get_mutex(mutex) \\
+ (g_thread_use_default_impl ? ((GMutex*) (void*) ((mutex)->static_mutex.pad)) : \\
+ g_static_mutex_get_mutex_impl_shortcut (&((mutex)->runtime_mutex)))
+#endif
_______EOF
else
cat >>$outfile <<_______EOF