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

Måns Rullgård mans
Thu Mar 13 10:08:54 CET 2008


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/x86_cpu.h
> ===================================================================
> --- libavutil/x86_cpu.h	(revision 12430)
> +++ libavutil/x86_cpu.h	(working copy)
> @@ -21,6 +21,8 @@
>  #ifndef FFMPEG_X86CPU_H
>  #define FFMPEG_X86CPU_H
>  
> +#include "config.h"
> +
>  #ifdef ARCH_X86_64
>  #    define REG_a "rax"
>  #    define REG_b "rbx"

OK, I suppose.

> 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.

> Index: libavutil/internal.h
> ===================================================================
> --- libavutil/internal.h	(revision 12430)
> +++ libavutil/internal.h	(working copy)
> @@ -107,6 +107,8 @@
>  
>  #include "intreadwrite.h"
>  #include "bswap.h"
> +#include "common.h"
> +#include "config.h"
>  
>  #ifndef offsetof
>  #    define offsetof(T,F) ((unsigned int)((char *)&((T *)0)->F))

Ditto.

> Index: libavutil/bswap.h
> ===================================================================
> --- libavutil/bswap.h	(revision 12430)
> +++ libavutil/bswap.h	(working copy)
> @@ -27,6 +27,7 @@
>  #define FFMPEG_BSWAP_H
>  
>  #include <stdint.h>
> +#include "config.h"
>  #include "common.h"
>  
>  #ifdef HAVE_BYTESWAP_H

OK, I guess.

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




More information about the ffmpeg-devel mailing list