From 78c1465ed309d2e8937dc00a19635f40c8a4b05a Mon Sep 17 00:00:00 2001 From: Christophe Fergeau Date: Thu, 21 Apr 2011 12:35:34 +0200 Subject: add #include to all source files When using config.h, it must be the very first include in all source files since it contains #define that may change the compilation process (eg libc structure layout changes when it's used to enable large file support on 32 bit x86 archs). This commit adds it at the beginning of all .c and .cpp files --- server/agent-msg-filter.c | 3 +++ server/glz_encode_match_tmpl.c | 3 +++ server/glz_encode_tmpl.c | 3 +++ server/glz_encoder.c | 3 +++ server/glz_encoder_dictionary.c | 3 +++ server/inputs_channel.c | 3 +++ server/jpeg_encoder.c | 3 +++ server/main_channel.c | 3 +++ server/mjpeg_encoder.c | 3 +++ server/red_channel.c | 3 +++ server/red_dispatcher.c | 3 +++ server/red_memslots.c | 3 +++ server/red_parse_qxl.c | 3 +++ server/red_tunnel_worker.c | 3 +++ server/red_worker.c | 3 +++ server/reds.c | 5 +++-- server/reds.h | 2 -- server/reds_gl_canvas.c | 4 +++- server/reds_sw_canvas.c | 4 +++- server/smartcard.c | 4 ++++ server/snd_worker.c | 3 +++ server/zlib_encoder.c | 4 ++++ 22 files changed, 65 insertions(+), 6 deletions(-) (limited to 'server') diff --git a/server/agent-msg-filter.c b/server/agent-msg-filter.c index cd1f78c3..71ff49b7 100644 --- a/server/agent-msg-filter.c +++ b/server/agent-msg-filter.c @@ -17,6 +17,9 @@ Red Hat Authors: hdegoede@redhat.com */ +#ifdef HAVE_CONFIG_H +#include +#endif #include #include "red_common.h" diff --git a/server/glz_encode_match_tmpl.c b/server/glz_encode_match_tmpl.c index bba44dcd..b793e7f0 100644 --- a/server/glz_encode_match_tmpl.c +++ b/server/glz_encode_match_tmpl.c @@ -14,6 +14,9 @@ You should have received a copy of the GNU Lesser General Public License along with this library; if not, see . */ +#ifdef HAVE_CONFIG_H +#include +#endif #define SHORT_PIX_IMAGE_DIST_LEVEL_1 64 //(1 << 6) #define SHORT_PIX_IMAGE_DIST_LEVEL_2 16384 // (1 << 14) diff --git a/server/glz_encode_tmpl.c b/server/glz_encode_tmpl.c index 359a25b1..d5144215 100644 --- a/server/glz_encode_tmpl.c +++ b/server/glz_encode_tmpl.c @@ -14,6 +14,9 @@ You should have received a copy of the GNU Lesser General Public License along with this library; if not, see . */ +#ifdef HAVE_CONFIG_H +#include +#endif #define DJB2_START 5381; #define DJB2_HASH(hash, c) (hash = ((hash << 5) + hash) ^ (c)) //|{hash = ((hash << 5) + hash) + c;} diff --git a/server/glz_encoder.c b/server/glz_encoder.c index 89b759c3..8d20807f 100644 --- a/server/glz_encoder.c +++ b/server/glz_encoder.c @@ -14,6 +14,9 @@ You should have received a copy of the GNU Lesser General Public License along with this library; if not, see . */ +#ifdef HAVE_CONFIG_H +#include +#endif #include #include diff --git a/server/glz_encoder_dictionary.c b/server/glz_encoder_dictionary.c index de8963df..7cadc492 100644 --- a/server/glz_encoder_dictionary.c +++ b/server/glz_encoder_dictionary.c @@ -14,6 +14,9 @@ You should have received a copy of the GNU Lesser General Public License along with this library; if not, see . */ +#ifdef HAVE_CONFIG_H +#include +#endif #include #include diff --git a/server/inputs_channel.c b/server/inputs_channel.c index 213f8a0b..0cc53a2b 100644 --- a/server/inputs_channel.c +++ b/server/inputs_channel.c @@ -15,6 +15,9 @@ You should have received a copy of the GNU Lesser General Public License along with this library; if not, see . */ +#ifdef HAVE_CONFIG_H +#include +#endif #include // IPPROTO_TCP #include // TCP_NODELAY diff --git a/server/jpeg_encoder.c b/server/jpeg_encoder.c index 44dad866..85ef54ef 100644 --- a/server/jpeg_encoder.c +++ b/server/jpeg_encoder.c @@ -14,6 +14,9 @@ You should have received a copy of the GNU Lesser General Public License along with this library; if not, see . */ +#ifdef HAVE_CONFIG_H +#include +#endif #include "red_common.h" #include "jpeg_encoder.h" diff --git a/server/main_channel.c b/server/main_channel.c index 4ddd38b1..e0fa1e43 100644 --- a/server/main_channel.c +++ b/server/main_channel.c @@ -15,6 +15,9 @@ You should have received a copy of the GNU Lesser General Public License along with this library; if not, see . */ +#ifdef HAVE_CONFIG_H +#include +#endif #include #include diff --git a/server/mjpeg_encoder.c b/server/mjpeg_encoder.c index bfd7f922..bae7bd27 100644 --- a/server/mjpeg_encoder.c +++ b/server/mjpeg_encoder.c @@ -15,6 +15,9 @@ You should have received a copy of the GNU Lesser General Public License along with this library; if not, see . */ +#ifdef HAVE_CONFIG_H +#include +#endif #include "red_common.h" #include "mjpeg_encoder.h" diff --git a/server/red_channel.c b/server/red_channel.c index fe4c614f..9012b0da 100644 --- a/server/red_channel.c +++ b/server/red_channel.c @@ -18,6 +18,9 @@ Author: yhalperi@redhat.com */ +#ifdef HAVE_CONFIG_H +#include +#endif #include #include diff --git a/server/red_dispatcher.c b/server/red_dispatcher.c index c5cac589..8b3d0ffc 100644 --- a/server/red_dispatcher.c +++ b/server/red_dispatcher.c @@ -14,6 +14,9 @@ You should have received a copy of the GNU Lesser General Public License along with this library; if not, see . */ +#ifdef HAVE_CONFIG_H +#include +#endif #include #include diff --git a/server/red_memslots.c b/server/red_memslots.c index 8c9810d8..d98f38c1 100644 --- a/server/red_memslots.c +++ b/server/red_memslots.c @@ -15,6 +15,9 @@ You should have received a copy of the GNU Lesser General Public License along with this library; if not, see . */ +#ifdef HAVE_CONFIG_H +#include +#endif #include "red_common.h" #include "red_memslots.h" diff --git a/server/red_parse_qxl.c b/server/red_parse_qxl.c index 380765de..258a541d 100644 --- a/server/red_parse_qxl.c +++ b/server/red_parse_qxl.c @@ -15,6 +15,9 @@ You should have received a copy of the GNU Lesser General Public License along with this library; if not, see . */ +#ifdef HAVE_CONFIG_H +#include +#endif #include #include diff --git a/server/red_tunnel_worker.c b/server/red_tunnel_worker.c index b27fdeee..636f71ed 100644 --- a/server/red_tunnel_worker.c +++ b/server/red_tunnel_worker.c @@ -18,6 +18,9 @@ Author: yhalperi@redhat.com */ +#ifdef HAVE_CONFIG_H +#include +#endif #include #include diff --git a/server/red_worker.c b/server/red_worker.c index 8082139b..856b66aa 100644 --- a/server/red_worker.c +++ b/server/red_worker.c @@ -15,6 +15,9 @@ You should have received a copy of the GNU Lesser General Public License along with this library; if not, see . */ +#ifdef HAVE_CONFIG_H +#include +#endif #include #include diff --git a/server/reds.c b/server/reds.c index fe4c6031..99a31763 100644 --- a/server/reds.c +++ b/server/reds.c @@ -15,8 +15,9 @@ You should have received a copy of the GNU Lesser General Public License along with this library; if not, see . */ - -#include "config.h" +#ifdef HAVE_CONFIG_H +#include +#endif #include #include diff --git a/server/reds.h b/server/reds.h index b286471e..07f0a11f 100644 --- a/server/reds.h +++ b/server/reds.h @@ -18,8 +18,6 @@ #ifndef _H_REDS #define _H_REDS -#include "config.h" - #include #include #include diff --git a/server/reds_gl_canvas.c b/server/reds_gl_canvas.c index 4855a203..bf5244f1 100644 --- a/server/reds_gl_canvas.c +++ b/server/reds_gl_canvas.c @@ -14,7 +14,9 @@ You should have received a copy of the GNU Lesser General Public License along with this library; if not, see . */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include +#endif #include "reds_gl_canvas.h" #define SPICE_CANVAS_INTERNAL diff --git a/server/reds_sw_canvas.c b/server/reds_sw_canvas.c index 428a9dce..6df63e62 100644 --- a/server/reds_sw_canvas.c +++ b/server/reds_sw_canvas.c @@ -14,7 +14,9 @@ You should have received a copy of the GNU Lesser General Public License along with this library; if not, see . */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include +#endif #include "reds_sw_canvas.h" #define SPICE_CANVAS_INTERNAL diff --git a/server/smartcard.c b/server/smartcard.c index d201f5f0..fed88a5e 100644 --- a/server/smartcard.c +++ b/server/smartcard.c @@ -15,6 +15,10 @@ You should have received a copy of the GNU Lesser General Public License along with this library; if not, see . */ +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include "server/char_device.h" diff --git a/server/snd_worker.c b/server/snd_worker.c index c8e9d12f..8da11e1a 100644 --- a/server/snd_worker.c +++ b/server/snd_worker.c @@ -15,6 +15,9 @@ You should have received a copy of the GNU Lesser General Public License along with this library; if not, see . */ +#ifdef HAVE_CONFIG_H +#include +#endif #include #include diff --git a/server/zlib_encoder.c b/server/zlib_encoder.c index 214180ed..c51466b1 100644 --- a/server/zlib_encoder.c +++ b/server/zlib_encoder.c @@ -15,6 +15,10 @@ You should have received a copy of the GNU Lesser General Public License along with this library; if not, see . */ +#ifdef HAVE_CONFIG_H +#include +#endif + #include "red_common.h" #include "zlib_encoder.h" #include -- cgit