diff options
author | Max Kellermann <max@duempel.org> | 2012-08-02 18:15:49 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2012-08-02 19:12:18 +0200 |
commit | 8e331cfc65b6817a147dfaac4d9c4d01414782ac (patch) | |
tree | 5a67ed93b37e98a3164b693da1f7e5a140dbecee /src/client.h | |
parent | edf811fa0271da729e9962e3976f2a68ac35a395 (diff) | |
download | mpd-8e331cfc65b6817a147dfaac4d9c4d01414782ac.tar.gz mpd-8e331cfc65b6817a147dfaac4d9c4d01414782ac.tar.xz mpd-8e331cfc65b6817a147dfaac4d9c4d01414782ac.zip |
gcc.h: re-add gcc_const and gcc_pure
Remove GLib dependency from some headers.
Diffstat (limited to '')
-rw-r--r-- | src/client.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/client.h b/src/client.h index 0302a2e0a..51ad1eb2a 100644 --- a/src/client.h +++ b/src/client.h @@ -20,7 +20,8 @@ #ifndef MPD_CLIENT_H #define MPD_CLIENT_H -#include <glib.h> +#include "gcc.h" + #include <stdbool.h> #include <stddef.h> #include <stdarg.h> @@ -35,28 +36,28 @@ void client_manager_deinit(void); void client_new(struct player_control *player_control, int fd, const struct sockaddr *sa, size_t sa_length, int uid); -G_GNUC_PURE +gcc_pure bool client_is_expired(const struct client *client); /** * returns the uid of the client process, or a negative value if the * uid is unknown */ -G_GNUC_PURE +gcc_pure int client_get_uid(const struct client *client); /** * Is this client running on the same machine, connected with a local * (UNIX domain) socket? */ -G_GNUC_PURE +gcc_pure static inline bool client_is_local(const struct client *client) { return client_get_uid(client) > 0; } -G_GNUC_PURE +gcc_pure unsigned client_get_permission(const struct client *client); void client_set_permission(struct client *client, unsigned permission); @@ -74,6 +75,8 @@ void client_vprintf(struct client *client, const char *fmt, va_list args); /** * Write a printf-like formatted string to the client. */ -G_GNUC_PRINTF(2, 3) void client_printf(struct client *client, const char *fmt, ...); +gcc_fprintf +void +client_printf(struct client *client, const char *fmt, ...); #endif |