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

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_noinline
00044 #if AV_GCC_VERSION_AT_LEAST(3,1)
00045 #    define av_noinline __attribute__((noinline))
00046 #else
00047 #    define av_noinline
00048 #endif
00049 #endif
00050 
00051 #ifndef av_pure
00052 #if AV_GCC_VERSION_AT_LEAST(3,1)
00053 #    define av_pure __attribute__((pure))
00054 #else
00055 #    define av_pure
00056 #endif
00057 #endif
00058 
00059 #ifndef av_const
00060 #if AV_GCC_VERSION_AT_LEAST(2,6)
00061 #    define av_const __attribute__((const))
00062 #else
00063 #    define av_const
00064 #endif
00065 #endif
00066 
00067 #ifndef av_cold
00068 #if (!defined(__ICC) || __ICC > 1110) && AV_GCC_VERSION_AT_LEAST(4,3)
00069 #    define av_cold __attribute__((cold))
00070 #else
00071 #    define av_cold
00072 #endif
00073 #endif
00074 
00075 #ifndef av_flatten
00076 #if (!defined(__ICC) || __ICC > 1110) && AV_GCC_VERSION_AT_LEAST(4,1)
00077 #    define av_flatten __attribute__((flatten))
00078 #else
00079 #    define av_flatten
00080 #endif
00081 #endif
00082 
00083 #ifndef attribute_deprecated
00084 #if AV_GCC_VERSION_AT_LEAST(3,1)
00085 #    define attribute_deprecated __attribute__((deprecated))
00086 #else
00087 #    define attribute_deprecated
00088 #endif
00089 #endif
00090 
00091 #ifndef av_unused
00092 #if defined(__GNUC__)
00093 #    define av_unused __attribute__((unused))
00094 #else
00095 #    define av_unused
00096 #endif
00097 #endif
00098 
00099 #ifndef av_uninit
00100 #if defined(__GNUC__) && !defined(__ICC)
00101 #    define av_uninit(x) x=x
00102 #else
00103 #    define av_uninit(x) x
00104 #endif
00105 #endif
00106 
00107 #ifdef __GNUC__
00108 #    define av_builtin_constant_p __builtin_constant_p
00109 #else
00110 #    define av_builtin_constant_p(x) 0
00111 #endif
00112 
00113 #endif /* AVUTIL_ATTRIBUTES_H */

Generated on Fri Sep 16 2011 17:17:51 for FFmpeg by  doxygen 1.7.1