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

Reimar Döffinger Reimar.Doeffinger
Fri Mar 14 09:11:43 CET 2008


On Thu, Mar 13, 2008 at 11:45:22PM +0000, M?ns Rullg?rd wrote:
> Aurelien Jacobs <aurel at gnuage.org> writes:
> 
> > 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.
> >> >
> >> > Diego
> >> >
> >> > Index: libavutil/intreadwrite.h
> >> > ===================================================================
> >> > --- libavutil/intreadwrite.h	(revision 12430)
> >> > +++ libavutil/intreadwrite.h	(working copy)
> >> > @@ -21,6 +21,7 @@
> >> >  
> >> >  #include <stdint.h>
> >> >  #include "bswap.h"
> >> > +#include "config.h"
> >> >  
> >> >  #ifdef __GNUC__
> >> >  
> >> 
> >> If included at all, config.h should be before any other FFmpeg
> >> headers.
> >
> > Out of curiosity, could you explain why ?
> 
> It made sense when I wrote it, honest.  Assuming all headers that use
> symbols from config.h also include it, the order obviously doesn't
> matter.

It is simply the "logical" order intuitively. No special reason except
that a bit of consistency can't hurt IMO. Allows reading the headers
list a tiny bit faster as well.
Yes, and ideally I would order the lavu before lavc before lavf, but
that matters less in my opinion.




More information about the ffmpeg-devel mailing list