pidgin/pidgin

3ca907207239
Merged in CMaiku/pidgin (pull request #126)

Remove GLIB_CHECK_VERSION <= 2.36 calls
--- a/finch/finch.c Sat Sep 17 11:43:36 2016 -0500
+++ b/finch/finch.c Sun Sep 18 22:21:58 2016 -0500
@@ -32,14 +32,6 @@
signal(SIGPIPE, SIG_IGN);
#endif
-#if !GLIB_CHECK_VERSION(2, 32, 0)
- /* GLib threading system is automaticaly initialized since 2.32.
- * For earlier versions, it have to be initialized before calling any
- * Glib or GTK+ functions.
- */
- g_thread_init(NULL);
-#endif
-
g_set_prgname("Finch");
g_set_application_name(_("Finch"));
--- a/libpurple/core.c Sat Sep 17 11:43:36 2016 -0500
+++ b/libpurple/core.c Sun Sep 18 22:21:58 2016 -0500
@@ -113,11 +113,6 @@
wpurple_init();
#endif
-#if !GLIB_CHECK_VERSION(2, 36, 0)
- /* GLib type system is automaticaly initialized since 2.36. */
- g_type_init();
-#endif
-
_core = core = g_new0(PurpleCore, 1);
core->ui = g_strdup(ui);
core->reserved = NULL;
--- a/libpurple/glibcompat.h Sat Sep 17 11:43:36 2016 -0500
+++ b/libpurple/glibcompat.h Sun Sep 18 22:21:58 2016 -0500
@@ -33,37 +33,6 @@
#include <glib.h>
-#if !GLIB_CHECK_VERSION(2, 36, 0)
-
-#include <errno.h>
-#include <fcntl.h>
-#ifndef _WIN32
-#include <unistd.h>
-#endif
-
-static inline gboolean g_close(gint fd, GError **error)
-{
- int res;
- int errsv;
-
- res = close(fd);
-
- if (G_LIKELY(res == 0))
- return TRUE;
- if (G_UNLIKELY(errno == EINTR))
- return TRUE;
-
- errsv = errno;
- g_set_error_literal(error, G_FILE_ERROR,
- g_file_error_from_errno(errsv), g_strerror(errsv));
- errno = errsv;
-
- return FALSE;
-}
-
-#endif /* < 2.36.0 */
-
-
/* glib's definition of g_stat+GStatBuf seems to be broken on mingw64-w32 (and
* possibly other 32-bit windows), so instead of relying on it,
* we'll define our own.
--- a/libpurple/plugins/caesarcipher.c Sat Sep 17 11:43:36 2016 -0500
+++ b/libpurple/plugins/caesarcipher.c Sun Sep 18 22:21:58 2016 -0500
@@ -117,11 +117,7 @@
switch(param_id) {
case PROP_OFFSET:
-#if GLIB_CHECK_VERSION(2, 32, 0)
caesar_cipher_set_offset(cipher, g_value_get_schar(value));
-#else
- caesar_cipher_set_offset(cipher, g_value_get_char(value));
-#endif
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID(obj, param_id, pspec);
--- a/libpurple/purple-client.c Sat Sep 17 11:43:36 2016 -0500
+++ b/libpurple/purple-client.c Sun Sep 18 22:21:58 2016 -0500
@@ -66,11 +66,6 @@
{
GError *error = NULL;
-#if !GLIB_CHECK_VERSION(2, 36, 0)
- /* GLib type system is automaticaly initialized since 2.36. */
- g_type_init();
-#endif
-
bus = dbus_g_bus_get (DBUS_BUS_SESSION, &error);
if (!bus)
lose_gerror ("Couldn't connect to session bus", error);
--- a/libpurple/util.c Sat Sep 17 11:43:36 2016 -0500
+++ b/libpurple/util.c Sun Sep 18 22:21:58 2016 -0500
@@ -4266,11 +4266,7 @@
const gchar *
purple_gai_strerror(gint errnum)
{
-#if GLIB_CHECK_VERSION(2, 32, 0)
static GPrivate msg_private = G_PRIVATE_INIT(g_free);
-#else
- static GStaticPrivate msg_private = G_STATIC_PRIVATE_INIT;
-#endif
char *msg;
int saved_errno = errno;
@@ -4298,19 +4294,12 @@
}
}
-#if GLIB_CHECK_VERSION(2, 32, 0)
msg = g_private_get(&msg_private);
-#else
- msg = g_static_private_get(&msg_private);
-#endif
+
if (!msg)
{
msg = g_new(gchar, 64);
-#if GLIB_CHECK_VERSION(2, 32, 0)
g_private_set(&msg_private, msg);
-#else
- g_static_private_set(&msg_private, msg, g_free);
-#endif
}
sprintf(msg, "unknown error (%d)", errnum);
--- a/libpurple/win32/win32dep.c Sat Sep 17 11:43:36 2016 -0500
+++ b/libpurple/win32/win32dep.c Sun Sep 18 22:21:58 2016 -0500
@@ -622,15 +622,6 @@
WORD wVersionRequested;
WSADATA wsaData;
-#if !GLIB_CHECK_VERSION(2, 32, 0)
- /* GLib threading system is automaticaly initialized since 2.32.
- * For earlier versions, it have to be initialized before calling any
- * Glib or GTK+ functions.
- */
- if (!g_thread_supported())
- g_thread_init(NULL);
-#endif
-
if (purple_debug_is_verbose())
purple_debug_misc("wpurple", "wpurple_init start\n");
--- a/pidgin/gtkdebug.c Sat Sep 17 11:43:36 2016 -0500
+++ b/pidgin/gtkdebug.c Sun Sep 18 22:21:58 2016 -0500
@@ -273,11 +273,9 @@
if (win->regex)
g_regex_unref(win->regex);
-#if GLIB_CHECK_VERSION(2,34,0)
+
win->regex = g_regex_new(text, G_REGEX_CASELESS|G_REGEX_JAVASCRIPT_COMPAT, 0, NULL);
-#else
- win->regex = g_regex_new(text, G_REGEX_CASELESS, 0, NULL);
-#endif
+
if (win->regex == NULL) {
/* failed to compile */
regex_change_color(win->expression, FALSE);
--- a/pidgin/pidgin.c Sat Sep 17 11:43:36 2016 -0500
+++ b/pidgin/pidgin.c Sun Sep 18 22:21:58 2016 -0500
@@ -38,14 +38,6 @@
SetConsoleOutputCP(65001); /* UTF-8 */
#endif
-#if !GLIB_CHECK_VERSION(2, 32, 0)
- /* GLib threading system is automaticaly initialized since 2.32.
- * For earlier versions, it have to be initialized before calling any
- * Glib or GTK+ functions.
- */
- g_thread_init(NULL);
-#endif
-
/* This is for UI testing purposes only, don't use it! */
test_prgname = g_getenv("PIDGIN_TEST_PRGNAME");
g_set_prgname(test_prgname ? test_prgname : "Pidgin");