/pidgin/main: 3ca907207239: Merged in CMaiku/pidgin (pull reques...

Gary Kramlich <[email protected]> Sun, 18 Sep 2016 23:22:16 -0400
Newsgroups gmane.comp.gnome.gaim.cvs
Message-ID <[email protected]>
Changeset: 3ca907207239dccf7b2d9e0fef98d54a28e458ce
Author:	 Gary Kramlich <[email protected]>
Date:	 2016-09-18 22:21 -0500
Branch:	 default
URL: https://hg.pidgin.im/pidgin/main/rev/3ca907207239

Description:

Merged in CMaiku/pidgin (pull request #126)

Remove GLIB_CHECK_VERSION <= 2.36 calls

diffstat:

 finch/finch.c                    |   8 --------
 libpurple/core.c                 |   5 -----
 libpurple/glibcompat.h           |  31 -------------------------------
 libpurple/plugins/caesarcipher.c |   4 ----
 libpurple/purple-client.c        |   5 -----
 libpurple/util.c                 |  13 +------------
 libpurple/win32/win32dep.c       |   9 ---------
 pidgin/gtkdebug.c                |   6 ++----
 pidgin/pidgin.c                  |   8 --------
 9 files changed, 3 insertions(+), 86 deletions(-)

diffs (194 lines):

diff --git a/finch/finch.c b/finch/finch.c
--- a/finch/finch.c
+++ b/finch/finch.c
@@ -32,14 +32,6 @@ int main(int argc, char *argv[])
 	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"));
 
diff --git a/libpurple/core.c b/libpurple/core.c
--- a/libpurple/core.c
+++ b/libpurple/core.c
@@ -113,11 +113,6 @@ purple_core_init(const char *ui)
 	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;
diff --git a/libpurple/glibcompat.h b/libpurple/glibcompat.h
--- a/libpurple/glibcompat.h
+++ b/libpurple/glibcompat.h
@@ -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.
diff --git a/libpurple/plugins/caesarcipher.c b/libpurple/plugins/caesarcipher.c
--- a/libpurple/plugins/caesarcipher.c
+++ b/libpurple/plugins/caesarcipher.c
@@ -117,11 +117,7 @@ caesar_cipher_set_property(GObject *obj,
 
 	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);
diff --git a/libpurple/purple-client.c b/libpurple/purple-client.c
--- a/libpurple/purple-client.c
+++ b/libpurple/purple-client.c
@@ -66,11 +66,6 @@ void purple_init(void)
 {
 	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);
diff --git a/libpurple/util.c b/libpurple/util.c
--- a/libpurple/util.c
+++ b/libpurple/util.c
@@ -4266,11 +4266,7 @@ purple_utf8_strip_unprintables(const gch
 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 @@ purple_gai_strerror(gint errnum)
 		}
 	}
 
-#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);
diff --git a/libpurple/win32/win32dep.c b/libpurple/win32/win32dep.c
--- a/libpurple/win32/win32dep.c
+++ b/libpurple/win32/win32dep.c
@@ -622,15 +622,6 @@ void wpurple_init(void) {
 	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");
 
diff --git a/pidgin/gtkdebug.c b/pidgin/gtkdebug.c
--- a/pidgin/gtkdebug.c
+++ b/pidgin/gtkdebug.c
@@ -273,11 +273,9 @@ regex_changed_cb(GtkWidget *w, DebugWind
 
 	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);
diff --git a/pidgin/pidgin.c b/pidgin/pidgin.c
--- a/pidgin/pidgin.c
+++ b/pidgin/pidgin.c
@@ -38,14 +38,6 @@ int main(int argc, char *argv[])
 	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");

_______________________________________________
Commits mailing list
[email protected]
https://pidgin.im/cgi-bin/mailman/listinfo/commits