[FFmpeg-devel] [PATCH]Simplify #if defined(__GCC__) && ...
Benoit Fouet
benoit.fouet
Mon Dec 22 08:30:02 CET 2008
On 12/20/2008 06:00 PM, Michael Niedermayer wrote:
> On Fri, Dec 19, 2008 at 08:35:43PM +0100, Carl Eugen Hoyos wrote:
>
>> Hi!
>>
>> Attached patch should simplify the #if GCC_VERSION> condition that occurs
>> several times in libavutil.
>>
> [...]
>
>> Index: libavutil/common.h
>> ===================================================================
>> --- libavutil/common.h (revision 16223)
>> +++ libavutil/common.h (working copy)
>> @@ -41,8 +41,10 @@
>> # include <math.h>
>> #endif /* HAVE_AV_CONFIG_H */
>>
>> +#define AV_GCC_VERSION_GREATER(x,y) (defined(__GNUC__) && (__GNUC__ > x || __GNUC__ == x && __GNUC_MINOR__ > y))
>> +
>>
>
> i just wanted to say looks ok but then i realized that a
>
> AV_GCC_VERSION_AT_LEAST() would be more natural as it would contain the
> version of the first gcc that supported something not the last that did
> not
>
>
well... it is the number of the last revision that does not support the
feature, no ?
we check for the minor to be strictly greater than the one which is
specified as an argument to the macro...
(not that I care much about the name, though)
Ben
More information about the ffmpeg-devel
mailing list