[FFmpeg-cvslog] lavu: provide msvc implementation of attribute_deprecated
Kirill Gavrilov
git at videolan.org
Fri Sep 6 23:27:00 CEST 2013
ffmpeg | branch: master | Kirill Gavrilov <kirill at sview.ru> | Fri Sep 6 21:32:31 2013 +0400| [0f48acf29bab33a550fd8a8a4781f2b908efa8ca] | committer: Michael Niedermayer
lavu: provide msvc implementation of attribute_deprecated
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0f48acf29bab33a550fd8a8a4781f2b908efa8ca
---
libavutil/attributes.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/libavutil/attributes.h b/libavutil/attributes.h
index 64b46f6..159e75d 100644
--- a/libavutil/attributes.h
+++ b/libavutil/attributes.h
@@ -86,6 +86,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
@@ -102,6 +104,12 @@
_Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") \
code \
_Pragma("GCC diagnostic pop")
+#elif defined(_MSC_VER)
+# define AV_NOWARN_DEPRECATED(code) \
+ __pragma(warning(push)) \
+ __pragma(warning(disable : 4996)) \
+ code; \
+ __pragma(warning(pop))
#else
# define AV_NOWARN_DEPRECATED(code) code
#endif
More information about the ffmpeg-cvslog
mailing list