• Main Page
  • Related Pages
  • Modules
  • Data Structures
  • Files
  • File List
  • Globals

debian/tmp/usr/include/libavutil/attributes.h

Go to the documentation of this file.
00001 /*
00002  * copyright (c) 2006 Michael Niedermayer <michaelni@gmx.at>
00003  *
00004  * This file is part of FFmpeg.
00005  *
00006  * FFmpeg is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU Lesser General Public
00008  * License as published by the Free Software Foundation; either
00009  * version 2.1 of the License, or (at your option) any later version.
00010  *
00011  * FFmpeg is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014  * Lesser General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU Lesser General Public
00017  * License along with FFmpeg; if not, write to the Free Software
00018  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
00019  */
00020 
00026 #ifndef AVUTIL_ATTRIBUTES_H
00027 #define AVUTIL_ATTRIBUTES_H
00028 
00029 #ifdef __GNUC__
00030 #    define AV_GCC_VERSION_AT_LEAST(x,y) (__GNUC__ > x || __GNUC__ == x && __GNUC_MINOR__ >= y)
00031 #else
00032 #    define AV_GCC_VERSION_AT_LEAST(x,y) 0
00033 #endif
00034 
00035 #ifndef av_always_inline
00036 #if AV_GCC_VERSION_AT_LEAST(3,1)
00037 #    define av_always_inline __attribute__((always_inline)) inline
00038 #else
00039 #    define av_always_inline inline
00040 #endif
00041 #endif
00042 
00043 #ifndef av_noreturn
00044 #if AV_GCC_VERSION_AT_LEAST(2,5)
00045 #    define av_noreturn __attribute__((noreturn))
00046 #else
00047 #    define av_noreturn
00048 #endif
00049 #endif
00050 
00051 #ifndef av_noinline
00052 #if AV_GCC_VERSION_AT_LEAST(3,1)
00053 #    define av_noinline __attribute__((noinline))
00054 #else
00055 #    define av_noinline
00056 #endif
00057 #endif
00058 
00059 #ifndef av_pure
00060 #if AV_GCC_VERSION_AT_LEAST(3,1)
00061 #    define av_pure __attribute__((pure))
00062 #else
00063 #    define av_pure
00064 #endif
00065 #endif
00066 
00067 #ifndef av_const
00068 #if AV_GCC_VERSION_AT_LEAST(2,6)
00069 #    define av_const __attribute__((const))
00070 #else
00071 #    define av_const
00072 #endif
00073 #endif
00074 
00075 #ifndef av_cold
00076 #if AV_GCC_VERSION_AT_LEAST(4,3)
00077 #    define av_cold __attribute__((cold))
00078 #else
00079 #    define av_cold
00080 #endif
00081 #endif
00082 
00083 #ifndef av_flatten
00084 #if AV_GCC_VERSION_AT_LEAST(4,1)
00085 #    define av_flatten __attribute__((flatten))
00086 #else
00087 #    define av_flatten
00088 #endif
00089 #endif
00090 
00091 #ifndef attribute_deprecated
00092 #if AV_GCC_VERSION_AT_LEAST(3,1)
00093 #    define attribute_deprecated __attribute__((deprecated))
00094 #else
00095 #    define attribute_deprecated
00096 #endif
00097 #endif
00098 
00104 #ifndef AV_NOWARN_DEPRECATED
00105 #if AV_GCC_VERSION_AT_LEAST(4,6)
00106 #    define AV_NOWARN_DEPRECATED(code) \
00107         _Pragma("GCC diagnostic push") \
00108         _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") \
00109         code \
00110         _Pragma("GCC diagnostic pop")
00111 #else
00112 #    define AV_NOWARN_DEPRECATED(code) code
00113 #endif
00114 #endif
00115 
00116 
00117 #ifndef av_unused
00118 #if defined(__GNUC__)
00119 #    define av_unused __attribute__((unused))
00120 #else
00121 #    define av_unused
00122 #endif
00123 #endif
00124 
00130 #ifndef av_used
00131 #if AV_GCC_VERSION_AT_LEAST(3,1)
00132 #    define av_used __attribute__((used))
00133 #else
00134 #    define av_used
00135 #endif
00136 #endif
00137 
00138 #ifndef av_alias
00139 #if AV_GCC_VERSION_AT_LEAST(3,3)
00140 #   define av_alias __attribute__((may_alias))
00141 #else
00142 #   define av_alias
00143 #endif
00144 #endif
00145 
00146 #ifndef av_uninit
00147 #if defined(__GNUC__) && !defined(__INTEL_COMPILER)
00148 #    define av_uninit(x) x=x
00149 #else
00150 #    define av_uninit(x) x
00151 #endif
00152 #endif
00153 
00154 #ifdef __GNUC__
00155 #    define av_builtin_constant_p __builtin_constant_p
00156 #    define av_printf_format(fmtpos, attrpos) __attribute__((__format__(__printf__, fmtpos, attrpos)))
00157 #else
00158 #    define av_builtin_constant_p(x) 0
00159 #    define av_printf_format(fmtpos, attrpos)
00160 #endif
00161 
00162 #endif /* AVUTIL_ATTRIBUTES_H */
Generated on Fri Feb 1 2013 14:34:26 for FFmpeg by doxygen 1.7.1