[Spice-devel] [PATCH 2/9] server: misc header cleanups
Jonathon Jongsma
jjongsma at redhat.com
Wed Dec 9 14:12:52 PST 2015
On Wed, 2015-12-09 at 12:17 +0000, Frediano Ziglio wrote:
> Signed-off-by: Marc-André Lureau <marcandre.lureau at gmail.com>
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> Signed-off-by: Jonathon Jongsma <jjongsma at redhat.com>
> ---
> server/Makefile.am | 2 ++
> server/dispatcher.h | 3 +--
> server/glz-encoder-priv.h | 2 ++
> server/glz-encoder.h | 2 +-
> server/memslot.c | 1 -
> server/red-common.h | 19 ++++++++++++++-----
> server/red-dispatcher.h | 2 --
> server/red-worker.h | 3 ---
> server/reds.c | 1 -
> server/spice-bitmap-utils.h | 1 -
> server/sw-canvas.c | 3 ---
> server/utils.h | 6 ++----
> 12 files changed, 22 insertions(+), 23 deletions(-)
>
> diff --git a/server/Makefile.am b/server/Makefile.am
> index 32ab8eb..d4fc972 100644
> --- a/server/Makefile.am
> +++ b/server/Makefile.am
> @@ -117,6 +117,8 @@ libspice_server_la_SOURCES = \
> sw-canvas.h \
> sound.c \
> sound.h \
> + spice-experimental.h \
> + spice.h \
> stat.h \
> spicevmc.c \
> spice_timer_queue.c \
> diff --git a/server/dispatcher.h b/server/dispatcher.h
> index 353744a..78ef663 100644
> --- a/server/dispatcher.h
> +++ b/server/dispatcher.h
> @@ -18,8 +18,7 @@
> #ifndef DISPATCHER_H
> #define DISPATCHER_H
>
> -#include <spice.h>
> -#include "utils.h"
> +#include "red-common.h"
>
> typedef struct Dispatcher Dispatcher;
>
> diff --git a/server/glz-encoder-priv.h b/server/glz-encoder-priv.h
> index 3f22508..919c439 100644
> --- a/server/glz-encoder-priv.h
> +++ b/server/glz-encoder-priv.h
> @@ -18,6 +18,8 @@
> #ifndef GLZ_ENCODER_PRIV_H_
> #define GLZ_ENCODER_PRIV_H_
>
> +#include "red-common.h"
> +
> /* Interface for using the dictionary for encoding.
> Data structures are exposed for the encoder for efficiency
> purposes. */
> diff --git a/server/glz-encoder.h b/server/glz-encoder.h
> index dc08830..0493b83 100644
> --- a/server/glz-encoder.h
> +++ b/server/glz-encoder.h
> @@ -20,7 +20,7 @@
>
> /* Manging the lz encoding using a dictionary that is shared among encoders
> */
>
> -#include <stdint.h>
> +#include "red-common.h"
> #include "common/lz_common.h"
> #include "glz-encoder-dict.h"
>
> diff --git a/server/memslot.c b/server/memslot.c
> index 47e431b..768762b 100644
> --- a/server/memslot.c
> +++ b/server/memslot.c
> @@ -21,7 +21,6 @@
>
> #include <inttypes.h>
>
> -#include "red-common.h"
> #include "memslot.h"
>
> static unsigned long __get_clean_virt(RedMemSlotInfo *info, QXLPHYSICAL addr)
> diff --git a/server/red-common.h b/server/red-common.h
> index 7f1677e..f6098f6 100644
> --- a/server/red-common.h
> +++ b/server/red-common.h
> @@ -18,16 +18,25 @@
> #ifndef _H_RED_COMMON
> #define _H_RED_COMMON
>
> -#include <spice/macros.h>
> +#include <glib.h>
> +
> +#include <errno.h>
> +#include <stdbool.h>
> +#include <stdint.h>
> #include <string.h>
> +#include <unistd.h>
>
> +#include <spice/macros.h>
> +#include "common/log.h"
> +#include "common/lz_common.h"
> +#include "common/marshaller.h"
> #include "common/mem.h"
> -#include "common/spice_common.h"
> #include "common/messages.h"
> -#include "common/lz_common.h"
> +#include "common/ring.h"
> +#include "common/spice_common.h"
> +#include "common/draw.h"
>
> #include "spice.h"
> -
> -#define SPICE_GNUC_VISIBLE __attribute__ ((visibility ("default")))
> +#include "utils.h"
>
> #endif
> diff --git a/server/red-dispatcher.h b/server/red-dispatcher.h
> index d9ee0ec..d99695d 100644
> --- a/server/red-dispatcher.h
> +++ b/server/red-dispatcher.h
> @@ -18,8 +18,6 @@
> #ifndef _H_RED_DISPATCHER
> #define _H_RED_DISPATCHER
>
> -#include <unistd.h>
> -#include <errno.h>
> #include "red-channel.h"
>
> typedef struct RedDispatcher RedDispatcher;
> diff --git a/server/red-worker.h b/server/red-worker.h
> index 710b54c..44f35f7 100644
> --- a/server/red-worker.h
> +++ b/server/red-worker.h
> @@ -18,9 +18,6 @@
> #ifndef _H_REDWORKER
> #define _H_REDWORKER
>
> -#include <unistd.h>
> -#include <errno.h>
> -#include "utils.h"
> #include "red-common.h"
> #include "red-dispatcher.h"
> #include "red-parse-qxl.h"
> diff --git a/server/reds.c b/server/reds.c
> index f698042..d890616 100644
> --- a/server/reds.c
> +++ b/server/reds.c
> @@ -58,7 +58,6 @@
> #include "agent-msg-filter.h"
> #include "inputs-channel.h"
> #include "main-channel.h"
> -#include "red-common.h"
> #include "red-dispatcher.h"
> #include "main-dispatcher.h"
> #include "sound.h"
> diff --git a/server/spice-bitmap-utils.h b/server/spice-bitmap-utils.h
> index 2b43d4b..ffb6c74 100644
> --- a/server/spice-bitmap-utils.h
> +++ b/server/spice-bitmap-utils.h
> @@ -18,7 +18,6 @@
> #ifndef SPICE_BITMAP_UTILS_H_
> #define SPICE_BITMAP_UTILS_H_
>
> -#include <glib.h>
> #include "red-common.h"
>
> typedef enum {
> diff --git a/server/sw-canvas.c b/server/sw-canvas.c
> index 0ef050e..29d89db 100644
> --- a/server/sw-canvas.c
> +++ b/server/sw-canvas.c
> @@ -17,9 +17,6 @@
> #ifdef HAVE_CONFIG_H
> #include <config.h>
> #endif
> -
> -#include "common/spice_common.h"
> -
> #include "sw-canvas.h"
> #define SW_CANVAS_IMAGE_CACHE
> #include "common/sw_canvas.c"
> diff --git a/server/utils.h b/server/utils.h
> index aba85f9..d7b9e40 100644
> --- a/server/utils.h
> +++ b/server/utils.h
> @@ -18,11 +18,9 @@
> #ifndef UTILS_H_
> # define UTILS_H_
>
> -#include <glib.h>
> -#include <time.h>
> +#include "red-common.h"
>
> -#include "common/ring.h"
> -#include "common/log.h"
> +#define SPICE_GNUC_VISIBLE __attribute__ ((visibility ("default")))
>
> static inline void set_bit(int index, uint32_t *addr)
> {
Acked-by: Jonathon Jongsma <jjongsma at redhat.com>
More information about the Spice-devel
mailing list