summaryrefslogtreecommitdiff
path: root/libavutil
diff options
context:
space:
mode:
Diffstat (limited to 'libavutil')
-rw-r--r--libavutil/attributes.h2
-rw-r--r--libavutil/internal.h12
2 files changed, 12 insertions, 2 deletions
diff --git a/libavutil/attributes.h b/libavutil/attributes.h
index 292a0a1a88..850a73ff7a 100644
--- a/libavutil/attributes.h
+++ b/libavutil/attributes.h
@@ -72,6 +72,8 @@
#if AV_GCC_VERSION_AT_LEAST(3,1)
# define attribute_deprecated __attribute__((deprecated))
+#elif defined(_MSC_VER)
+# define attribute_deprecated __declspec(deprecated)
#else
# define attribute_deprecated
#endif
diff --git a/libavutil/internal.h b/libavutil/internal.h
index b18860f084..7b178c25ae 100644
--- a/libavutil/internal.h
+++ b/libavutil/internal.h
@@ -62,8 +62,16 @@
#endif
#if HAVE_PRAGMA_DEPRECATED
-# define FF_DISABLE_DEPRECATION_WARNINGS _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
-# define FF_ENABLE_DEPRECATION_WARNINGS _Pragma("GCC diagnostic warning \"-Wdeprecated-declarations\"")
+# if defined(__ICL)
+# define FF_DISABLE_DEPRECATION_WARNINGS __pragma(warning(push)) __pragma(warning(disable:1478))
+# define FF_ENABLE_DEPRECATION_WARNINGS __pragma(warning(pop))
+# elif defined(_MSC_VER)
+# define FF_DISABLE_DEPRECATION_WARNINGS __pragma(warning(push)) __pragma(warning(disable:4996))
+# define FF_ENABLE_DEPRECATION_WARNINGS __pragma(warning(pop))
+# else
+# define FF_DISABLE_DEPRECATION_WARNINGS _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
+# define FF_ENABLE_DEPRECATION_WARNINGS _Pragma("GCC diagnostic warning \"-Wdeprecated-declarations\"")
+# endif
#else
# define FF_DISABLE_DEPRECATION_WARNINGS
# define FF_ENABLE_DEPRECATION_WARNINGS