[Spice-devel] [protocol v3 2/2] macros: Add MSVC support to SPICE_GNUC_DEPRECATED
Francois Gouget
fgouget at codeweavers.com
Mon Nov 21 18:24:52 UTC 2016
Based on the G_DEPRECATED GLib macro.
Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---
spice/macros.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/spice/macros.h b/spice/macros.h
index 42916b9..684bfc2 100644
--- a/spice/macros.h
+++ b/spice/macros.h
@@ -82,6 +82,8 @@
#define SPICE_GNUC_DEPRECATED G_DEPRECATED
#elif __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)
#define SPICE_GNUC_DEPRECATED __attribute__((__deprecated__))
+#elif defined(_MSC_VER) && (_MSC_VER >= 1300)
+#define SPICE_GNUC_DEPRECATED __declspec(deprecated)
#else
#define SPICE_GNUC_DEPRECATED
#endif /* __GNUC__ */
--
2.10.1
More information about the Spice-devel
mailing list