[protocol v4 2/2] macros: Add MSVC support to SPICE_GNUC_DEPRECATED

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Based on the G_DEPRECATED GLib macro.
For projects that don't use GLib.

Signed-off-by: Francois Gouget <fgouget@xxxxxxxxxxxxxxx>
---
 spice/macros.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/spice/macros.h b/spice/macros.h
index ae11b3c..1f8a5c8 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
-- 
2.10.1
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]