[PATCH spice-common] Do not check for HAVE_CONFIG_H

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This should always be defined and including config.h is a requirement.

Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
---
 common/backtrace.c          | 2 --
 common/canvas_base.c        | 2 --
 common/canvas_utils.c       | 2 --
 common/lines.c              | 2 --
 common/log.c                | 2 --
 common/lz.c                 | 2 --
 common/lz_compress_tmpl.c   | 2 --
 common/lz_decompress_tmpl.c | 2 --
 common/marshaller.c         | 2 --
 common/mem.c                | 2 --
 common/pixman_utils.c       | 2 --
 common/quic.c               | 2 --
 common/quic_family_tmpl.c   | 2 --
 common/quic_tmpl.c          | 2 --
 common/region.c             | 2 --
 common/rop3.c               | 2 --
 common/ssl_verify.c         | 2 --
 common/sw_canvas.c          | 2 --
 common/utils.c              | 2 --
 meson.build                 | 3 +--
 spice_codegen.py            | 2 --
 tests/test-logging.c        | 2 --
 tests/test-marshallers.c    | 2 --
 tests/test-quic.c           | 2 --
 tests/test-region.c         | 2 --
 25 files changed, 1 insertion(+), 50 deletions(-)

diff --git a/common/backtrace.c b/common/backtrace.c
index ff72d1b..2136191 100644
--- a/common/backtrace.c
+++ b/common/backtrace.c
@@ -21,9 +21,7 @@
  * Copyright (C) 2008 Red Hat, Inc.
  */
 
-#ifdef HAVE_CONFIG_H
 #include <config.h>
-#endif
 
 #include "backtrace.h"
 
diff --git a/common/canvas_base.c b/common/canvas_base.c
index 00a8801..3a1c83f 100644
--- a/common/canvas_base.c
+++ b/common/canvas_base.c
@@ -16,9 +16,7 @@
    License along with this library; if not, see <http://www.gnu.org/licenses/>.
 */
 
-#ifdef HAVE_CONFIG_H
 #include <config.h>
-#endif
 
 #include <stdarg.h>
 #include <stdlib.h>
diff --git a/common/canvas_utils.c b/common/canvas_utils.c
index e5f4efb..ae53cf7 100644
--- a/common/canvas_utils.c
+++ b/common/canvas_utils.c
@@ -15,9 +15,7 @@
    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"
 #include "mem.h"
diff --git a/common/lines.c b/common/lines.c
index dadaf86..76c17b1 100644
--- a/common/lines.c
+++ b/common/lines.c
@@ -45,9 +45,7 @@ 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/log.c b/common/log.c
index ce162a1..655bbe8 100644
--- a/common/log.c
+++ b/common/log.c
@@ -15,9 +15,7 @@
    License along with this library; if not, see <http://www.gnu.org/licenses/>.
 */
 
-#ifdef HAVE_CONFIG_H
 #include <config.h>
-#endif
 
 #include <glib.h>
 #include <stdlib.h>
diff --git a/common/lz.c b/common/lz.c
index f92c638..c9fe60d 100644
--- a/common/lz.c
+++ b/common/lz.c
@@ -43,9 +43,7 @@
    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 4f4f6c6..1d4eb81 100644
--- a/common/lz_compress_tmpl.c
+++ b/common/lz_compress_tmpl.c
@@ -40,9 +40,7 @@
    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 d445c70..462513f 100644
--- a/common/lz_decompress_tmpl.c
+++ b/common/lz_decompress_tmpl.c
@@ -59,9 +59,7 @@
     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)
diff --git a/common/marshaller.c b/common/marshaller.c
index c77129b..a2c27b7 100644
--- a/common/marshaller.c
+++ b/common/marshaller.c
@@ -15,9 +15,7 @@
    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 "log.h"
 #include "marshaller.h"
diff --git a/common/mem.c b/common/mem.c
index ff11e5e..8d7ed1e 100644
--- a/common/mem.c
+++ b/common/mem.c
@@ -15,9 +15,7 @@
    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"
 
diff --git a/common/pixman_utils.c b/common/pixman_utils.c
index c573574..a3aba0a 100644
--- a/common/pixman_utils.c
+++ b/common/pixman_utils.c
@@ -15,9 +15,7 @@
    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"
 
diff --git a/common/quic.c b/common/quic.c
index f91b23f..e1c439f 100644
--- a/common/quic.c
+++ b/common/quic.c
@@ -19,9 +19,7 @@
 // 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 <glib.h>
 
diff --git a/common/quic_family_tmpl.c b/common/quic_family_tmpl.c
index 70fe758..9b29560 100644
--- a/common/quic_family_tmpl.c
+++ b/common/quic_family_tmpl.c
@@ -15,9 +15,7 @@
    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_tmpl.c b/common/quic_tmpl.c
index c2a1b66..f0a4927 100644
--- a/common/quic_tmpl.c
+++ b/common/quic_tmpl.c
@@ -15,9 +15,7 @@
    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
 
 #define COMPRESS_IMP
 
diff --git a/common/region.c b/common/region.c
index c950a9b..0149191 100644
--- a/common/region.c
+++ b/common/region.c
@@ -15,9 +15,7 @@
    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 75fec12..33eccd6 100644
--- a/common/rop3.c
+++ b/common/rop3.c
@@ -15,9 +15,7 @@
    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 "rop3.h"
 
diff --git a/common/ssl_verify.c b/common/ssl_verify.c
index 74f95bb..dee719f 100644
--- a/common/ssl_verify.c
+++ b/common/ssl_verify.c
@@ -16,9 +16,7 @@
    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 "ssl_verify.h"
diff --git a/common/sw_canvas.c b/common/sw_canvas.c
index c5528c2..44f7299 100644
--- a/common/sw_canvas.c
+++ b/common/sw_canvas.c
@@ -15,12 +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
 #ifdef __MINGW32__
 #undef HAVE_STDLIB_H
 #endif
 #include <config.h>
-#endif
 
 #include <math.h>
 #include "sw_canvas.h"
diff --git a/common/utils.c b/common/utils.c
index 460098c..85cea31 100644
--- a/common/utils.c
+++ b/common/utils.c
@@ -16,9 +16,7 @@
    License along with this library; if not, see <http://www.gnu.org/licenses/>.
 */
 
-#ifdef HAVE_CONFIG_H
 #include <config.h>
-#endif
 
 #include "utils.h"
 
diff --git a/meson.build b/meson.build
index 0faf703..8a16b76 100644
--- a/meson.build
+++ b/meson.build
@@ -10,8 +10,7 @@ if not meson.is_subproject()
 endif
 
 # some global vars
-spice_common_global_cflags = ['-DHAVE_CONFIG_H',
-                              '-DG_LOG_DOMAIN="Spice"',
+spice_common_global_cflags = ['-DG_LOG_DOMAIN="Spice"',
                               '-Wall',
                               '-Wextra',
                               '-Werror',
diff --git a/spice_codegen.py b/spice_codegen.py
index 5846337..0532d6f 100755
--- a/spice_codegen.py
+++ b/spice_codegen.py
@@ -311,9 +311,7 @@ writer.write(license)
 writer.header.writeln("/* this is a file autogenerated by spice_codegen.py */")
 writer.header.write(license)
 if not options.generate_enums:
-    writer.writeln("#ifdef HAVE_CONFIG_H")
     writer.writeln("#include <config.h>")
-    writer.writeln("#endif")
 
 if options.assert_on_error:
     writer.set_option("assert_on_error")
diff --git a/tests/test-logging.c b/tests/test-logging.c
index 32b0c33..22afe1f 100644
--- a/tests/test-logging.c
+++ b/tests/test-logging.c
@@ -14,9 +14,7 @@
    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
 
 #define G_LOG_DOMAIN "Spice"
 
diff --git a/tests/test-marshallers.c b/tests/test-marshallers.c
index 83c8956..afa681d 100644
--- a/tests/test-marshallers.c
+++ b/tests/test-marshallers.c
@@ -14,9 +14,7 @@
    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 <glib.h>
 #include <string.h>
diff --git a/tests/test-quic.c b/tests/test-quic.c
index 01a3ef3..c838545 100644
--- a/tests/test-quic.c
+++ b/tests/test-quic.c
@@ -14,9 +14,7 @@
    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 <glib.h>
 #include <gdk-pixbuf/gdk-pixbuf.h>
diff --git a/tests/test-region.c b/tests/test-region.c
index 378ea60..e5478dc 100644
--- a/tests/test-region.c
+++ b/tests/test-region.c
@@ -15,9 +15,7 @@
    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>
-- 
2.20.1

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]