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

Aurelien Jacobs aurel
Fri Mar 14 00:37:25 CET 2008


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 ?
And do you have any other header ordering rule ? (such as always
including lavu headers before lavc headers, or things like that)

I thought one the purpose of "self-contained" headers is that
you don't need to care about includes order, ever (and config.h
has nothing special, it is a header like every others).

Aurel




More information about the ffmpeg-devel mailing list