diff options
Diffstat (limited to 'pidgin/libpidgin.c')
-rw-r--r-- | pidgin/libpidgin.c | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/pidgin/libpidgin.c b/pidgin/libpidgin.c index a734118b0e..f9138b2342 100644 --- a/pidgin/libpidgin.c +++ b/pidgin/libpidgin.c @@ -70,15 +70,11 @@ #include "pidginstock.h" #include "gtkwhiteboard.h" -#ifdef HAVE_SIGNAL_H -# include <signal.h> -#endif +#include <signal.h> #include <getopt.h> -#ifdef HAVE_SIGNAL_H - /* * Lists of signals we wish to catch and those we wish to ignore. * Each list terminated with -1 @@ -96,7 +92,6 @@ static const int ignore_sig_list[] = { SIGPIPE, -1 }; -#endif static void dologin_named(const char *name) @@ -126,7 +121,6 @@ dologin_named(const char *name) } } -#ifdef HAVE_SIGNAL_H static char *segfault_message; static int signal_sockets[2]; @@ -195,7 +189,6 @@ mainloop_sighandler(GIOChannel *source, GIOCondition cond, gpointer data) return TRUE; } -#endif static int ui_main(void) @@ -434,7 +427,6 @@ int pidgin_start(int argc, char *argv[]) GtkCssProvider *provider; GdkScreen *screen; GList *accounts; -#ifdef HAVE_SIGNAL_H int sig_indx; /* for setting up signal catching */ sigset_t sigset; char errmsg[BUFSIZ]; @@ -445,7 +437,6 @@ int pidgin_start(int argc, char *argv[]) #ifndef DEBUG char *segfault_message_tmp; #endif /* DEBUG */ -#endif /* HAVE_SIGNAL_N */ int opt; gboolean gui_check; gboolean debug_enabled, debug_colored; @@ -485,8 +476,6 @@ int pidgin_start(int argc, char *argv[]) setlocale(LC_ALL, ""); #endif -#ifdef HAVE_SIGNAL_H - #ifndef DEBUG /* We translate this here in case the crash breaks gettext. */ segfault_message_tmp = g_strdup_printf(_( @@ -587,7 +576,6 @@ int pidgin_start(int argc, char *argv[]) snprintf(errmsg, sizeof(errmsg), "Warning: couldn't unblock signals"); perror(errmsg); } -#endif /* scan command-line options */ opterr = 1; @@ -640,9 +628,7 @@ int pidgin_start(int argc, char *argv[]) case '?': /* show terse help */ default: show_usage(argv[0], TRUE); -#ifdef HAVE_SIGNAL_H g_free(segfault_message); -#endif return 0; break; } @@ -651,18 +637,14 @@ int pidgin_start(int argc, char *argv[]) /* show help message */ if (opt_help) { show_usage(argv[0], FALSE); -#ifdef HAVE_SIGNAL_H g_free(segfault_message); -#endif return 0; } /* show version message */ if (opt_version) { printf("%s %s (libpurple %s)\n", PIDGIN_NAME, DISPLAY_VERSION, purple_core_get_version()); -#ifdef HAVE_SIGNAL_H g_free(segfault_message); -#endif return 0; } @@ -697,9 +679,7 @@ int pidgin_start(int argc, char *argv[]) printf("%s %s\n", PIDGIN_NAME, DISPLAY_VERSION); g_warning("cannot open display: %s", display ? display : "unset"); -#ifdef HAVE_SIGNAL_H g_free(segfault_message); -#endif return 1; } @@ -733,9 +713,7 @@ int pidgin_start(int argc, char *argv[]) fprintf(stderr, "Initialization of the libpurple core failed. Dumping core.\n" "Please report this!\n"); -#ifdef HAVE_SIGNAL_H g_free(segfault_message); -#endif abort(); } @@ -761,9 +739,7 @@ int pidgin_start(int argc, char *argv[]) gdk_notify_startup_complete(); purple_core_quit(); g_printerr(_("Exiting because another libpurple client is already running.\n")); -#ifdef HAVE_SIGNAL_H g_free(segfault_message); -#endif return 0; } @@ -848,12 +824,10 @@ int pidgin_start(int argc, char *argv[]) gtk_main(); -#ifdef HAVE_SIGNAL_H g_free(segfault_message); g_source_remove(signal_channel_watcher); close(signal_sockets[0]); close(signal_sockets[1]); -#endif #ifdef _WIN32 winpidgin_cleanup(); |