Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
5dfc0918
Commit
5dfc0918
authored
Jul 10, 2012
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain 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.
parent
2eb14658
Hide whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
5 additions
and
145 deletions
+5
-145
INSTALL
INSTALL
+1
-1
Makefile.am
Makefile.am
+0
-2
configure.ac
configure.ac
+2
-2
conf.c
src/conf.c
+0
-1
simple_db_plugin.c
src/db/simple_db_plugin.c
+0
-1
glib_compat.h
src/glib_compat.h
+0
-58
input_init.c
src/input_init.c
+0
-1
io_thread.c
src/io_thread.c
+0
-1
listen.c
src/listen.c
+0
-1
httpd_client.c
src/output/httpd_client.c
+0
-1
despotify_playlist_plugin.c
src/playlist/despotify_playlist_plugin.c
+1
-1
lastfm_playlist_plugin.c
src/playlist/lastfm_playlist_plugin.c
+0
-1
playlist_list.c
src/playlist_list.c
+0
-1
resolver.c
src/resolver.c
+0
-1
server_socket.c
src/server_socket.c
+0
-1
state_file.c
src/state_file.c
+0
-1
tcp_connect.c
src/tcp_connect.c
+0
-1
update_archive.c
src/update_archive.c
+0
-1
update_container.c
src/update_container.c
+0
-1
update_io.c
src/update_io.c
+1
-0
update_song.c
src/update_song.c
+0
-1
update_walk.c
src/update_walk.c
+0
-1
test_byte_reverse.c
test/test_byte_reverse.c
+0
-1
test_glib_compat.h
test/test_glib_compat.h
+0
-60
test_pcm_channels.c
test/test_pcm_channels.c
+0
-1
test_pcm_dither.c
test/test_pcm_dither.c
+0
-1
test_pcm_main.c
test/test_pcm_main.c
+0
-1
test_pcm_pack.c
test/test_pcm_pack.c
+0
-1
No files found.
INSTALL
View file @
5dfc0918
...
...
@@ -13,7 +13,7 @@ Dependencies
gcc - http://gcc.gnu.org/
Any other C99 compliant compiler should also work.
GLib 2.1
2
- http://www.gtk.org/
GLib 2.1
6
- http://www.gtk.org/
General-purpose utility library.
...
...
Makefile.am
View file @
5dfc0918
...
...
@@ -1307,14 +1307,12 @@ test_run_inotify_LDADD = $(GLIB_LIBS)
endif
test_test_byte_reverse_SOURCES
=
\
test
/test_glib_compat.h
\
test
/test_byte_reverse.c
test_test_byte_reverse_LDADD
=
\
libutil.a
\
$(GLIB_LIBS)
test_test_pcm_SOURCES
=
\
test
/test_glib_compat.h
\
test
/test_pcm_dither.c
\
test
/test_pcm_pack.c
\
test
/test_pcm_channels.c
\
...
...
configure.ac
View file @
5dfc0918
...
...
@@ -456,8 +456,8 @@ AC_ARG_WITH(tremor-includes,
dnl ---------------------------------------------------------------------------
dnl Mandatory Libraries
dnl ---------------------------------------------------------------------------
PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.1
2
gthread-2.0],,
[AC_MSG_ERROR([GLib 2.1
2
is required])])
PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.1
6
gthread-2.0],,
[AC_MSG_ERROR([GLib 2.1
6
is required])])
if test x$GCC = xyes; then
# suppress warnings in the GLib headers
...
...
src/conf.c
View file @
5dfc0918
...
...
@@ -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>
...
...
src/db/simple_db_plugin.c
View file @
5dfc0918
...
...
@@ -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>
...
...
src/glib_compat.h
View file @
5dfc0918
...
...
@@ -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
...
...
src/input_init.c
View file @
5dfc0918
...
...
@@ -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>
...
...
src/io_thread.c
View file @
5dfc0918
...
...
@@ -18,7 +18,6 @@
*/
#include "io_thread.h"
#include "glib_compat.h"
#include <assert.h>
...
...
src/listen.c
View file @
5dfc0918
...
...
@@ -22,7 +22,6 @@
#include "server_socket.h"
#include "client.h"
#include "conf.h"
#include "glib_compat.h"
#include "main.h"
#include <string.h>
...
...
src/output/httpd_client.c
View file @
5dfc0918
...
...
@@ -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>
...
...
src/playlist/despotify_playlist_plugin.c
View file @
5dfc0918
...
...
@@ -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>
...
...
src/playlist/lastfm_playlist_plugin.c
View file @
5dfc0918
...
...
@@ -25,7 +25,6 @@
#include "uri.h"
#include "song.h"
#include "input_stream.h"
#include "glib_compat.h"
#include <glib.h>
...
...
src/playlist_list.c
View file @
5dfc0918
...
...
@@ -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>
...
...
src/resolver.c
View file @
5dfc0918
...
...
@@ -19,7 +19,6 @@
#include "config.h"
#include "resolver.h"
#include "glib_compat.h"
#ifndef G_OS_WIN32
#include <sys/socket.h>
...
...
src/server_socket.c
View file @
5dfc0918
...
...
@@ -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>
...
...
src/state_file.c
View file @
5dfc0918
...
...
@@ -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>
...
...
src/tcp_connect.c
View file @
5dfc0918
...
...
@@ -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>
...
...
src/update_archive.c
View file @
5dfc0918
...
...
@@ -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"
...
...
src/update_container.c
View file @
5dfc0918
...
...
@@ -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"
...
...
src/update_io.c
View file @
5dfc0918
...
...
@@ -21,6 +21,7 @@
#include "update_io.h"
#include "mapper.h"
#include "directory.h"
#include "glib_compat.h"
#include <glib.h>
...
...
src/update_song.c
View file @
5dfc0918
...
...
@@ -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"
...
...
src/update_walk.c
View file @
5dfc0918
...
...
@@ -33,7 +33,6 @@
#include "mapper.h"
#include "path.h"
#include "playlist_list.h"
#include "glib_compat.h"
#include "conf.h"
#include <glib.h>
...
...
test/test_byte_reverse.c
View file @
5dfc0918
...
...
@@ -18,7 +18,6 @@
*/
#include "util/byte_reverse.h"
#include "test_glib_compat.h"
#include <glib.h>
...
...
test/test_glib_compat.h
deleted
100644 → 0
View file @
2eb14658
/*
* Copyright (C) 2003-2011 The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
/*
* Compatibility header for GLib before 2.16.
*/
#ifndef MPD_TEST_GLIB_COMPAT_H
#define MPD_TEST_GLIB_COMPAT_H
#include <glib.h>
#if !GLIB_CHECK_VERSION(2,16,0)
#include <string.h>
#define g_assert_cmpint(n1, cmp, n2) g_assert((n1) cmp (n2))
#define g_assert_cmpstr(a, cmp, b) g_assert(strcmp(a, b) cmp 0)
static
void
(
*
test_functions
[
256
])(
void
);
static
unsigned
num_test_functions
;
static
inline
void
g_test_init
(
G_GNUC_UNUSED
int
*
argc
,
G_GNUC_UNUSED
char
***
argv
,
...)
{
}
static
inline
void
g_test_add_func
(
G_GNUC_UNUSED
const
char
*
testpath
,
void
(
test_funcvoid
)(
void
))
{
test_functions
[
num_test_functions
++
]
=
test_funcvoid
;
}
static
inline
int
g_test_run
(
void
)
{
for
(
unsigned
i
=
0
;
i
<
num_test_functions
;
++
i
)
test_functions
[
i
]();
return
0
;
}
#endif
/* !2.16 */
#endif
test/test_pcm_channels.c
View file @
5dfc0918
...
...
@@ -19,7 +19,6 @@
#include "config.h"
#include "test_pcm_all.h"
#include "test_glib_compat.h"
#include "pcm_channels.h"
#include "pcm_buffer.h"
...
...
test/test_pcm_dither.c
View file @
5dfc0918
...
...
@@ -18,7 +18,6 @@
*/
#include "test_pcm_all.h"
#include "test_glib_compat.h"
#include "pcm_dither.h"
#include <glib.h>
...
...
test/test_pcm_main.c
View file @
5dfc0918
...
...
@@ -18,7 +18,6 @@
*/
#include "test_pcm_all.h"
#include "test_glib_compat.h"
#include <glib.h>
...
...
test/test_pcm_pack.c
View file @
5dfc0918
...
...
@@ -19,7 +19,6 @@
#include "test_pcm_all.h"
#include "pcm_pack.h"
#include "test_glib_compat.h"
#include <glib.h>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment