summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancois Gouget <fgouget@codeweavers.com>2016-10-28 11:39:09 +0200
committerVictor Toso <me@victortoso.com>2016-10-31 17:13:30 +0100
commit02431db1f525b614cea9f572b01ba0200a2fd0c3 (patch)
tree81ed67cd8ce244b13a0d9f64bc6906cb102a5dc8
parentc6d9fa1c4af03d9875bf503ce6eabc9e7b52acc3 (diff)
build-sys: Remove SPICE_NO_DEPRECATED
The new policy is that deprecation warnings should not be disabled globally or even per-file with SPICE_NO_DEPRECATED. Instead they should either be fixed, or ignored locally with G_GNUC_{BEGIN,END}_IGNORE_DEPRECATIONS. Signed-off-by: Francois Gouget <fgouget@codeweavers.com> Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
-rw-r--r--src/Makefile.am1
-rw-r--r--src/spice-util.h12
2 files changed, 3 insertions, 10 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 78953dd..3f81866 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -77,7 +77,6 @@ KEYMAP_GEN = $(srcdir)/keymap-gen.pl
SPICE_COMMON_CPPFLAGS = \
-DSPICE_COMPILATION \
-DG_LOG_DOMAIN=\"GSpice\" \
- -DSPICE_NO_DEPRECATED \
-DSPICE_GTK_LOCALEDIR=\"${SPICE_GTK_LOCALEDIR}\" \
-DPNP_IDS=\""$(PNP_IDS)"\" \
-DUSB_IDS=\""$(USB_IDS)"\" \
diff --git a/src/spice-util.h b/src/spice-util.h
index 88e3a57..a01da0c 100644
--- a/src/spice-util.h
+++ b/src/spice-util.h
@@ -41,22 +41,16 @@ gchar* spice_uuid_to_string(const guint8 uuid[16]);
#define SPICE_RESERVED_PADDING (10 * sizeof(void*))
/* need to be in a public header */
-#ifndef SPICE_GNUC_DEPRECATED_FOR
+#ifndef SPICE_DEPRECATED_FOR
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
-#define SPICE_GNUC_DEPRECATED_FOR(f) \
+#define SPICE_DEPRECATED_FOR(f) \
__attribute__((deprecated("Use " #f " instead")))
#else
-#define SPICE_GNUC_DEPRECATED_FOR(f) G_GNUC_DEPRECATED
+#define SPICE_DEPRECATED_FOR(f) G_GNUC_DEPRECATED
#endif /* __GNUC__ */
#endif
-#ifndef SPICE_NO_DEPRECATED
-#define SPICE_DEPRECATED_FOR(f) SPICE_GNUC_DEPRECATED_FOR(f)
#define SPICE_DEPRECATED G_GNUC_DEPRECATED
-#else
-#define SPICE_DEPRECATED_FOR(f)
-#define SPICE_DEPRECATED
-#endif
G_END_DECLS