# HG changeset patch # User Tony Vroon # Date 1239578392 -3600 # Node ID aed7b7a97932787c3b7564de453f1fa091ce3d24 # Parent ca837b93ad0f487fdd56c2dd22dee87de7c2bd27 Functions were declared that are only used in specific situations. Move a code block up a bit and #ifdef appropriately. diff -r ca837b93ad0f -r aed7b7a97932 src/audlegacy/signals.c --- 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)