[Spice-devel] [spice-common PATCH] Remove headers that are included in spice_common.h
Jonathon Jongsma
jjongsma at redhat.com
Wed Dec 23 09:43:06 PST 2015
On Wed, 2015-12-23 at 16:56 +0100, Victor Toso wrote:
> ---
> common/backtrace.c | 5 +----
> common/canvas_utils.c | 7 +------
> common/gl_utils.h | 1 -
> common/glc.c | 5 +----
> common/mem.c | 2 --
> common/ogl_ctx.c | 4 +---
> common/pixman_utils.c | 5 +----
> common/ring.h | 1 -
> common/rop3.c | 2 --
> 9 files changed, 5 insertions(+), 27 deletions(-)
>
> diff --git a/common/backtrace.c b/common/backtrace.c
> index 1b7fab3..6e0d61b 100644
> --- a/common/backtrace.c
> +++ b/common/backtrace.c
> @@ -24,10 +24,9 @@
> #ifdef HAVE_CONFIG_H
> #include <config.h>
> #endif
> +#include "spice_common.h"
>
> #include <unistd.h>
> -#include <stdlib.h>
> -#include <stdio.h>
> #include <errno.h>
> #include <unistd.h>
> #include <sys/types.h>
> @@ -35,8 +34,6 @@
> #include <sys/wait.h>
> #endif
>
> -#include "spice_common.h"
> -
> #define GSTACK_PATH "/usr/bin/gstack"
>
> #if HAVE_EXECINFO_H
> diff --git a/common/canvas_utils.c b/common/canvas_utils.c
> index a3e205f..c5813f4 100644
> --- a/common/canvas_utils.c
> +++ b/common/canvas_utils.c
> @@ -18,14 +18,9 @@
> #ifdef HAVE_CONFIG_H
> #include <config.h>
> #endif
> -
> #include "spice_common.h"
> -#include "canvas_utils.h"
>
> -#ifdef __GNUC__
> -#include <stdlib.h>
> -#include <stdio.h>
> -#endif
> +#include "canvas_utils.h"
> #include "mem.h"
>
> #ifdef WIN32
> diff --git a/common/gl_utils.h b/common/gl_utils.h
> index 5e50400..b6cc6ce 100644
> --- a/common/gl_utils.h
> +++ b/common/gl_utils.h
> @@ -21,7 +21,6 @@
> #ifndef GL_UTILS_H
> #define GL_UTILS_H
>
> -#include <spice/macros.h>
> #include "spice_common.h"
>
> SPICE_BEGIN_DECLS
> diff --git a/common/glc.c b/common/glc.c
> index 8fd8700..a792e55 100644
> --- a/common/glc.c
> +++ b/common/glc.c
> @@ -20,12 +20,10 @@
> #ifdef HAVE_CONFIG_H
> #include <config.h>
> #endif
> +#include "spice_common.h"
>
> -#include <stdlib.h>
> #include <string.h>
> -#include <stdio.h>
> #include <math.h>
> -#include <spice/macros.h>
>
> #include <GL/gl.h>
> #include <GL/glu.h>
> @@ -39,7 +37,6 @@
> #include "mem.h"
> #include "glc.h"
> #include "gl_utils.h"
> -#include "spice_common.h"
>
> #define TESS_VERTEX_ALLOC_BUNCH 20
>
> diff --git a/common/mem.c b/common/mem.c
> index 5f1dbe4..2fda6f3 100644
> --- a/common/mem.c
> +++ b/common/mem.c
> @@ -22,8 +22,6 @@
> #include "spice_common.h"
> #include "mem.h"
>
> -#include <stdlib.h>
> -#include <stdio.h>
> #include <string.h>
>
> #ifndef MALLOC_ERROR
> diff --git a/common/ogl_ctx.c b/common/ogl_ctx.c
> index b4e60fb..2de1b0d 100644
> --- a/common/ogl_ctx.c
> +++ b/common/ogl_ctx.c
> @@ -18,14 +18,12 @@
> #ifdef HAVE_CONFIG_H
> #include <config.h>
> #endif
> +#include "spice_common.h"
>
> -#include <stdlib.h>
> -#include <stdio.h>
> #include <X11/Xlib.h>
> #include <GL/glx.h>
>
> #include "ogl_ctx.h"
> -#include "spice_common.h"
>
> enum {
> OGLCTX_TYPE_PBUF,
> diff --git a/common/pixman_utils.c b/common/pixman_utils.c
> index c2161ca..81806c9 100644
> --- a/common/pixman_utils.c
> +++ b/common/pixman_utils.c
> @@ -18,14 +18,11 @@
> #ifdef HAVE_CONFIG_H
> #include <config.h>
> #endif
> +#include "spice_common.h"
>
> #include "pixman_utils.h"
> -#include "spice_common.h"
> -#include <spice/macros.h>
>
> -#include <stdlib.h>
> #include <string.h>
> -#include <stdio.h>
> #include "mem.h"
>
> /*
> diff --git a/common/ring.h b/common/ring.h
> index 7fba50e..890e5cd 100644
> --- a/common/ring.h
> +++ b/common/ring.h
> @@ -19,7 +19,6 @@
> #ifndef _H_RING2
> #define _H_RING2
>
> -#include <spice/macros.h>
> #include "spice_common.h"
>
> SPICE_BEGIN_DECLS
> diff --git a/common/rop3.c b/common/rop3.c
> index 97bfe0c..1a18fe9 100644
> --- a/common/rop3.c
> +++ b/common/rop3.c
> @@ -19,8 +19,6 @@
> #include <config.h>
> #endif
>
> -#include <stdio.h>
> -
> #include "rop3.h"
> #include "spice_common.h"
>
Acked-by: Jonathon Jongsma <jjongsma at redhat.com>
More information about the Spice-devel
mailing list