Mercurial > libavutil.hg
comparison internal.h @ 943:da95a329a6b5 libavutil
Document FF_SYMVER and attribute_used
author | michael |
---|---|
date | Wed, 16 Jun 2010 04:53:09 +0000 |
parents | c8b09f0c66a0 |
children | e34e8d654ded |
comparison
equal
deleted
inserted
replaced
942:c8b09f0c66a0 | 943:da95a329a6b5 |
---|---|
44 #else | 44 #else |
45 # define attribute_align_arg | 45 # define attribute_align_arg |
46 #endif | 46 #endif |
47 #endif | 47 #endif |
48 | 48 |
49 | |
50 /** | |
51 * Marks a variable as used and prevents the compiler from optimizing it away. | |
52 * This is usefull for asm that accesses varibles in ways that the compiler doesnt | |
53 * understand | |
54 */ | |
49 #ifndef attribute_used | 55 #ifndef attribute_used |
50 #if AV_GCC_VERSION_AT_LEAST(3,1) | 56 #if AV_GCC_VERSION_AT_LEAST(3,1) |
51 # define attribute_used __attribute__((used)) | 57 # define attribute_used __attribute__((used)) |
52 #else | 58 #else |
53 # define attribute_used | 59 # define attribute_used |
194 # define NULL_IF_CONFIG_SMALL(x) NULL | 200 # define NULL_IF_CONFIG_SMALL(x) NULL |
195 #else | 201 #else |
196 # define NULL_IF_CONFIG_SMALL(x) x | 202 # define NULL_IF_CONFIG_SMALL(x) x |
197 #endif | 203 #endif |
198 | 204 |
205 | |
206 /** | |
207 * Create a non default alias for a function with specified version. | |
208 * This is needed when symbols are moved from a lib to a dependancy of the lib | |
209 * because the gnu linker as of 2010 is buggy and fails to dynamicaly link if a symbol | |
210 * is not found in the lib in which it was during link time with enabled versioning | |
211 * even if a correctly versioned and matching symbol exists in another lib and | |
212 * even if it did find that would it not contain an explicit check to fail | |
213 */ | |
199 #if HAVE_SYMVER_ASM_LABEL | 214 #if HAVE_SYMVER_ASM_LABEL |
200 # define FF_SYMVER(type, name, args, ver) \ | 215 # define FF_SYMVER(type, name, args, ver) \ |
201 type ff_##name args __asm__ (EXTERN_PREFIX #name "@" ver); \ | 216 type ff_##name args __asm__ (EXTERN_PREFIX #name "@" ver); \ |
202 type ff_##name args | 217 type ff_##name args |
203 #elif HAVE_SYMVER_GNU_ASM | 218 #elif HAVE_SYMVER_GNU_ASM |