aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2012-07-10 01:21:36 +0200
committerMax Kellermann <max@duempel.org>2012-07-10 01:28:52 +0200
commit5dfc0918c37c40063b92a55c365ec87e29f0ecef (patch)
treec3ec06f3adbff49190765e392579a8424c9e17d8 /src
parent2eb14658d3eb06e827f8f1f045f4f12888db4e26 (diff)
require GLib 2.16
GLib 2.16 was released more than 4 years ago. Let's remove some cruft from the glib_compat.h header, and avoid new cruft to it.
Diffstat (limited to 'src')
-rw-r--r--src/conf.c1
-rw-r--r--src/db/simple_db_plugin.c1
-rw-r--r--src/glib_compat.h58
-rw-r--r--src/input_init.c1
-rw-r--r--src/io_thread.c1
-rw-r--r--src/listen.c1
-rw-r--r--src/output/httpd_client.c1
-rw-r--r--src/playlist/despotify_playlist_plugin.c2
-rw-r--r--src/playlist/lastfm_playlist_plugin.c1
-rw-r--r--src/playlist_list.c1
-rw-r--r--src/resolver.c1
-rw-r--r--src/server_socket.c1
-rw-r--r--src/state_file.c1
-rw-r--r--src/tcp_connect.c1
-rw-r--r--src/update_archive.c1
-rw-r--r--src/update_container.c1
-rw-r--r--src/update_io.c1
-rw-r--r--src/update_song.c1
-rw-r--r--src/update_walk.c1
19 files changed, 2 insertions, 75 deletions
diff --git a/src/conf.c b/src/conf.c
index 549ff51e..167f2da9 100644
--- a/src/conf.c
+++ b/src/conf.c
@@ -23,7 +23,6 @@
#include "string_util.h"
#include "tokenizer.h"
#include "path.h"
-#include "glib_compat.h"
#include "mpd_error.h"
#include <glib.h>
diff --git a/src/db/simple_db_plugin.c b/src/db/simple_db_plugin.c
index f1109082..697e8da5 100644
--- a/src/db/simple_db_plugin.c
+++ b/src/db/simple_db_plugin.c
@@ -26,7 +26,6 @@
#include "db_save.h"
#include "db_lock.h"
#include "conf.h"
-#include "glib_compat.h"
#include "directory.h"
#include <sys/types.h>
diff --git a/src/glib_compat.h b/src/glib_compat.h
index 989bf3b8..97d1fdc0 100644
--- a/src/glib_compat.h
+++ b/src/glib_compat.h
@@ -28,64 +28,6 @@
#include <glib.h>
-#if !GLIB_CHECK_VERSION(2,14,0)
-
-#define g_queue_clear(q) do { g_queue_free(q); q = g_queue_new(); } while (0)
-
-static inline GSource *
-g_timeout_source_new_seconds(guint interval)
-{
- return g_timeout_source_new(interval * 1000);
-}
-
-static inline guint
-g_timeout_add_seconds(guint interval, GSourceFunc function, gpointer data)
-{
- return g_timeout_add(interval * 1000, function, data);
-}
-
-#endif /* !2.14 */
-
-#if !GLIB_CHECK_VERSION(2,16,0)
-
-static inline void
-g_prefix_error(G_GNUC_UNUSED GError **error_r,
- G_GNUC_UNUSED const gchar *format, ...)
-{
-}
-
-static inline void
-g_propagate_prefixed_error(GError **dest_r, GError *src,
- G_GNUC_UNUSED const gchar *format, ...)
-{
- g_propagate_error(dest_r, src);
-}
-
-static inline char *
-g_uri_escape_string(const char *unescaped,
- G_GNUC_UNUSED const char *reserved_chars_allowed,
- G_GNUC_UNUSED gboolean allow_utf8)
-{
- return g_strdup(unescaped);
-}
-
-#endif /* !2.16 */
-
-#if !GLIB_CHECK_VERSION(2,16,0)
-
-#include <string.h>
-
-static inline char *
-g_uri_parse_scheme(const char *uri)
-{
- const char *end = strstr(uri, "://");
- if (end == NULL)
- return NULL;
- return g_strndup(uri, end - uri);
-}
-
-#endif
-
#if !GLIB_CHECK_VERSION(2,18,0)
static inline void
diff --git a/src/input_init.c b/src/input_init.c
index e1698b64..771d648d 100644
--- a/src/input_init.c
+++ b/src/input_init.c
@@ -22,7 +22,6 @@
#include "input_plugin.h"
#include "input_registry.h"
#include "conf.h"
-#include "glib_compat.h"
#include <assert.h>
#include <string.h>
diff --git a/src/io_thread.c b/src/io_thread.c
index 2091ecd0..7c080adc 100644
--- a/src/io_thread.c
+++ b/src/io_thread.c
@@ -18,7 +18,6 @@
*/
#include "io_thread.h"
-#include "glib_compat.h"
#include <assert.h>
diff --git a/src/listen.c b/src/listen.c
index e2a40e93..90e13b9c 100644
--- a/src/listen.c
+++ b/src/listen.c
@@ -22,7 +22,6 @@
#include "server_socket.h"
#include "client.h"
#include "conf.h"
-#include "glib_compat.h"
#include "main.h"
#include <string.h>
diff --git a/src/output/httpd_client.c b/src/output/httpd_client.c
index 8efedc2b..72de9045 100644
--- a/src/output/httpd_client.c
+++ b/src/output/httpd_client.c
@@ -23,7 +23,6 @@
#include "fifo_buffer.h"
#include "page.h"
#include "icy_server.h"
-#include "glib_compat.h"
#include "glib_socket.h"
#include <stdbool.h>
diff --git a/src/playlist/despotify_playlist_plugin.c b/src/playlist/despotify_playlist_plugin.c
index 08a32d79..30b852c7 100644
--- a/src/playlist/despotify_playlist_plugin.c
+++ b/src/playlist/despotify_playlist_plugin.c
@@ -16,6 +16,7 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
+
#include "config.h"
#include "playlist/despotify_playlist_plugin.h"
#include "playlist_plugin.h"
@@ -25,7 +26,6 @@
#include "tag.h"
#include "song.h"
#include "input_stream.h"
-#include "glib_compat.h"
#include "despotify_utils.h"
#include <glib.h>
diff --git a/src/playlist/lastfm_playlist_plugin.c b/src/playlist/lastfm_playlist_plugin.c
index 86113643..93768660 100644
--- a/src/playlist/lastfm_playlist_plugin.c
+++ b/src/playlist/lastfm_playlist_plugin.c
@@ -25,7 +25,6 @@
#include "uri.h"
#include "song.h"
#include "input_stream.h"
-#include "glib_compat.h"
#include <glib.h>
diff --git a/src/playlist_list.c b/src/playlist_list.c
index 3d4edb9e..68d24fe4 100644
--- a/src/playlist_list.c
+++ b/src/playlist_list.c
@@ -35,7 +35,6 @@
#include "uri.h"
#include "string_util.h"
#include "conf.h"
-#include "glib_compat.h"
#include "mpd_error.h"
#include <assert.h>
diff --git a/src/resolver.c b/src/resolver.c
index 5d8d299c..243b7cd0 100644
--- a/src/resolver.c
+++ b/src/resolver.c
@@ -19,7 +19,6 @@
#include "config.h"
#include "resolver.h"
-#include "glib_compat.h"
#ifndef G_OS_WIN32
#include <sys/socket.h>
diff --git a/src/server_socket.c b/src/server_socket.c
index e4b5e3ec..39639959 100644
--- a/src/server_socket.c
+++ b/src/server_socket.c
@@ -27,7 +27,6 @@
#include "socket_util.h"
#include "resolver.h"
#include "fd_util.h"
-#include "glib_compat.h"
#include "glib_socket.h"
#include <sys/types.h>
diff --git a/src/state_file.c b/src/state_file.c
index de7fa2d0..de0e7053 100644
--- a/src/state_file.c
+++ b/src/state_file.c
@@ -24,7 +24,6 @@
#include "playlist_state.h"
#include "volume.h"
#include "text_file.h"
-#include "glib_compat.h"
#include <glib.h>
#include <assert.h>
diff --git a/src/tcp_connect.c b/src/tcp_connect.c
index 88e2348e..291114f4 100644
--- a/src/tcp_connect.c
+++ b/src/tcp_connect.c
@@ -21,7 +21,6 @@
#include "tcp_connect.h"
#include "fd_util.h"
#include "io_thread.h"
-#include "glib_compat.h"
#include "glib_socket.h"
#include <assert.h>
diff --git a/src/update_archive.c b/src/update_archive.c
index e7cdcbdf..3fb2bc18 100644
--- a/src/update_archive.c
+++ b/src/update_archive.c
@@ -24,7 +24,6 @@
#include "directory.h"
#include "song.h"
#include "mapper.h"
-#include "glib_compat.h"
#include "archive_list.h"
#include "archive_plugin.h"
diff --git a/src/update_container.c b/src/update_container.c
index 9fe4bb0a..bda95dab 100644
--- a/src/update_container.c
+++ b/src/update_container.c
@@ -25,7 +25,6 @@
#include "directory.h"
#include "song.h"
#include "mapper.h"
-#include "glib_compat.h"
#include "decoder_plugin.h"
#include "tag.h"
#include "tag_handler.h"
diff --git a/src/update_io.c b/src/update_io.c
index 887ebe2e..c6a540a0 100644
--- a/src/update_io.c
+++ b/src/update_io.c
@@ -21,6 +21,7 @@
#include "update_io.h"
#include "mapper.h"
#include "directory.h"
+#include "glib_compat.h"
#include <glib.h>
diff --git a/src/update_song.c b/src/update_song.c
index 5f06985a..1126ad11 100644
--- a/src/update_song.c
+++ b/src/update_song.c
@@ -26,7 +26,6 @@
#include "db_lock.h"
#include "directory.h"
#include "song.h"
-#include "glib_compat.h"
#include "decoder_list.h"
#include "decoder_plugin.h"
diff --git a/src/update_walk.c b/src/update_walk.c
index 23c5d3e4..615bf41a 100644
--- a/src/update_walk.c
+++ b/src/update_walk.c
@@ -33,7 +33,6 @@
#include "mapper.h"
#include "path.h"
#include "playlist_list.h"
-#include "glib_compat.h"
#include "conf.h"
#include <glib.h>