diff options
author | Elliott Sales de Andrade <qulogic@pidgin.im> | 2016-08-28 20:43:17 -0400 |
---|---|---|
committer | Elliott Sales de Andrade <qulogic@pidgin.im> | 2016-08-28 20:43:17 -0400 |
commit | c8b89aa5934bb6db3513a3789a4e69d27d7d810c (patch) | |
tree | 8389b8d293e655b876ed9abb647302f800024732 | |
parent | 94f490bc030c468e9e00cef7d4678849a1fcef9f (diff) | |
download | pidgin-c8b89aa5934bb6db3513a3789a4e69d27d7d810c.tar.gz |
Remove AC_HEADER_STDC and related C89 tests.
AC_HEADER_STDC is obsolescent because all current systems have
conforming header files. As we also claim to depend on C89, there's
no need to check for any headers defined in that standard.
-rw-r--r-- | config.h.mingw | 18 | ||||
-rw-r--r-- | configure.ac | 4 | ||||
-rw-r--r-- | finch/getopt.c | 2 | ||||
-rw-r--r-- | libpurple/protocols/zephyr/Zinternal.c | 14 | ||||
-rw-r--r-- | libpurple/protocols/zephyr/sysdep.h | 29 | ||||
-rw-r--r-- | libpurple/util.c | 2 | ||||
-rw-r--r-- | pidgin/getopt.c | 2 | ||||
-rw-r--r-- | pidgin/libpidgin.c | 28 | ||||
-rw-r--r-- | pidgin/plugins/musicmessaging/musicmessaging.c | 5 |
9 files changed, 4 insertions, 100 deletions
diff --git a/config.h.mingw b/config.h.mingw index 4a5b52b063..0072e7b394 100644 --- a/config.h.mingw +++ b/config.h.mingw @@ -150,9 +150,6 @@ /* Define to 1 if you have the `socket' library (-lsocket). */ /* #undef HAVE_LIBSOCKET */ -/* Define to 1 if you have the <locale.h> header file. */ -#define HAVE_LOCALE_H 1 - /* Define to 1 if you have the `lrand48' function. */ /* #define HAVE_LRAND48 1 */ @@ -222,9 +219,6 @@ /* Define to 1 if you have the <sgtty.h> header file. */ /* #define HAVE_SGTTY_H 1 */ -/* Define to 1 if you have the <signal.h> header file. */ -/* #define HAVE_SIGNAL_H 1 */ - /* Define if we have silcmime.h */ #define HAVE_SILCMIME_H 1 @@ -240,15 +234,9 @@ /* Define to 1 if you have the <ssl.h> header file. */ /* #undef HAVE_SSL_H */ -/* Define to 1 if you have the <stdarg.h> header file. */ -#define HAVE_STDARG_H 1 - /* Define to 1 if you have the <stdint.h> header file. */ #define HAVE_STDINT_H 1 -/* Define to 1 if you have the <stdlib.h> header file. */ -#define HAVE_STDLIB_H 1 - /* Define to 1 if you have the `strchr' function. */ #define HAVE_STRCHR 1 @@ -264,9 +252,6 @@ /* Define to 1 if you have the <strings.h> header file. */ #define HAVE_STRINGS_H 1 -/* Define to 1 if you have the <string.h> header file. */ -#define HAVE_STRING_H 1 - /* Define to 1 if you have the `strstr' function. */ #define HAVE_STRSTR 1 @@ -412,9 +397,6 @@ #define STATIC_PROTO_INIT static void static_proto_init(void) { } #endif -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - /* Use GStreamer for playing sounds */ /* It's defined in global.mak. */ /* #undef USE_GSTREAMER */ diff --git a/configure.ac b/configure.ac index 7678b4d309..fac5bbaf5a 100644 --- a/configure.ac +++ b/configure.ac @@ -149,7 +149,6 @@ case "$host" in is_win32="no" is_not_win32="yes" PLUGIN_LDFLAGS="-avoid-version" - AC_CHECK_HEADERS(signal.h) ;; esac AM_CONDITIONAL(IS_WIN32, test "x$is_win32" = "xyes") @@ -164,9 +163,8 @@ AC_SUBST(PIDGIN_LIBS) AC_SUBST(FINCH_LIBS) dnl Checks for header files. -AC_HEADER_STDC AC_HEADER_SYS_WAIT -AC_CHECK_HEADERS(fcntl.h unistd.h locale.h stdint.h) +AC_CHECK_HEADERS(fcntl.h unistd.h stdint.h) dnl Checks for typedefs, structures, and compiler characteristics. AC_CHECK_SIZEOF(time_t, ,[ diff --git a/finch/getopt.c b/finch/getopt.c index f9bdce960f..1f0df593c0 100644 --- a/finch/getopt.c +++ b/finch/getopt.c @@ -32,9 +32,7 @@ #endif /* Alver says we need this for IRIX. */ -#if HAVE_STRING_H #include "string.h" -#endif #ifdef __GNUC__ #define alloca __builtin_alloca diff --git a/libpurple/protocols/zephyr/Zinternal.c b/libpurple/protocols/zephyr/Zinternal.c index 9975afa954..968c0ba0f0 100644 --- a/libpurple/protocols/zephyr/Zinternal.c +++ b/libpurple/protocols/zephyr/Zinternal.c @@ -931,7 +931,6 @@ const char *const ZNoticeKinds[] = { #ifdef Z_DEBUG #undef Z_debug -#ifdef HAVE_STDARG_H void Z_debug (const char *format, ...) { va_list pvar; @@ -941,19 +940,6 @@ void Z_debug (const char *format, ...) (*__Z_debug_print) (format, pvar, __Z_debug_print_closure); va_end (pvar); } -#else /* stdarg */ -void Z_debug (va_alist) va_dcl -{ - va_list pvar; - char *format; - if (!__Z_debug_print) - return; - va_start (pvar); - format = va_arg (pvar, char *); - (*__Z_debug_print) (format, pvar, __Z_debug_print_closure); - va_end (pvar); -} -#endif void Z_debug_stderr (format, args, closure) const char *format; diff --git a/libpurple/protocols/zephyr/sysdep.h b/libpurple/protocols/zephyr/sysdep.h index 41412954df..a696d82663 100644 --- a/libpurple/protocols/zephyr/sysdep.h +++ b/libpurple/protocols/zephyr/sysdep.h @@ -26,17 +26,7 @@ #include <sys/param.h> #include <sys/time.h> -#if defined(STDC_HEADERS) || defined(HAVE_STDLIB_H) -# include <stdlib.h> -#else -# ifdef HAVE_MALLOC_H -# include <malloc.h> -# else -char *malloc(), *realloc(void); -# endif -char *getenv(), *strerror(), *ctime(), *strcpy(void); -time_t time(void); -#endif +#include <stdlib.h> #ifndef HAVE_STRERROR extern char *sys_errlist[]; @@ -44,22 +34,7 @@ extern char *sys_errlist[]; #endif /* Strings. */ -#if defined(STDC_HEADERS) || defined(HAVE_STRING_H) -# include <string.h> -#else -# ifndef HAVE_STRCHR -# define strchr index -# define strrchr rindex -# endif -char *strchr(), *strrchr(void); -# ifndef HAVE_MEMCPY -# define memcpy(d, s, n) bcopy ((s), (d), (n)) -# define memcmp bcmp -# endif -# ifndef HAVE_MEMMOVE -# define memmove(d, s, n) bcopy ((s), (d), (n)) -# endif -#endif +#include <string.h> /* Exit status handling and wait(). */ #ifdef HAVE_SYS_WAIT_H diff --git a/libpurple/util.c b/libpurple/util.c index f46ff390c6..02e0d178b5 100644 --- a/libpurple/util.c +++ b/libpurple/util.c @@ -4634,7 +4634,6 @@ gchar * purple_escape_js(const gchar *str) void purple_restore_default_signal_handlers(void) { #ifndef _WIN32 -#ifdef HAVE_SIGNAL_H signal(SIGHUP, SIG_DFL); /* 1: terminal line hangup */ signal(SIGINT, SIG_DFL); /* 2: interrupt program */ signal(SIGQUIT, SIG_DFL); /* 3: quit program */ @@ -4660,7 +4659,6 @@ void purple_restore_default_signal_handlers(void) signal(SIGCHLD, SIG_DFL); /* 20: child status has changed */ signal(SIGXCPU, SIG_DFL); /* 24: exceeded CPU time limit */ signal(SIGXFSZ, SIG_DFL); /* 25: exceeded file size limit */ -#endif /* HAVE_SIGNAL_H */ #endif /* !_WIN32 */ } diff --git a/pidgin/getopt.c b/pidgin/getopt.c index c3468d1d0e..e687a3d414 100644 --- a/pidgin/getopt.c +++ b/pidgin/getopt.c @@ -32,9 +32,7 @@ #endif /* Alver says we need this for IRIX. */ -#if HAVE_STRING_H #include "string.h" -#endif #ifdef __GNUC__ #define alloca __builtin_alloca 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(); diff --git a/pidgin/plugins/musicmessaging/musicmessaging.c b/pidgin/plugins/musicmessaging/musicmessaging.c index 4eb26fddb7..c1c414f0ef 100644 --- a/pidgin/plugins/musicmessaging/musicmessaging.c +++ b/pidgin/plugins/musicmessaging/musicmessaging.c @@ -520,16 +520,11 @@ static void run_editor (MMConversation *mmconv) static void kill_editor (MMConversation *mmconv) { -#ifdef HAVE_SIGNAL_H if (mmconv->pid) { kill(mmconv->pid, SIGINT); mmconv->pid = 0; } -#else - purple_debug_warning("musicmessaging", - "kill() is not supported on this platform"); -#endif } static void init_conversation (PurpleConversation *conv) |