Commit a1641e95 authored by Reinhard Tartler's avatar Reinhard Tartler

attributes: drop pointless define guards

the av_-prefixed attributes must not be defined outside of this file
parent 06eb4f08
...@@ -32,7 +32,6 @@ ...@@ -32,7 +32,6 @@
# define AV_GCC_VERSION_AT_LEAST(x,y) 0 # define AV_GCC_VERSION_AT_LEAST(x,y) 0
#endif #endif
#ifndef av_always_inline
#if AV_GCC_VERSION_AT_LEAST(3,1) #if AV_GCC_VERSION_AT_LEAST(3,1)
# define av_always_inline __attribute__((always_inline)) inline # define av_always_inline __attribute__((always_inline)) inline
#elif defined(_MSC_VER) #elif defined(_MSC_VER)
...@@ -40,92 +39,71 @@ ...@@ -40,92 +39,71 @@
#else #else
# define av_always_inline inline # define av_always_inline inline
#endif #endif
#endif
#ifndef av_noinline
#if AV_GCC_VERSION_AT_LEAST(3,1) #if AV_GCC_VERSION_AT_LEAST(3,1)
# define av_noinline __attribute__((noinline)) # define av_noinline __attribute__((noinline))
#else #else
# define av_noinline # define av_noinline
#endif #endif
#endif
#ifndef av_pure
#if AV_GCC_VERSION_AT_LEAST(3,1) #if AV_GCC_VERSION_AT_LEAST(3,1)
# define av_pure __attribute__((pure)) # define av_pure __attribute__((pure))
#else #else
# define av_pure # define av_pure
#endif #endif
#endif
#ifndef av_const
#if AV_GCC_VERSION_AT_LEAST(2,6) #if AV_GCC_VERSION_AT_LEAST(2,6)
# define av_const __attribute__((const)) # define av_const __attribute__((const))
#else #else
# define av_const # define av_const
#endif #endif
#endif
#ifndef av_cold
#if AV_GCC_VERSION_AT_LEAST(4,3) #if AV_GCC_VERSION_AT_LEAST(4,3)
# define av_cold __attribute__((cold)) # define av_cold __attribute__((cold))
#else #else
# define av_cold # define av_cold
#endif #endif
#endif
#ifndef av_flatten
#if AV_GCC_VERSION_AT_LEAST(4,1) #if AV_GCC_VERSION_AT_LEAST(4,1)
# define av_flatten __attribute__((flatten)) # define av_flatten __attribute__((flatten))
#else #else
# define av_flatten # define av_flatten
#endif #endif
#endif
#ifndef attribute_deprecated
#if AV_GCC_VERSION_AT_LEAST(3,1) #if AV_GCC_VERSION_AT_LEAST(3,1)
# define attribute_deprecated __attribute__((deprecated)) # define attribute_deprecated __attribute__((deprecated))
#else #else
# define attribute_deprecated # define attribute_deprecated
#endif #endif
#endif
#ifndef av_unused
#if defined(__GNUC__) #if defined(__GNUC__)
# define av_unused __attribute__((unused)) # define av_unused __attribute__((unused))
#else #else
# define av_unused # define av_unused
#endif #endif
#endif
/** /**
* Mark a variable as used and prevent the compiler from optimizing it * Mark a variable as used and prevent the compiler from optimizing it
* away. This is useful for variables accessed only from inline * away. This is useful for variables accessed only from inline
* assembler without the compiler being aware. * assembler without the compiler being aware.
*/ */
#ifndef av_used
#if AV_GCC_VERSION_AT_LEAST(3,1) #if AV_GCC_VERSION_AT_LEAST(3,1)
# define av_used __attribute__((used)) # define av_used __attribute__((used))
#else #else
# define av_used # define av_used
#endif #endif
#endif
#ifndef av_alias
#if AV_GCC_VERSION_AT_LEAST(3,3) #if AV_GCC_VERSION_AT_LEAST(3,3)
# define av_alias __attribute__((may_alias)) # define av_alias __attribute__((may_alias))
#else #else
# define av_alias # define av_alias
#endif #endif
#endif
#ifndef av_uninit
#if defined(__GNUC__) && !defined(__ICC) #if defined(__GNUC__) && !defined(__ICC)
# define av_uninit(x) x=x # define av_uninit(x) x=x
#else #else
# define av_uninit(x) x # define av_uninit(x) x
#endif #endif
#endif
#ifdef __GNUC__ #ifdef __GNUC__
# define av_builtin_constant_p __builtin_constant_p # define av_builtin_constant_p __builtin_constant_p
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment