From 4390d72b141304b8dfcdb374b428d3b4fae56237 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 13 Oct 2009 16:12:43 +0200 Subject: configure.ac: require GLib 2.16 Accidently, MPD has been using several GLib 2.16 functions for a while, and nobody noticed yet. To simplify the code base, let's bump the minimum GLib version for MPD to 2.16. That version is old enough, and it's reasonable to expect users to have it. --- src/input/curl_input_plugin.c | 5 ----- src/input/lastfm_input_plugin.c | 13 ------------- 2 files changed, 18 deletions(-) (limited to 'src/input') diff --git a/src/input/curl_input_plugin.c b/src/input/curl_input_plugin.c index 2418f27bc..a75245d06 100644 --- a/src/input/curl_input_plugin.c +++ b/src/input/curl_input_plugin.c @@ -150,11 +150,6 @@ buffer_free_callback(gpointer data, G_GNUC_UNUSED gpointer user_data) g_free(data); } -/* g_queue_clear() was introduced in GLib 2.14 */ -#if !GLIB_CHECK_VERSION(2,14,0) -#define g_queue_clear(q) do { g_queue_free(q); q = g_queue_new(); } while (0) -#endif - /** * Frees the current "libcurl easy" handle, and everything associated * with it. diff --git a/src/input/lastfm_input_plugin.c b/src/input/lastfm_input_plugin.c index 4e13cd0ad..fc541ca28 100644 --- a/src/input/lastfm_input_plugin.c +++ b/src/input/lastfm_input_plugin.c @@ -55,18 +55,12 @@ lastfm_input_init(const struct config_param *param) if (passwd == NULL || user == NULL) return false; -#if GLIB_CHECK_VERSION(2,16,0) lastfm_data.user = g_uri_escape_string(user, NULL, false); -#else - lastfm_data.user = g_strdup(user); -#endif -#if GLIB_CHECK_VERSION(2,16,0) if (strlen(passwd) != 32) lastfm_data.md5 = g_compute_checksum_for_string(G_CHECKSUM_MD5, passwd, strlen(passwd)); else -#endif lastfm_data.md5 = g_strdup(passwd); return true; @@ -364,23 +358,16 @@ lastfm_input_open(struct input_stream *is, const char *url) return false; } -#if GLIB_CHECK_VERSION(2,16,0) q = g_uri_escape_string(session, NULL, false); g_free(session); session = q; -#endif /* "adjust" last.fm radio */ if (strlen(url) > 9) { char *escaped_url; -#if GLIB_CHECK_VERSION(2,16,0) escaped_url = g_uri_escape_string(url, NULL, false); -#else - escaped_url = g_strdup(url); -#endif - p = g_strconcat("http://ws.audioscrobbler.com/radio/adjust.php?" "session=", session, "&url=", escaped_url, "&debug=0", NULL); -- cgit v1.2.3