summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2011-10-11 14:34:59 +0800
committerMatthias Clasen <mclasen@redhat.com>2011-10-11 13:42:59 -0400
commit08d6e1147d2e6e3abf85ae7a399c689609a7b761 (patch)
treeb51f31353dafd010e4447defe0b293a54d2d3ede
parenta1acf35653ac5d437bdd8dce1b2b56333b005c0c (diff)
downloadglib-08d6e1147d2e6e3abf85ae7a399c689609a7b761.tar.gz
Use GLIB_DEPRECATED instead of G_GNUC_DEPRECATED in our headers
This will let others opt out of seeing GLib deprecation warnings by defining GLIB_DISABLE_DEPRECATION_WARNINGS. https://bugzilla.gnome.org/show_bug.cgi?id=661438
-rw-r--r--gio/gdrive.h7
-rw-r--r--gio/gfile.h14
-rw-r--r--gio/gmount.h14
-rw-r--r--gio/gtlsconnection.h5
-rw-r--r--gio/gunixsocketaddress.h6
-rw-r--r--gio/gvolume.h7
-rw-r--r--glib/deprecated/gcompletion.h22
-rw-r--r--glib/deprecated/grel.h32
-rw-r--r--glib/deprecated/gthread.h149
-rw-r--r--glib/gasyncqueue.h7
-rw-r--r--glib/gatomic.h3
-rw-r--r--glib/gcache.h3
-rw-r--r--glib/gdate.h3
-rw-r--r--glib/gfileutils.h3
-rw-r--r--glib/giochannel.h15
-rw-r--r--glib/gmain.h3
-rw-r--r--glib/gmappedfile.h3
-rw-r--r--glib/gstrfuncs.h13
-rw-r--r--glib/gstring.h6
-rw-r--r--glib/gtree.h3
-rw-r--r--glib/gunicode.h3
-rw-r--r--glib/gutils.h3
-rw-r--r--gobject/gboxed.h3
-rw-r--r--gobject/gobject.h3
-rw-r--r--gobject/gparam.h3
-rw-r--r--gobject/gvaluetypes.h8
26 files changed, 231 insertions, 110 deletions
diff --git a/gio/gdrive.h b/gio/gdrive.h
index 413808763..b49473170 100644
--- a/gio/gdrive.h
+++ b/gio/gdrive.h
@@ -165,14 +165,17 @@ gboolean g_drive_is_media_check_automatic (GDrive *drive);
gboolean g_drive_can_poll_for_media (GDrive *drive);
gboolean g_drive_can_eject (GDrive *drive);
#ifndef G_DISABLE_DEPRECATED
+GLIB_DEPRECATED_FOR(g_drive_eject_with_operation)
void g_drive_eject (GDrive *drive,
GMountUnmountFlags flags,
GCancellable *cancellable,
GAsyncReadyCallback callback,
- gpointer user_data) G_GNUC_DEPRECATED_FOR(g_drive_eject_with_operation);
+ gpointer user_data);
+
+GLIB_DEPRECATED_FOR(g_drive_eject_with_operation_finish)
gboolean g_drive_eject_finish (GDrive *drive,
GAsyncResult *result,
- GError **error) G_GNUC_DEPRECATED_FOR(g_drive_eject_with_operation_finish);
+ GError **error);
#endif
void g_drive_poll_for_media (GDrive *drive,
GCancellable *cancellable,
diff --git a/gio/gfile.h b/gio/gfile.h
index 713cf2c76..c2d61aaf2 100644
--- a/gio/gfile.h
+++ b/gio/gfile.h
@@ -870,14 +870,17 @@ GFile * g_file_mount_mountable_finish (GFile
GAsyncResult *result,
GError **error);
#ifndef G_DISABLE_DEPRECATED
+GLIB_DEPRECATED_FOR(g_file_unmount_mountable_with_operation)
void g_file_unmount_mountable (GFile *file,
GMountUnmountFlags flags,
GCancellable *cancellable,
GAsyncReadyCallback callback,
- gpointer user_data) G_GNUC_DEPRECATED_FOR(g_file_unmount_mountable_with_operation);
+ gpointer user_data);
+
+GLIB_DEPRECATED_FOR(g_file_unmount_mountable_with_operation_finish)
gboolean g_file_unmount_mountable_finish (GFile *file,
GAsyncResult *result,
- GError **error) G_GNUC_DEPRECATED_FOR(g_file_unmount_mountable_with_operation_finish);
+ GError **error);
#endif
void g_file_unmount_mountable_with_operation (GFile *file,
GMountUnmountFlags flags,
@@ -889,14 +892,17 @@ gboolean g_file_unmount_mountable_with_operation_finish (GFile
GAsyncResult *result,
GError **error);
#ifndef G_DISABLE_DEPRECATED
+GLIB_DEPRECATED_FOR(g_file_eject_mountable_with_operation)
void g_file_eject_mountable (GFile *file,
GMountUnmountFlags flags,
GCancellable *cancellable,
GAsyncReadyCallback callback,
- gpointer user_data) G_GNUC_DEPRECATED_FOR(g_file_eject_mountable_with_operation);
+ gpointer user_data);
+
+GLIB_DEPRECATED_FOR(g_file_eject_mountable_with_operation_finish)
gboolean g_file_eject_mountable_finish (GFile *file,
GAsyncResult *result,
- GError **error) G_GNUC_DEPRECATED_FOR(g_file_eject_mountable_with_operation_finish);
+ GError **error);
#endif
void g_file_eject_mountable_with_operation (GFile *file,
GMountUnmountFlags flags,
diff --git a/gio/gmount.h b/gio/gmount.h
index d06c7e77a..2f5124fa0 100644
--- a/gio/gmount.h
+++ b/gio/gmount.h
@@ -171,23 +171,29 @@ gboolean g_mount_can_unmount (GMount *mount);
gboolean g_mount_can_eject (GMount *mount);
#ifndef G_DISABLE_DEPRECATED
+GLIB_DEPRECATED_FOR(g_mount_unmount_with_operation)
void g_mount_unmount (GMount *mount,
GMountUnmountFlags flags,
GCancellable *cancellable,
GAsyncReadyCallback callback,
- gpointer user_data) G_GNUC_DEPRECATED_FOR(g_mount_unmount_with_operation);
+ gpointer user_data);
+
+GLIB_DEPRECATED_FOR(g_mount_unmount_with_operation_finish)
gboolean g_mount_unmount_finish (GMount *mount,
GAsyncResult *result,
- GError **error) G_GNUC_DEPRECATED_FOR(g_mount_unmount_with_operation_finish);
+ GError **error);
+GLIB_DEPRECATED_FOR(g_mount_eject_with_operation)
void g_mount_eject (GMount *mount,
GMountUnmountFlags flags,
GCancellable *cancellable,
GAsyncReadyCallback callback,
- gpointer user_data) G_GNUC_DEPRECATED_FOR(g_mount_eject_with_operation);
+ gpointer user_data);
+
+GLIB_DEPRECATED_FOR(g_mount_eject_with_operation_finish)
gboolean g_mount_eject_finish (GMount *mount,
GAsyncResult *result,
- GError **error) G_GNUC_DEPRECATED_FOR(g_mount_eject_with_operation_finish);
+ GError **error);
#endif
void g_mount_remount (GMount *mount,
diff --git a/gio/gtlsconnection.h b/gio/gtlsconnection.h
index d74ac4b50..2df950df2 100644
--- a/gio/gtlsconnection.h
+++ b/gio/gtlsconnection.h
@@ -84,9 +84,10 @@ struct _GTlsConnectionClass
GType g_tls_connection_get_type (void) G_GNUC_CONST;
#ifndef G_DISABLE_DEPRECATED
+GLIB_DEPRECATED
void g_tls_connection_set_use_system_certdb (GTlsConnection *conn,
- gboolean use_system_certdb) G_GNUC_DEPRECATED;
-gboolean g_tls_connection_get_use_system_certdb (GTlsConnection *conn) G_GNUC_DEPRECATED;
+ gboolean use_system_certdb);
+GLIB_DEPRECATED gboolean g_tls_connection_get_use_system_certdb (GTlsConnection *conn);
#endif /* G_DISABLE_DEPRECATED */
void g_tls_connection_set_database (GTlsConnection *conn,
diff --git a/gio/gunixsocketaddress.h b/gio/gunixsocketaddress.h
index c6e3e6295..68843f009 100644
--- a/gio/gunixsocketaddress.h
+++ b/gio/gunixsocketaddress.h
@@ -56,8 +56,9 @@ GType g_unix_socket_address_get_type (void) G_GNUC_CONST;
GSocketAddress *g_unix_socket_address_new (const gchar *path);
#ifndef G_DISABLE_DEPRECATED
+GLIB_DEPRECATED_FOR(g_unix_socket_address_new_with_type)
GSocketAddress *g_unix_socket_address_new_abstract (const gchar *path,
- gint path_len) G_GNUC_DEPRECATED_FOR(g_unix_socket_address_new_with_type);
+ gint path_len);
#endif
GSocketAddress *g_unix_socket_address_new_with_type (const gchar *path,
gint path_len,
@@ -66,7 +67,8 @@ const char * g_unix_socket_address_get_path (GUnixSocketAddress *addre
gsize g_unix_socket_address_get_path_len (GUnixSocketAddress *address);
GUnixSocketAddressType g_unix_socket_address_get_address_type (GUnixSocketAddress *address);
#ifndef G_DISABLE_DEPRECATED
-gboolean g_unix_socket_address_get_is_abstract (GUnixSocketAddress *address) G_GNUC_DEPRECATED;
+GLIB_DEPRECATED
+gboolean g_unix_socket_address_get_is_abstract (GUnixSocketAddress *address);
#endif
gboolean g_unix_socket_address_abstract_names_supported (void);
diff --git a/gio/gvolume.h b/gio/gvolume.h
index d16a3adfd..787321e6f 100644
--- a/gio/gvolume.h
+++ b/gio/gvolume.h
@@ -181,14 +181,17 @@ gboolean g_volume_mount_finish (GVolume *volume,
GAsyncResult *result,
GError **error);
#ifndef G_DISABLE_DEPRECATED
+GLIB_DEPRECATED_FOR(g_volume_eject_with_operation)
void g_volume_eject (GVolume *volume,
GMountUnmountFlags flags,
GCancellable *cancellable,
GAsyncReadyCallback callback,
- gpointer user_data) G_GNUC_DEPRECATED_FOR(g_volume_eject_with_operation);
+ gpointer user_data);
+
+GLIB_DEPRECATED_FOR(g_volume_eject_with_operation_finish)
gboolean g_volume_eject_finish (GVolume *volume,
GAsyncResult *result,
- GError **error) G_GNUC_DEPRECATED_FOR(g_volume_eject_with_operation_finish);
+ GError **error);
#endif
char * g_volume_get_identifier (GVolume *volume,
const char *kind);
diff --git a/glib/deprecated/gcompletion.h b/glib/deprecated/gcompletion.h
index e89db50ee..af6cf6157 100644
--- a/glib/deprecated/gcompletion.h
+++ b/glib/deprecated/gcompletion.h
@@ -56,21 +56,29 @@ struct _GCompletion
GCompletionStrncmpFunc strncmp_func;
};
-GCompletion* g_completion_new (GCompletionFunc func) G_GNUC_DEPRECATED;
+GLIB_DEPRECATED
+GCompletion* g_completion_new (GCompletionFunc func);
+GLIB_DEPRECATED
void g_completion_add_items (GCompletion* cmp,
- GList* items) G_GNUC_DEPRECATED;
+ GList* items);
+GLIB_DEPRECATED
void g_completion_remove_items (GCompletion* cmp,
- GList* items) G_GNUC_DEPRECATED;
+ GList* items);
+GLIB_DEPRECATED
void g_completion_clear_items (GCompletion* cmp);
+GLIB_DEPRECATED
GList* g_completion_complete (GCompletion* cmp,
const gchar* prefix,
- gchar** new_prefix) G_GNUC_DEPRECATED;
+ gchar** new_prefix);
+GLIB_DEPRECATED
GList* g_completion_complete_utf8 (GCompletion *cmp,
const gchar* prefix,
- gchar** new_prefix) G_GNUC_DEPRECATED;
+ gchar** new_prefix);
+GLIB_DEPRECATED
void g_completion_set_compare (GCompletion *cmp,
- GCompletionStrncmpFunc strncmp_func) G_GNUC_DEPRECATED;
-void g_completion_free (GCompletion* cmp) G_GNUC_DEPRECATED;
+ GCompletionStrncmpFunc strncmp_func);
+GLIB_DEPRECATED
+void g_completion_free (GCompletion* cmp);
G_END_DECLS
diff --git a/glib/deprecated/grel.h b/glib/deprecated/grel.h
index b65423006..757c92c67 100644
--- a/glib/deprecated/grel.h
+++ b/glib/deprecated/grel.h
@@ -66,31 +66,41 @@ struct _GTuples
* g_relation_count() counts ...
*/
-GRelation* g_relation_new (gint fields) G_GNUC_DEPRECATED;
-void g_relation_destroy (GRelation *relation) G_GNUC_DEPRECATED;
+GLIB_DEPRECATED
+GRelation* g_relation_new (gint fields);
+GLIB_DEPRECATED
+void g_relation_destroy (GRelation *relation);
+GLIB_DEPRECATED
void g_relation_index (GRelation *relation,
gint field,
GHashFunc hash_func,
- GEqualFunc key_equal_func) G_GNUC_DEPRECATED;
+ GEqualFunc key_equal_func);
+GLIB_DEPRECATED
void g_relation_insert (GRelation *relation,
- ...) G_GNUC_DEPRECATED;
+ ...);
+GLIB_DEPRECATED
gint g_relation_delete (GRelation *relation,
gconstpointer key,
- gint field) G_GNUC_DEPRECATED;
+ gint field);
+GLIB_DEPRECATED
GTuples* g_relation_select (GRelation *relation,
gconstpointer key,
- gint field) G_GNUC_DEPRECATED;
+ gint field);
+GLIB_DEPRECATED
gint g_relation_count (GRelation *relation,
gconstpointer key,
- gint field) G_GNUC_DEPRECATED;
+ gint field);
+GLIB_DEPRECATED
gboolean g_relation_exists (GRelation *relation,
...);
-void g_relation_print (GRelation *relation) G_GNUC_DEPRECATED;
-
-void g_tuples_destroy (GTuples *tuples) G_GNUC_DEPRECATED;
+GLIB_DEPRECATED
+void g_relation_print (GRelation *relation);
+GLIB_DEPRECATED
+void g_tuples_destroy (GTuples *tuples);
+GLIB_DEPRECATED
gpointer g_tuples_index (GTuples *tuples,
gint index_,
- gint field) G_GNUC_DEPRECATED;
+ gint field);
G_END_DECLS
diff --git a/glib/deprecated/gthread.h b/glib/deprecated/gthread.h
index d15dd9d9d..e6990700e 100644
--- a/glib/deprecated/gthread.h
+++ b/glib/deprecated/gthread.h
@@ -96,23 +96,28 @@ GLIB_VAR gboolean g_thread_use_default_impl;
GLIB_VAR guint64 (*g_thread_gettime) (void);
-GThread* g_thread_create (GThreadFunc func,
- gpointer data,
- gboolean joinable,
- GError **error) G_GNUC_DEPRECATED_FOR(g_thread_new);
-GThread* g_thread_create_full (GThreadFunc func,
- gpointer data,
- gulong stack_size,
- gboolean joinable,
- gboolean bound,
- GThreadPriority priority,
- GError **error) G_GNUC_DEPRECATED_FOR(g_thread_new_full);
-
-void g_thread_set_priority (GThread *thread,
- GThreadPriority priority) G_GNUC_DEPRECATED;
-
-void g_thread_foreach (GFunc thread_func,
- gpointer user_data) G_GNUC_DEPRECATED;
+GLIB_DEPRECATED_FOR(g_thread_new)
+GThread *g_thread_create (GThreadFunc func,
+ gpointer data,
+ gboolean joinable,
+ GError **error);
+
+GLIB_DEPRECATED_FOR(g_thread_new_full)
+GThread *g_thread_create_full (GThreadFunc func,
+ gpointer data,
+ gulong stack_size,
+ gboolean joinable,
+ gboolean bound,
+ GThreadPriority priority,
+ GError **error);
+
+GLIB_DEPRECATED
+void g_thread_set_priority (GThread *thread,
+ GThreadPriority priority);
+
+GLIB_DEPRECATED
+void g_thread_foreach (GFunc thread_func,
+ gpointer user_data);
#ifndef G_OS_WIN32
#include <pthread.h>
@@ -135,9 +140,12 @@ typedef struct
g_mutex_trylock (g_static_mutex_get_mutex (mutex))
#define g_static_mutex_unlock(mutex) \
g_mutex_unlock (g_static_mutex_get_mutex (mutex))
-void g_static_mutex_init (GStaticMutex *mutex) G_GNUC_DEPRECATED_FOR(g_mutex_init);
-void g_static_mutex_free (GStaticMutex *mutex) G_GNUC_DEPRECATED_FOR(g_mutex_free);
-GMutex* g_static_mutex_get_mutex_impl (GStaticMutex *mutex);
+
+GLIB_DEPRECATED_FOR(g_mutex_init)
+void g_static_mutex_init (GStaticMutex *mutex);
+GLIB_DEPRECATED_FOR(g_mutex_free)
+void g_static_mutex_free (GStaticMutex *mutex);
+GMutex *g_static_mutex_get_mutex_impl (GStaticMutex *mutex);
typedef struct _GStaticRecMutex GStaticRecMutex;
struct _GStaticRecMutex
@@ -149,14 +157,27 @@ struct _GStaticRecMutex
};
#define G_STATIC_REC_MUTEX_INIT { G_STATIC_MUTEX_INIT, 0, {{0, 0, 0, 0}} }
-void g_static_rec_mutex_init (GStaticRecMutex *mutex) G_GNUC_DEPRECATED_FOR(g_rec_mutex_init);
-void g_static_rec_mutex_lock (GStaticRecMutex *mutex) G_GNUC_DEPRECATED_FOR(g_rec_mutex_lock);
-gboolean g_static_rec_mutex_trylock (GStaticRecMutex *mutex) G_GNUC_DEPRECATED_FOR(g_rec_mutex_try_lock);
-void g_static_rec_mutex_unlock (GStaticRecMutex *mutex) G_GNUC_DEPRECATED_FOR(g_rec_mutex_unlock);
+GLIB_DEPRECATED_FOR(g_rec_mutex_init)
+void g_static_rec_mutex_init (GStaticRecMutex *mutex);
+
+GLIB_DEPRECATED_FOR(g_rec_mutex_lock)
+void g_static_rec_mutex_lock (GStaticRecMutex *mutex);
+
+GLIB_DEPRECATED_FOR(g_rec_mutex_try_lock)
+gboolean g_static_rec_mutex_trylock (GStaticRecMutex *mutex);
+
+GLIB_DEPRECATED_FOR(g_rec_mutex_unlock)
+void g_static_rec_mutex_unlock (GStaticRecMutex *mutex);
+
+GLIB_DEPRECATED
void g_static_rec_mutex_lock_full (GStaticRecMutex *mutex,
- guint depth) G_GNUC_DEPRECATED;
-guint g_static_rec_mutex_unlock_full (GStaticRecMutex *mutex) G_GNUC_DEPRECATED;
-void g_static_rec_mutex_free (GStaticRecMutex *mutex) G_GNUC_DEPRECATED_FOR(g_rec_mutex_free);
+ guint depth);
+
+GLIB_DEPRECATED
+guint g_static_rec_mutex_unlock_full (GStaticRecMutex *mutex);
+
+GLIB_DEPRECATED_FOR(g_rec_mutex_free)
+void g_static_rec_mutex_free (GStaticRecMutex *mutex);
typedef struct _GStaticRWLock GStaticRWLock;
struct _GStaticRWLock
@@ -173,16 +194,32 @@ struct _GStaticRWLock
#define G_STATIC_RW_LOCK_INIT { G_STATIC_MUTEX_INIT, NULL, NULL, 0, FALSE, 0, 0 }
-void g_static_rw_lock_init (GStaticRWLock* lock) G_GNUC_DEPRECATED_FOR(g_rw_lock_init);
-void g_static_rw_lock_reader_lock (GStaticRWLock* lock) G_GNUC_DEPRECATED_FOR(g_rw_lock_reader_lock);
-gboolean g_static_rw_lock_reader_trylock (GStaticRWLock* lock) G_GNUC_DEPRECATED_FOR(g_rw_lock_reader_trylock);
-void g_static_rw_lock_reader_unlock (GStaticRWLock* lock) G_GNUC_DEPRECATED_FOR(g_rw_lock_reader_unlock);
-void g_static_rw_lock_writer_lock (GStaticRWLock* lock) G_GNUC_DEPRECATED_FOR(g_rw_lock_writer_lock);
-gboolean g_static_rw_lock_writer_trylock (GStaticRWLock* lock) G_GNUC_DEPRECATED_FOR(g_rw_lock_writer_trylock);
-void g_static_rw_lock_writer_unlock (GStaticRWLock* lock) G_GNUC_DEPRECATED_FOR(g_rw_lock_writer_unlock);
-void g_static_rw_lock_free (GStaticRWLock* lock) G_GNUC_DEPRECATED_FOR(g_rw_lock_free);
+GLIB_DEPRECATED_FOR(g_rw_lock_init)
+void g_static_rw_lock_init (GStaticRWLock *lock);
+
+GLIB_DEPRECATED_FOR(g_rw_lock_reader_lock)
+void g_static_rw_lock_reader_lock (GStaticRWLock *lock);
+
+GLIB_DEPRECATED_FOR(g_rw_lock_reader_trylock)
+gboolean g_static_rw_lock_reader_trylock (GStaticRWLock *lock);
-GPrivate * g_private_new (GDestroyNotify notify) G_GNUC_DEPRECATED;
+GLIB_DEPRECATED_FOR(g_rw_lock_reader_unlock)
+void g_static_rw_lock_reader_unlock (GStaticRWLock *lock);
+
+GLIB_DEPRECATED_FOR(g_rw_lock_writer_lock)
+void g_static_rw_lock_writer_lock (GStaticRWLock *lock);
+
+GLIB_DEPRECATED_FOR(g_rw_lock_writer_trylock)
+gboolean g_static_rw_lock_writer_trylock (GStaticRWLock *lock);
+
+GLIB_DEPRECATED_FOR(g_rw_lock_writer_unlock)
+void g_static_rw_lock_writer_unlock (GStaticRWLock *lock);
+
+GLIB_DEPRECATED_FOR(g_rw_lock_free)
+void g_static_rw_lock_free (GStaticRWLock *lock);
+
+GLIB_DEPRECATED
+GPrivate * g_private_new (GDestroyNotify notify);
typedef struct _GStaticPrivate GStaticPrivate;
struct _GStaticPrivate
@@ -192,18 +229,28 @@ struct _GStaticPrivate
};
#define G_STATIC_PRIVATE_INIT { 0 }
-void g_static_private_init (GStaticPrivate *private_key) G_GNUC_DEPRECATED;
-gpointer g_static_private_get (GStaticPrivate *private_key) G_GNUC_DEPRECATED_FOR(g_private_get);
-void g_static_private_set (GStaticPrivate *private_key,
- gpointer data,
- GDestroyNotify notify) G_GNUC_DEPRECATED_FOR(g_private_set);
-void g_static_private_free (GStaticPrivate *private_key) G_GNUC_DEPRECATED;
+GLIB_DEPRECATED
+void g_static_private_init (GStaticPrivate *private_key);
+
+GLIB_DEPRECATED_FOR(g_private_get)
+gpointer g_static_private_get (GStaticPrivate *private_key);
+
+GLIB_DEPRECATED_FOR(g_private_set)
+void g_static_private_set (GStaticPrivate *private_key,
+ gpointer data,
+ GDestroyNotify notify);
+
+GLIB_DEPRECATED
+void g_static_private_free (GStaticPrivate *private_key);
-gboolean g_once_init_enter_impl (volatile gsize *location) G_GNUC_DEPRECATED;
+GLIB_DEPRECATED
+gboolean g_once_init_enter_impl (volatile gsize *location);
-void g_thread_init (gpointer vtable) G_GNUC_DEPRECATED;
+GLIB_DEPRECATED
+void g_thread_init (gpointer vtable);
-gboolean g_thread_get_initialized (void) G_GNUC_DEPRECATED;
+GLIB_DEPRECATED
+gboolean g_thread_get_initialized (void);
GLIB_VAR gboolean g_threads_got_initialized;
@@ -213,10 +260,14 @@ GLIB_VAR gboolean g_threads_got_initialized;
#define g_thread_supported() (g_threads_got_initialized)
#endif
-GMutex * g_mutex_new (void) G_GNUC_DEPRECATED;
-void g_mutex_free (GMutex *mutex) G_GNUC_DEPRECATED;
-GCond * g_cond_new (void) G_GNUC_DEPRECATED;
-void g_cond_free (GCond *cond) G_GNUC_DEPRECATED;
+GLIB_DEPRECATED
+GMutex * g_mutex_new (void);
+GLIB_DEPRECATED
+void g_mutex_free (GMutex *mutex) ;
+GLIB_DEPRECATED
+GCond * g_cond_new (void);
+GLIB_DEPRECATED
+void g_cond_free (GCond *cond);
G_END_DECLS
diff --git a/glib/gasyncqueue.h b/glib/gasyncqueue.h
index d9877b524..90d18545f 100644
--- a/glib/gasyncqueue.h
+++ b/glib/gasyncqueue.h
@@ -45,8 +45,11 @@ GAsyncQueue *g_async_queue_ref (GAsyncQueue *queue);
void g_async_queue_unref (GAsyncQueue *queue);
#ifndef G_DISABLE_DEPRECATED
-void g_async_queue_ref_unlocked (GAsyncQueue *queue) G_GNUC_DEPRECATED_FOR(g_async_queue_ref);
-void g_async_queue_unref_and_unlock (GAsyncQueue *queue) G_GNUC_DEPRECATED_FOR(g_async_queue_unref);
+GLIB_DEPRECATED_FOR(g_async_queue_ref)
+void g_async_queue_ref_unlocked (GAsyncQueue *queue);
+
+GLIB_DEPRECATED_FOR(g_async_queue_unref)
+void g_async_queue_unref_and_unlock (GAsyncQueue *queue);
#endif /* !G_DISABLE_DEPRECATED */
void g_async_queue_push (GAsyncQueue *queue,
diff --git a/glib/gatomic.h b/glib/gatomic.h
index 55171cd59..8b43bf098 100644
--- a/glib/gatomic.h
+++ b/glib/gatomic.h
@@ -63,8 +63,9 @@ gsize g_atomic_pointer_xor (volatile void *a
gsize val);
#ifndef G_DISABLE_DEPRECATED
+GLIB_DEPRECATED_FOR(g_atomic_add)
gint g_atomic_int_exchange_and_add (volatile gint *atomic,
- gint val) G_GNUC_DEPRECATED_FOR(g_atomic_add);
+ gint val);
#endif
G_END_DECLS
diff --git a/glib/gcache.h b/glib/gcache.h
index a95444da7..a7c8ffabc 100644
--- a/glib/gcache.h
+++ b/glib/gcache.h
@@ -59,9 +59,10 @@ void g_cache_key_foreach (GCache *cache,
GHFunc func,
gpointer user_data);
#ifndef G_DISABLE_DEPRECATED
+GLIB_DEPRECATED_FOR(g_cache_key_foreach)
void g_cache_value_foreach (GCache *cache,
GHFunc func,
- gpointer user_data) G_GNUC_DEPRECATED_FOR(g_cache_key_foreach);
+ gpointer user_data);
#endif
G_END_DECLS
diff --git a/glib/gdate.h b/glib/gdate.h
index 6886a46a6..5b9219105 100644
--- a/glib/gdate.h
+++ b/glib/gdate.h
@@ -175,8 +175,9 @@ void g_date_set_time_t (GDate *date,
void g_date_set_time_val (GDate *date,
GTimeVal *timeval);
#ifndef G_DISABLE_DEPRECATED
+GLIB_DEPRECATED_FOR(g_date_set_time_t)
void g_date_set_time (GDate *date,
- GTime time_) G_GNUC_DEPRECATED_FOR(g_date_set_time_t);
+ GTime time_);
#endif
void g_date_set_month (GDate *date,
GDateMonth month);
diff --git a/glib/gfileutils.h b/glib/gfileutils.h
index 6de288614..a3ff242f9 100644
--- a/glib/gfileutils.h
+++ b/glib/gfileutils.h
@@ -129,7 +129,8 @@ gchar * g_format_size_full (guint64 size,
gchar * g_format_size (guint64 size);
#ifndef G_DISABLE_DEPRECATED
-char *g_format_size_for_display (goffset size) G_GNUC_DEPRECATED_FOR(g_format_size);
+GLIB_DEPRECATED_FOR(g_format_size)
+char *g_format_size_for_display (goffset size);
#endif
gchar *g_build_path (const gchar *separator,
diff --git a/glib/giochannel.h b/glib/giochannel.h
index 1ac0ba89b..ed9e51c0a 100644
--- a/glib/giochannel.h
+++ b/glib/giochannel.h
@@ -174,18 +174,25 @@ GIOChannel *g_io_channel_ref (GIOChannel *channel);
void g_io_channel_unref (GIOChannel *channel);
#ifndef G_DISABLE_DEPRECATED
+GLIB_DEPRECATED_FOR(g_io_channel_read_for)
GIOError g_io_channel_read (GIOChannel *channel,
gchar *buf,
gsize count,
- gsize *bytes_read) G_GNUC_DEPRECATED_FOR(g_io_channel_read_for);
+ gsize *bytes_read);
+
+GLIB_DEPRECATED_FOR(g_io_channel_write_chars)
GIOError g_io_channel_write (GIOChannel *channel,
const gchar *buf,
gsize count,
- gsize *bytes_written) G_GNUC_DEPRECATED_FOR(g_io_channel_write_chars);
+ gsize *bytes_written);
+
+GLIB_DEPRECATED_FOR(g_io_channel_seek_position)
GIOError g_io_channel_seek (GIOChannel *channel,
gint64 offset,
- GSeekType type) G_GNUC_DEPRECATED_FOR(g_io_channel_seek_position);
-void g_io_channel_close (GIOChannel *channel) G_GNUC_DEPRECATED_FOR(g_io_channel_shutdown);
+ GSeekType type);
+
+GLIB_DEPRECATED_FOR(g_io_channel_shutdown)
+void g_io_channel_close (GIOChannel *channel);
#endif /* G_DISABLE_DEPRECATED */
GIOStatus g_io_channel_shutdown (GIOChannel *channel,
diff --git a/glib/gmain.h b/glib/gmain.h
index a3992ec3c..13429a852 100644
--- a/glib/gmain.h
+++ b/glib/gmain.h
@@ -408,8 +408,9 @@ void g_source_remove_child_source (GSource *source,
GSource *child_source);
#ifndef G_DISABLE_DEPRECATED
+GLIB_DEPRECATED_FOR(g_source_get_time)
void g_source_get_current_time (GSource *source,
- GTimeVal *timeval) G_GNUC_DEPRECATED_FOR(g_source_get_time);
+ GTimeVal *timeval);
#endif
gint64 g_source_get_time (GSource *source);
diff --git a/glib/gmappedfile.h b/glib/gmappedfile.h
index dfc84fbdd..b7ca9d554 100644
--- a/glib/gmappedfile.h
+++ b/glib/gmappedfile.h
@@ -44,7 +44,8 @@ GMappedFile *g_mapped_file_ref (GMappedFile *file);
void g_mapped_file_unref (GMappedFile *file);
#ifndef G_DISABLE_DEPRECATED
-void g_mapped_file_free (GMappedFile *file) G_GNUC_DEPRECATED_FOR(g_mapped_file_unref);
+GLIB_DEPRECATED_FOR(g_mapped_file_unref)
+void g_mapped_file_free (GMappedFile *file);
#endif
G_END_DECLS
diff --git a/glib/gstrfuncs.h b/glib/gstrfuncs.h
index 8cd3c30d5..134ddb71f 100644
--- a/glib/gstrfuncs.h
+++ b/glib/gstrfuncs.h
@@ -174,13 +174,18 @@ gchar* g_ascii_strup (const gchar *str,
* toupper, which is almost never the right thing.
*/
+GLIB_DEPRECATED
gint g_strcasecmp (const gchar *s1,
- const gchar *s2) G_GNUC_DEPRECATED;
+ const gchar *s2);
+
+GLIB_DEPRECATED
gint g_strncasecmp (const gchar *s1,
const gchar *s2,
- guint n) G_GNUC_DEPRECATED;
-gchar* g_strdown (gchar *string) G_GNUC_DEPRECATED;
-gchar* g_strup (gchar *string) G_GNUC_DEPRECATED;
+ guint n);
+GLIB_DEPRECATED
+gchar* g_strdown (gchar *string);
+GLIB_DEPRECATED
+gchar* g_strup (gchar *string);
#endif /* G_DISABLE_DEPRECATED */
diff --git a/glib/gstring.h b/glib/gstring.h
index fc79ae332..4e5e1ec66 100644
--- a/glib/gstring.h
+++ b/glib/gstring.h
@@ -142,8 +142,10 @@ g_string_append_c_inline (GString *gstring,
#ifndef G_DISABLE_DEPRECATED
-GString *g_string_down (GString *string) G_GNUC_DEPRECATED;
-GString *g_string_up (GString *string) G_GNUC_DEPRECATED;
+GLIB_DEPRECATED
+GString *g_string_down (GString *string);
+GLIB_DEPRECATED
+GString *g_string_up (GString *string);
#define g_string_sprintf g_string_printf
#define g_string_sprintfa g_string_append_printf
diff --git a/glib/gtree.h b/glib/gtree.h
index df84d268b..0284c0818 100644
--- a/glib/gtree.h
+++ b/glib/gtree.h
@@ -74,10 +74,11 @@ void g_tree_foreach (GTree *tree,
gpointer user_data);
#ifndef G_DISABLE_DEPRECATED
+GLIB_DEPRECATED
void g_tree_traverse (GTree *tree,
GTraverseFunc traverse_func,
GTraverseType traverse_type,
- gpointer user_data) G_GNUC_DEPRECATED;
+ gpointer user_data);
#endif /* G_DISABLE_DEPRECATED */
gpointer g_tree_search (GTree *tree,
diff --git a/glib/gunicode.h b/glib/gunicode.h
index a283fe049..2216ebfc6 100644
--- a/glib/gunicode.h
+++ b/glib/gunicode.h
@@ -568,8 +568,9 @@ void g_unicode_canonical_ordering (gunichar *string,
#ifndef G_DISABLE_DEPRECATED
/* Deprecated. Use g_unichar_fully_decompose() */
+GLIB_DEPRECATED
gunichar *g_unicode_canonical_decomposition (gunichar ch,
- gsize *result_len) G_GNUC_MALLOC G_GNUC_DEPRECATED;
+ gsize *result_len) G_GNUC_MALLOC;
#endif
/* Array of skip-bytes-per-initial character.
diff --git a/glib/gutils.h b/glib/gutils.h
index f649a13bc..fe5f2701b 100644
--- a/glib/gutils.h
+++ b/glib/gutils.h
@@ -234,7 +234,8 @@ const gchar * g_path_skip_root (const gchar *file_name);
#ifndef G_DISABLE_DEPRECATED
-const gchar * g_basename (const gchar *file_name) G_GNUC_DEPRECATED_FOR(g_path_get_basename);
+GLIB_DEPRECATED_FOR(g_path_get_basename)
+const gchar * g_basename (const gchar *file_name);
#define g_dirname g_path_get_dirname
#endif /* G_DISABLE_DEPRECATED */
diff --git a/gobject/gboxed.h b/gobject/gboxed.h
index 0fff0e816..d89814060 100644
--- a/gobject/gboxed.h
+++ b/gobject/gboxed.h
@@ -79,8 +79,9 @@ void g_value_set_static_boxed (GValue *value,
void g_value_take_boxed (GValue *value,
gconstpointer v_boxed);
#ifndef G_DISABLE_DEPRECATED
+GLIB_DEPRECATED_FOR(g_value_take_boxed)
void g_value_set_boxed_take_ownership (GValue *value,
- gconstpointer v_boxed) G_GNUC_DEPRECATED_FOR(g_value_take_boxed);
+ gconstpointer v_boxed);
#endif
gpointer g_value_get_boxed (const GValue *value);
gpointer g_value_dup_boxed (const GValue *value);
diff --git a/gobject/gobject.h b/gobject/gobject.h
index fec308993..277001f03 100644
--- a/gobject/gobject.h
+++ b/gobject/gobject.h
@@ -527,8 +527,9 @@ void g_object_run_dispose (GObject *object);
void g_value_take_object (GValue *value,
gpointer v_object);
#ifndef G_DISABLE_DEPRECATED
+GLIB_DEPRECATED_FOR(g_value_take_object)
void g_value_set_object_take_ownership (GValue *value,
- gpointer v_object) G_GNUC_DEPRECATED_FOR(g_value_take_object);
+ gpointer v_object);
#endif
#if !defined(G_DISABLE_DEPRECATED) || defined(GTK_COMPILATION)
diff --git a/gobject/gparam.h b/gobject/gparam.h
index 2561677e0..cc7352b90 100644
--- a/gobject/gparam.h
+++ b/gobject/gparam.h
@@ -313,8 +313,9 @@ GParamSpec* g_value_dup_param (const GValue *value);
void g_value_take_param (GValue *value,
GParamSpec *param);
#ifndef G_DISABLE_DEPRECATED
+GLIB_DEPRECATED_FOR(g_value_take_param)
void g_value_set_param_take_ownership (GValue *value,
- GParamSpec *param) G_GNUC_DEPRECATED_FOR(g_value_take_param);
+ GParamSpec *param);
#endif
/* --- convenience functions --- */
diff --git a/gobject/gvaluetypes.h b/gobject/gvaluetypes.h
index bb2988207..6ec61d554 100644
--- a/gobject/gvaluetypes.h
+++ b/gobject/gvaluetypes.h
@@ -178,9 +178,10 @@ G_BEGIN_DECLS
/* --- prototypes --- */
#ifndef G_DISABLE_DEPRECATED
+GLIB_DEPRECATED
void g_value_set_char (GValue *value,
- gchar v_char) G_GNUC_DEPRECATED;
-gchar g_value_get_char (const GValue *value) G_GNUC_DEPRECATED;
+ gchar v_char);
+GLIB_DEPRECATED gchar g_value_get_char (const GValue *value);
#endif
void g_value_set_schar (GValue *value,
gint8 v_char);
@@ -246,8 +247,9 @@ gchar* g_strdup_value_contents (const GValue *value);
void g_value_take_string (GValue *value,
gchar *v_string);
#ifndef G_DISABLE_DEPRECATED
+GLIB_DEPRECATED_FOR(g_value_take_string)
void g_value_set_string_take_ownership (GValue *value,
- gchar *v_string) G_GNUC_DEPRECATED_FOR(g_value_take_string);
+ gchar *v_string);
#endif