changeset 4844:aed7b7a97932

Functions were declared that are only used in specific situations. Move a code block up a bit and #ifdef appropriately.
author Tony Vroon <chainsaw@gentoo.org>
date Mon, 13 Apr 2009 00:19:52 +0100
parents ca837b93ad0f
children abb51251594d
files src/audlegacy/signals.c
diffstat 1 files changed, 17 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/src/audlegacy/signals.c	Fri Apr 10 20:02:45 2009 -0400
+++ b/src/audlegacy/signals.c	Mon Apr 13 00:19:52 2009 +0100
@@ -225,6 +225,7 @@
 
 #endif
 
+#if (!defined(HAVE_SIGNALFD) || !defined(HAVE_SYS_SIGNALFD_H))
 static SignalHandler
 signal_install_handler_full (gint           signal_number,
                              SignalHandler  handler,
@@ -267,6 +268,22 @@
     return signal_install_handler_full (signal_number, handler, NULL, 0);
 }
 
+static gboolean
+signal_check_for_broken_impl(void)
+{
+#ifdef _CS_GNU_LIBPTHREAD_VERSION
+    {
+        gchar str[1024];
+        confstr(_CS_GNU_LIBPTHREAD_VERSION, str, sizeof(str));
+
+        if (g_ascii_strncasecmp("linuxthreads", str, 12) == 0)
+            return TRUE;
+    }
+#endif
+
+    return FALSE;
+}
+#endif
 
 /* sets up blocking signals for pthreads.
  * linuxthreads sucks and needs this to make sigwait(2) work
@@ -290,22 +307,6 @@
         g_print("pthread_sigmask() failed.\n");
 }
 
-static gboolean
-signal_check_for_broken_impl(void)
-{
-#ifdef _CS_GNU_LIBPTHREAD_VERSION
-    {
-        gchar str[1024];
-        confstr(_CS_GNU_LIBPTHREAD_VERSION, str, sizeof(str));
-
-        if (g_ascii_strncasecmp("linuxthreads", str, 12) == 0)
-            return TRUE;
-    }
-#endif
-
-    return FALSE;
-}
-
 #ifdef USE_EGGSM
 static void
 signal_session_quit_cb(EggSMClient *client, gpointer user_data)