diff options
Diffstat (limited to 'ffmpeg/libavutil/attributes.h')
| -rw-r--r-- | ffmpeg/libavutil/attributes.h | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/ffmpeg/libavutil/attributes.h b/ffmpeg/libavutil/attributes.h index 64b46f6..7d3f4a9 100644 --- a/ffmpeg/libavutil/attributes.h +++ b/ffmpeg/libavutil/attributes.h @@ -52,6 +52,8 @@ #if AV_GCC_VERSION_AT_LEAST(3,1) # define av_noinline __attribute__((noinline)) +#elif defined(_MSC_VER) +# define av_noinline __declspec(noinline) #else # define av_noinline #endif @@ -62,10 +64,6 @@ # define av_pure #endif -#ifndef av_restrict -#define av_restrict restrict -#endif - #if AV_GCC_VERSION_AT_LEAST(2,6) # define av_const __attribute__((const)) #else @@ -78,7 +76,7 @@ # define av_cold #endif -#if AV_GCC_VERSION_AT_LEAST(4,1) +#if AV_GCC_VERSION_AT_LEAST(4,1) && !defined(__llvm__) # define av_flatten __attribute__((flatten)) #else # define av_flatten @@ -86,6 +84,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 +102,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 |
