mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice-protocol
synced 2025-12-26 14:18:31 +00:00
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@gmail.com> Acked-by: Uri Lublin <uril@redhat.com>
This commit is contained in:
parent
3c4309a517
commit
ce0c4211e6
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user