[FFmpeg-devel] [PATCH] add #include "config.h" to internal libavutil headers

Måns Rullgård mans
Thu Mar 13 21:59:54 CET 2008


Diego Biurrun <diego at biurrun.de> writes:

> On Thu, Mar 13, 2008 at 08:14:55PM +0000, M?ns Rullg?rd wrote:
>> Diego Biurrun <diego at biurrun.de> writes:
>> 
>> > On Thu, Mar 13, 2008 at 09:08:54AM +0000, M?ns Rullg?rd wrote:
>> >> Diego Biurrun <diego at biurrun.de> writes:
>> >> 
>> >> > This adds a few #include "config.h" to internal libavutil headers to
>> >> > make them self-contained.
>> >> >
>> >> > --- libavutil/intreadwrite.h	(revision 12430)
>> >> > +++ libavutil/intreadwrite.h	(working copy)
>> >> > @@ -21,6 +21,7 @@
>> >> >  
>> >> >  #include <stdint.h>
>> >> >  #include "bswap.h"
>> >> > +#include "config.h"
>> >> 
>> >> If included at all, config.h should be before any other FFmpeg
>> >> headers.
>> >
>> > Well, why not before all headers, including system ones, then?
>> 
>> The system headers don't care what CONFIG_* we've set.
>
> They can care for ARCH_

If they do, they're broken.  That's not documented to have any effect
on system headers.  Furthermore, if it did, we'd be using those
symbols incorrectly.

> or _ISOC9X_SOURCE

That one is set on the compiler command line.  BTW, it's a glibc thing.

> or restrict

Redefining keywords is generally a bad idea.

> or other settings, might they not...?

Settings affecting system headers are better placed on the command
line.

-- 
M?ns Rullg?rd
mans at mansr.com




More information about the ffmpeg-devel mailing list