summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@redhat.com>2011-04-21 12:35:34 +0200
committerMarc-André Lureau <marcandre.lureau@gmail.com>2012-03-20 15:25:52 +0100
commit08326f733a2311ad241fad7146516c69840b675e (patch)
tree68632b12292a9980b1836766f91f27f5af0f73f3
parentd88b144f1bc450b00c1b78ac58d88ef2e46a5868 (diff)
add #include <config.h> 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
-rw-r--r--common/canvas_base.c4
-rw-r--r--common/canvas_utils.c3
-rw-r--r--common/gdi_canvas.c4
-rw-r--r--common/gl_canvas.c3
-rw-r--r--common/glc.c3
-rw-r--r--common/lines.c4
-rw-r--r--common/lz.c3
-rw-r--r--common/lz_compress_tmpl.c3
-rw-r--r--common/lz_decompress_tmpl.c4
-rw-r--r--common/marshaller.c5
-rw-r--r--common/mem.c3
-rw-r--r--common/ogl_ctx.c3
-rw-r--r--common/pixman_utils.c4
-rw-r--r--common/quic.c4
-rw-r--r--common/quic_family_tmpl.c3
-rw-r--r--common/quic_rgb_tmpl.c3
-rw-r--r--common/quic_tmpl.c3
-rw-r--r--common/region.c3
-rw-r--r--common/rop3.c3
-rw-r--r--common/sw_canvas.c3
20 files changed, 63 insertions, 5 deletions
diff --git a/common/canvas_base.c b/common/canvas_base.c
index fe650fe..272c7e8 100644
--- a/common/canvas_base.c
+++ b/common/canvas_base.c
@@ -20,6 +20,10 @@
#error "This file shouldn't be compiled directly"
#endif
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include <stdarg.h>
#include <stdlib.h>
#include <setjmp.h>
diff --git a/common/canvas_utils.c b/common/canvas_utils.c
index 020b23c..1b81d54 100644
--- a/common/canvas_utils.c
+++ b/common/canvas_utils.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 <http://www.gnu.org/licenses/>.
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
#include "canvas_utils.h"
diff --git a/common/gdi_canvas.c b/common/gdi_canvas.c
index 27f644c..f67aadf 100644
--- a/common/gdi_canvas.c
+++ b/common/gdi_canvas.c
@@ -15,7 +15,9 @@
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
-
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
#ifndef SPICE_CANVAS_INTERNAL
#error "This file shouldn't be compiled directly"
diff --git a/common/gl_canvas.c b/common/gl_canvas.c
index 844fc07..a04740b 100644
--- a/common/gl_canvas.c
+++ b/common/gl_canvas.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 <http://www.gnu.org/licenses/>.
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
#ifndef SPICE_CANVAS_INTERNAL
#error "This file shouldn't be compiled directly"
diff --git a/common/glc.c b/common/glc.c
index e58718f..d90e383 100644
--- a/common/glc.c
+++ b/common/glc.c
@@ -17,6 +17,9 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
#include <stdlib.h>
#include <string.h>
diff --git a/common/lines.c b/common/lines.c
index 1a14c18..baf1ce9 100644
--- a/common/lines.c
+++ b/common/lines.c
@@ -45,7 +45,9 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
-
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
#include <stdio.h>
#include <spice/macros.h>
diff --git a/common/lz.c b/common/lz.c
index d0d9511..2e3a136 100644
--- a/common/lz.c
+++ b/common/lz.c
@@ -43,6 +43,9 @@
SOFTWARE.
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
#include "lz.h"
diff --git a/common/lz_compress_tmpl.c b/common/lz_compress_tmpl.c
index 18d6697..865a30a 100644
--- a/common/lz_compress_tmpl.c
+++ b/common/lz_compress_tmpl.c
@@ -40,6 +40,9 @@
SOFTWARE.
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
#define DJB2_START 5381;
#define DJB2_HASH(hash, c) (hash = ((hash << 5) + hash) ^ (c)) //|{hash = ((hash << 5) + hash) + c;}
diff --git a/common/lz_decompress_tmpl.c b/common/lz_decompress_tmpl.c
index aa403f6..6d52074 100644
--- a/common/lz_decompress_tmpl.c
+++ b/common/lz_decompress_tmpl.c
@@ -59,6 +59,10 @@
COPY_COMP_PIXEL(encoder, out) - copies pixel from the compressed buffer to the decompressed
buffer. Increases out.
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#if !defined(LZ_RGB_ALPHA)
#define COPY_PIXEL(p, out) (*out++ = p)
#define COPY_REF_PIXEL(ref, out) (*out++ = *ref++)
diff --git a/common/marshaller.c b/common/marshaller.c
index 6ee7b6a..2d62cd8 100644
--- a/common/marshaller.c
+++ b/common/marshaller.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 <http://www.gnu.org/licenses/>.
*/
-
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
#include "marshaller.h"
#include "mem.h"
diff --git a/common/mem.c b/common/mem.c
index a9bd6cc..96be351 100644
--- a/common/mem.c
+++ b/common/mem.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 <http://www.gnu.org/licenses/>.
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
#include "mem.h"
#include <stdlib.h>
diff --git a/common/ogl_ctx.c b/common/ogl_ctx.c
index ae25c2d..072a0c0 100644
--- a/common/ogl_ctx.c
+++ b/common/ogl_ctx.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 <http://www.gnu.org/licenses/>.
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
#include <stdlib.h>
#include <stdio.h>
diff --git a/common/pixman_utils.c b/common/pixman_utils.c
index 5daee27..e876fe6 100644
--- a/common/pixman_utils.c
+++ b/common/pixman_utils.c
@@ -15,8 +15,10 @@
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
-
+#ifdef HAVE_CONFIG_H
#include <config.h>
+#endif
+
#include "pixman_utils.h"
#include <spice/macros.h>
diff --git a/common/quic.c b/common/quic.c
index cd3aee8..8f8d726 100644
--- a/common/quic.c
+++ b/common/quic.c
@@ -19,6 +19,10 @@
// Red Hat image compression based on SFALIC by Roman Starosolski
// http://sun.iinf.polsl.gliwice.pl/~rstaros/sfalic/index.html
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include "quic.h"
#include <spice/macros.h>
diff --git a/common/quic_family_tmpl.c b/common/quic_family_tmpl.c
index 5547c4d..7a32f2d 100644
--- a/common/quic_family_tmpl.c
+++ b/common/quic_family_tmpl.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 <http://www.gnu.org/licenses/>.
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
#ifdef QUIC_FAMILY_8BPC
#undef QUIC_FAMILY_8BPC
diff --git a/common/quic_rgb_tmpl.c b/common/quic_rgb_tmpl.c
index 681493a..814fa5a 100644
--- a/common/quic_rgb_tmpl.c
+++ b/common/quic_rgb_tmpl.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 <http://www.gnu.org/licenses/>.
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
#ifdef QUIC_RGB32
#undef QUIC_RGB32
diff --git a/common/quic_tmpl.c b/common/quic_tmpl.c
index 47a6a23..d300fa9 100644
--- a/common/quic_tmpl.c
+++ b/common/quic_tmpl.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 <http://www.gnu.org/licenses/>.
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
#ifdef ONE_BYTE
#undef ONE_BYTE
diff --git a/common/region.c b/common/region.c
index 3f51f7b..0e1613c 100644
--- a/common/region.c
+++ b/common/region.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 <http://www.gnu.org/licenses/>.
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
#include <stdio.h>
#include <string.h>
diff --git a/common/rop3.c b/common/rop3.c
index 83880fe..53e8a6d 100644
--- a/common/rop3.c
+++ b/common/rop3.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 <http://www.gnu.org/licenses/>.
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
#include <stdio.h>
diff --git a/common/sw_canvas.c b/common/sw_canvas.c
index e1b13e0..651c52b 100644
--- a/common/sw_canvas.c
+++ b/common/sw_canvas.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 <http://www.gnu.org/licenses/>.
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
#ifndef SPICE_CANVAS_INTERNAL
#error "This file shouldn't be compiled directly"