Mercurial > libavutil.hg
annotate attributes.h @ 880:30f20f8cf016 libavutil
Replace all the occurrences of AVERROR_EIO with AVERROR(EIO), and mark
AVERROR_EIO for deletion at the next major bump.
author | stefano |
---|---|
date | Sat, 13 Mar 2010 19:19:44 +0000 |
parents | efba70214ef1 |
children | 6ea86beeedb2 |
rev | line source |
---|---|
866
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
1 /* |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
2 * copyright (c) 2006 Michael Niedermayer <michaelni@gmx.at> |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
3 * |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
4 * This file is part of FFmpeg. |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
5 * |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
6 * FFmpeg is free software; you can redistribute it and/or |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
7 * modify it under the terms of the GNU Lesser General Public |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
8 * License as published by the Free Software Foundation; either |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
9 * version 2.1 of the License, or (at your option) any later version. |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
10 * |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
11 * FFmpeg is distributed in the hope that it will be useful, |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
14 * Lesser General Public License for more details. |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
15 * |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
16 * You should have received a copy of the GNU Lesser General Public |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
17 * License along with FFmpeg; if not, write to the Free Software |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
19 */ |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
20 |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
21 /** |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
22 * @file libavutil/attributes.h |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
23 * Macro definitions for various function/variable attributes |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
24 */ |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
25 |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
26 #ifndef AVUTIL_ATTRIBUTES_H |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
27 #define AVUTIL_ATTRIBUTES_H |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
28 |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
29 #ifdef __GNUC__ |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
30 # define AV_GCC_VERSION_AT_LEAST(x,y) (__GNUC__ > x || __GNUC__ == x && __GNUC_MINOR__ >= y) |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
31 #else |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
32 # define AV_GCC_VERSION_AT_LEAST(x,y) 0 |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
33 #endif |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
34 |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
35 #ifndef av_always_inline |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
36 #if AV_GCC_VERSION_AT_LEAST(3,1) |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
37 # define av_always_inline __attribute__((always_inline)) inline |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
38 #else |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
39 # define av_always_inline inline |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
40 #endif |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
41 #endif |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
42 |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
43 #ifndef av_noinline |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
44 #if AV_GCC_VERSION_AT_LEAST(3,1) |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
45 # define av_noinline __attribute__((noinline)) |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
46 #else |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
47 # define av_noinline |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
48 #endif |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
49 #endif |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
50 |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
51 #ifndef av_pure |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
52 #if AV_GCC_VERSION_AT_LEAST(3,1) |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
53 # define av_pure __attribute__((pure)) |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
54 #else |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
55 # define av_pure |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
56 #endif |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
57 #endif |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
58 |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
59 #ifndef av_const |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
60 #if AV_GCC_VERSION_AT_LEAST(2,6) |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
61 # define av_const __attribute__((const)) |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
62 #else |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
63 # define av_const |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
64 #endif |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
65 #endif |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
66 |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
67 #ifndef av_cold |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
68 #if (!defined(__ICC) || __ICC > 1110) && AV_GCC_VERSION_AT_LEAST(4,3) |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
69 # define av_cold __attribute__((cold)) |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
70 #else |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
71 # define av_cold |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
72 #endif |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
73 #endif |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
74 |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
75 #ifndef av_flatten |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
76 #if (!defined(__ICC) || __ICC > 1110) && AV_GCC_VERSION_AT_LEAST(4,1) |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
77 # define av_flatten __attribute__((flatten)) |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
78 #else |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
79 # define av_flatten |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
80 #endif |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
81 #endif |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
82 |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
83 #ifndef attribute_deprecated |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
84 #if AV_GCC_VERSION_AT_LEAST(3,1) |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
85 # define attribute_deprecated __attribute__((deprecated)) |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
86 #else |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
87 # define attribute_deprecated |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
88 #endif |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
89 #endif |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
90 |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
91 #ifndef av_unused |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
92 #if defined(__GNUC__) |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
93 # define av_unused __attribute__((unused)) |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
94 #else |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
95 # define av_unused |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
96 #endif |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
97 #endif |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
98 |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
99 #ifndef av_uninit |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
100 #if defined(__GNUC__) && !defined(__ICC) |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
101 # define av_uninit(x) x=x |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
102 #else |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
103 # define av_uninit(x) x |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
104 #endif |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
105 #endif |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
106 |
efba70214ef1
Move gcc attribute macros to new header libavutil/attributes.h
mru
parents:
diff
changeset
|
107 #endif /* AVUTIL_ATTRIBUTES_H */ |