[Spice-commits] spice/enums.h spice/macros.h
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Nov 4 12:15:07 UTC 2020
spice/enums.h | 2 +-
spice/macros.h | 8 ++++++++
2 files changed, 9 insertions(+), 1 deletion(-)
New commits:
commit ce0c4211e6f16c66477934cc42e70fa0988ca7f0
Author: Frediano Ziglio <freddy77 at gmail.com>
Date: Tue Oct 13 16:06:43 2020 +0100
protocol: Fix enumeration deprecation for Visual Studio
Deprecation on enumeration items is not supported by Microsoft
compiler.
Define and use SPICE_GNUC_DEPRECATED_ENUMERATOR.
Signed-off-by: Frediano Ziglio <freddy77 at gmail.com>
Acked-by: Uri Lublin <uril at redhat.com>
diff --git a/spice/enums.h b/spice/enums.h
index 5c9a54c..0199589 100644
--- a/spice/enums.h
+++ b/spice/enums.h
@@ -377,7 +377,7 @@ typedef enum SpiceCursorFlags {
typedef enum SpiceAudioDataMode {
SPICE_AUDIO_DATA_MODE_INVALID,
SPICE_AUDIO_DATA_MODE_RAW,
- SPICE_AUDIO_DATA_MODE_CELT_0_5_1 SPICE_GNUC_DEPRECATED,
+ SPICE_AUDIO_DATA_MODE_CELT_0_5_1 SPICE_GNUC_DEPRECATED_ENUMERATOR,
SPICE_AUDIO_DATA_MODE_OPUS,
SPICE_AUDIO_DATA_MODE_ENUM_END
diff --git a/spice/macros.h b/spice/macros.h
index a23e866..dd6b189 100644
--- a/spice/macros.h
+++ b/spice/macros.h
@@ -72,6 +72,14 @@
#define SPICE_GNUC_DEPRECATED
#endif
+#if ((defined(__GNUC__) && (__GNUC__ > 6 || (__GNUC__ == 6 && __GNUC_MINOR__ >= 1))) || \
+ (defined(__clang_major__) && (__clang_major__ > 3 || \
+ (__clang_major__ == 3 && __clang_minor__ >= 0))))
+#define SPICE_GNUC_DEPRECATED_ENUMERATOR SPICE_GNUC_DEPRECATED
+#else
+#define SPICE_GNUC_DEPRECATED_ENUMERATOR
+#endif
+
#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)
# define SPICE_GNUC_MAY_ALIAS __attribute__((may_alias))
#else
More information about the Spice-commits
mailing list