[FFmpeg-devel] [PATCH] fix circular #include in libavutil
Baptiste Coudurier
baptiste.coudurier
Sun Aug 2 22:12:03 CEST 2009
On 08/02/2009 01:00 PM, Aurelien Jacobs wrote:
> On Sun, Aug 02, 2009 at 06:13:32PM +0200, Diego Biurrun wrote:
>> common.h #includes mem.h, which #includes common.h.
>>
>> [...]
>>
>> Index: libavutil/common.h
>> ===================================================================
>> --- libavutil/common.h (revision 19565)
>> +++ libavutil/common.h (working copy)
>> @@ -281,8 +281,6 @@
>> }\
>> }
>>
>> -#include "mem.h"
>> -
>> #ifdef HAVE_AV_CONFIG_H
>> # include "internal.h"
>> #endif /* HAVE_AV_CONFIG_H */
>
> This will work fine when compiling ffmpeg because common.h continue to
> include internal.h which itslef includes mem.h.
> But this will break public API. I guess many software relies on the fact
> that common.h include mem.h.
Humm, yes it breaks API, though I'm not sure many software includes
common.h, why would they ? What does common.h provide ?
I think they would include avutil.h which include common.h therefore
mem.h. IN that case including mem.h in avutil.h might make sense.
--
Baptiste COUDURIER GnuPG Key Id: 0x5C1ABAAA
Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
FFmpeg maintainer http://www.ffmpeg.org
More information about the ffmpeg-devel
mailing list