pidgin/pidgin

2bb56551e37e
Merged in qulogic/pidgin (pull request #121)

Remove more old build checks
--- a/config.h.mingw Sun Sep 18 22:21:58 2016 -0500
+++ b/config.h.mingw Wed Sep 21 12:34:03 2016 -0500
@@ -40,9 +40,6 @@
/* Define if you have the external 'altzone' variable. */
/* #undef HAVE_ALTZONE */
-/* Define to 1 if you have the `atexit' function. */
-#define HAVE_ATEXIT 1
-
/* Define to 1 if you have the `bind_textdomain_codeset' function. */
/* #undef HAVE_BIND_TEXTDOMAIN_CODESET */
@@ -150,27 +147,12 @@
/* 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 */
-
/* Define to 1 if you have the <malloc.h> header file. */
#define HAVE_MALLOC_H 1
/* Define if we have support for application media type. */
/* #undef HAVE_MEDIA_APPLICATION */
-/* Define to 1 if you have the `memcpy' function. */
-#define HAVE_MEMCPY 1
-
-/* Define to 1 if you have the `memmove' function. */
-#define HAVE_MEMMOVE 1
-
-/* Define to 1 if you have the <memory.h> header file. */
-#define HAVE_MEMORY_H 1
-
/* Define to 1 if you have the `mono_jit_init' function. */
/* #undef HAVE_MONO_JIT_INIT */
@@ -213,18 +195,9 @@
/* Define to 1 if you have the <prio.h> header file. */
/* #undef HAVE_PRIO_H */
-/* Define to 1 if you have the `random' function. */
-/* #define HAVE_RANDOM 1 */
-
-/* Define to 1 if you have the `setlocale' function. */
-#define HAVE_SETLOCALE 1
-
/* 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,36 +213,18 @@
/* 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
-
/* Define to 1 if you have the `strdup' function. */
#define HAVE_STRDUP 1
-/* Define to 1 if you have the `strerror' function. */
-#define HAVE_STRERROR 1
-
/* Define to 1 if you have a strftime() that supports the %z format string. */
/* #undef HAVE_STRFTIME_Z_FORMAT */
/* 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
-
/* Define if struct sockaddr has an sa_len member */
/* #undef HAVE_STRUCT_SOCKADDR_SA_LEN */
@@ -347,9 +302,6 @@
/* Define to 1 if you have the <unistd.h> header file. */
/*#define HAVE_UNISTD_H 1*/
-/* Define to 1 if you have the `vprintf' function. */
-#define HAVE_VPRINTF 1
-
/* Define to 1 if you have X11 */
/* #define HAVE_X11 1 */
@@ -412,9 +364,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 */
--- a/configure.ac Sun Sep 18 22:21:58 2016 -0500
+++ b/configure.ac Wed Sep 21 12:34:03 2016 -0500
@@ -149,7 +149,6 @@
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(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, ,[
@@ -251,7 +249,7 @@
AC_SUBST([FINCH_PLUGINDIR])
dnl Checks for library functions.
-AC_CHECK_FUNCS(strdup strstr atexit setlocale)
+AC_CHECK_FUNCS(strdup)
dnl Checks for getopt in standard library
AC_CHECK_FUNCS(getopt_long,,
[
@@ -2089,9 +2087,8 @@
AC_MSG_CHECKING(for me pot o' gold)
AC_MSG_RESULT(no)
-AC_CHECK_FUNCS(gethostid lrand48 timegm)
-AC_CHECK_FUNCS(memcpy memmove random strchr strerror vprintf)
-AC_CHECK_HEADERS(malloc.h paths.h sgtty.h stdarg.h sys/cdefs.h)
+AC_CHECK_FUNCS(gethostid timegm)
+AC_CHECK_HEADERS(paths.h sgtty.h sys/cdefs.h)
AC_CHECK_HEADERS(sys/file.h sys/filio.h sys/ioctl.h sys/msgbuf.h)
AC_CHECK_HEADERS(sys/select.h sys/uio.h sys/wait.h)
AC_CHECK_HEADERS(termios.h)
--- a/finch/getopt.c Sun Sep 18 22:21:58 2016 -0500
+++ b/finch/getopt.c Wed Sep 21 12:34:03 2016 -0500
@@ -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
--- a/finch/libfinch.c Sun Sep 18 22:21:58 2016 -0500
+++ b/finch/libfinch.c Wed Sep 21 12:34:03 2016 -0500
@@ -284,9 +284,7 @@
textdomain(PACKAGE);
#endif
-#ifdef HAVE_SETLOCALE
setlocale(LC_ALL, "");
-#endif
/* scan command-line options */
opterr = 1;
--- a/finch/libgnt/configure.ac Sun Sep 18 22:21:58 2016 -0500
+++ b/finch/libgnt/configure.ac Wed Sep 21 12:34:03 2016 -0500
@@ -67,74 +67,22 @@
dnl AC_CYGWIN
dnl Checks for header files.
-AC_HEADER_STDC
AC_HEADER_SYS_WAIT
-AC_CHECK_HEADERS(fcntl.h unistd.h locale.h signal.h stdint.h)
+AC_CHECK_HEADERS(unistd.h)
dnl Checks for typedefs, structures, and compiler characteristics.
-AC_C_CONST
-AC_STRUCT_TM
AC_C_BIGENDIAN
dnl Checks for library functions.
-AC_TYPE_SIGNAL
-AC_FUNC_STRFTIME
-AC_CHECK_FUNCS(strdup strstr atexit setlocale)
+AC_CHECK_FUNCS(strdup)
dnl to prevent the g_stat()/g_unlink() crash,
dnl (09:50:07) Robot101: LSchiere2: it's easy. +LC_SYS_LARGEFILE somewhere in configure.ac
AC_SYS_LARGEFILE
-AC_MSG_CHECKING(for the %z format string in strftime())
-AC_TRY_RUN([
-#include <time.h>
-#include <stdio.h>
-
-int main()
-{
- char buf[6];
- time_t t = time(NULL);
-
- if (strftime(buf, sizeof(buf), "%z", localtime(&t)) != 5)
- return 1;
-
- fprintf(stderr, "strftime(\"%%z\") yields: \"%s\"\n", buf);
-
- return !((buf[0] == '-' || buf[0] == '+') &&
- (buf[1] >= '0' && buf[1] <= '9') &&
- (buf[2] >= '0' && buf[2] <= '9') &&
- (buf[3] >= '0' && buf[3] <= '9') &&
- (buf[4] >= '0' && buf[4] <= '9')
- );
-}
-],
-[
- AC_MSG_RESULT(yes)
- AC_DEFINE([HAVE_STRFTIME_Z_FORMAT], [1],
- [Define to 1 if you have a strftime() that supports the %z format string.])
-],
-[
- AC_MSG_RESULT(no)
-],
-[
- # Fallback for Cross Compiling...
- # This will enable the compatibility code.
- AC_MSG_RESULT(no)
-]
-)
-
-
-AC_CHECK_HEADER(sys/utsname.h)
-AC_CHECK_FUNC(uname)
-
if test "x$enable_debug" = "xyes" ; then
AC_DEFINE(DEBUG, 1, [Define if debugging is enabled.])
- enable_fatal_asserts="yes"
-fi
-
-if test "x$enable_fatal_asserts" = "xyes" ; then
- AC_DEFINE(GAIM_FATAL_ASSERTS, 1, [Define to make assertions fatal (useful for debugging).])
fi
if test "x$enable_deprecated" = "xno"; then
@@ -231,12 +179,7 @@
AC_MSG_CHECKING(for me pot o' gold)
AC_MSG_RESULT(no)
-AC_CHECK_FUNCS(gethostid lrand48)
-AC_CHECK_FUNCS(memcpy memmove random strchr strerror vprintf)
-AC_CHECK_HEADERS(malloc.h paths.h sgtty.h stdarg.h sys/cdefs.h)
-AC_CHECK_HEADERS(sys/file.h sys/filio.h sys/ioctl.h sys/msgbuf.h)
-AC_CHECK_HEADERS(sys/select.h sys/uio.h sys/utsname.h sys/wait.h)
-AC_CHECK_HEADERS(termios.h)
+AC_CHECK_HEADERS(sys/wait.h)
#AC_CHECK_FUNC(wcwidth, [AC_DEFINE([HAVE_WCWIDTH], [1], [Define to 1 if you have wcwidth function.])])
#AC_VAR_TIMEZONE_EXTERNALS
--- a/libpurple/protocols/zephyr/Zinternal.c Sun Sep 18 22:21:58 2016 -0500
+++ b/libpurple/protocols/zephyr/Zinternal.c Wed Sep 21 12:34:03 2016 -0500
@@ -931,7 +931,6 @@
#ifdef Z_DEBUG
#undef Z_debug
-#ifdef HAVE_STDARG_H
void Z_debug (const char *format, ...)
{
va_list pvar;
@@ -941,30 +940,13 @@
(*__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;
va_list args;
void *closure;
{
-#ifdef HAVE_VPRINTF
vfprintf (stderr, format, args);
-#else
- _doprnt (format, args, stderr);
-#endif
putc ('\n', stderr);
}
--- a/libpurple/protocols/zephyr/sysdep.h Sun Sep 18 22:21:58 2016 -0500
+++ b/libpurple/protocols/zephyr/sysdep.h Wed Sep 21 12:34:03 2016 -0500
@@ -26,40 +26,10 @@
#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
-
-#ifndef HAVE_STRERROR
-extern char *sys_errlist[];
-# define strerror(x) (sys_errlist[(x)])
-#endif
+#include <stdlib.h>
/* 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
--- a/libpurple/util.c Sun Sep 18 22:21:58 2016 -0500
+++ b/libpurple/util.c Wed Sep 21 12:34:03 2016 -0500
@@ -4629,7 +4629,6 @@
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 */
@@ -4655,7 +4654,6 @@
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 */
}
--- a/pidgin/getopt.c Sun Sep 18 22:21:58 2016 -0500
+++ b/pidgin/getopt.c Wed Sep 21 12:34:03 2016 -0500
@@ -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
--- a/pidgin/libpidgin.c Sun Sep 18 22:21:58 2016 -0500
+++ b/pidgin/libpidgin.c Wed Sep 21 12:34:03 2016 -0500
@@ -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 @@
SIGPIPE,
-1
};
-#endif
static void
dologin_named(const char *name)
@@ -126,7 +121,6 @@
}
}
-#ifdef HAVE_SIGNAL_H
static char *segfault_message;
static int signal_sockets[2];
@@ -195,7 +189,6 @@
return TRUE;
}
-#endif
static int
ui_main(void)
@@ -434,7 +427,6 @@
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 @@
#ifndef DEBUG
char *segfault_message_tmp;
#endif /* DEBUG */
-#endif /* HAVE_SIGNAL_N */
int opt;
gboolean gui_check;
gboolean debug_enabled, debug_colored;
@@ -480,12 +471,8 @@
textdomain(PACKAGE);
#endif
-#ifdef HAVE_SETLOCALE
/* Locale initialization is not complete here. See gtk_init_check() */
setlocale(LC_ALL, "");
-#endif
-
-#ifdef HAVE_SIGNAL_H
#ifndef DEBUG
/* We translate this here in case the crash breaks gettext. */
@@ -587,7 +574,6 @@
snprintf(errmsg, sizeof(errmsg), "Warning: couldn't unblock signals");
perror(errmsg);
}
-#endif
/* scan command-line options */
opterr = 1;
@@ -640,9 +626,7 @@
case '?': /* show terse help */
default:
show_usage(argv[0], TRUE);
-#ifdef HAVE_SIGNAL_H
g_free(segfault_message);
-#endif
return 0;
break;
}
@@ -651,18 +635,14 @@
/* 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 +677,7 @@
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 +711,7 @@
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 +737,7 @@
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 +822,10 @@
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();
--- a/pidgin/plugins/musicmessaging/musicmessaging.c Sun Sep 18 22:21:58 2016 -0500
+++ b/pidgin/plugins/musicmessaging/musicmessaging.c Wed Sep 21 12:34:03 2016 -0500
@@ -520,16 +520,11 @@
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)