[glib] Remove HAVE_CONFIG_H defs and uses



commit 03e86d000fee7f59e793f7367f9db510a209b30a
Author: Ernestas Kulik <ernestask gnome org>
Date:   Mon Feb 19 14:09:10 2018 +0200

    Remove HAVE_CONFIG_H defs and uses
    
    Since GLib files are only meant to be built as part of GLib, config.h
    always exists, so the checks are more or less pointless.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=793399

 build/win32/vs8/glib.vcproj                        |  4 ++--
 build/win32/vs8/gmodule.vcproj                     |  4 ++--
 build/win32/vs8/gobject.vcproj                     |  4 ++--
 build/win32/vs8/gthread.vcproj                     |  4 ++--
 gio/inotify/meson.build                            |  2 +-
 gio/kqueue/meson.build                             |  2 +-
 gio/meson.build                                    | 15 ++++++---------
 gio/tests/gdbus-object-manager-example/meson.build |  2 +-
 gio/tests/meson.build                              |  1 -
 gio/win32/meson.build                              |  2 +-
 gio/xdgmime/meson.build                            |  2 +-
 gio/xdgmime/xdgmime.c                              |  2 --
 gio/xdgmime/xdgmimealias.c                         |  2 --
 gio/xdgmime/xdgmimecache.c                         |  2 --
 gio/xdgmime/xdgmimeglob.c                          |  2 --
 gio/xdgmime/xdgmimeicon.c                          |  2 --
 gio/xdgmime/xdgmimeint.c                           |  2 --
 gio/xdgmime/xdgmimemagic.c                         |  2 --
 gio/xdgmime/xdgmimeparent.c                        |  2 --
 glib/gnulib/asnprintf.c                            |  4 +---
 glib/gnulib/printf-parse.c                         |  4 +---
 glib/gnulib/printf.c                               |  4 +---
 glib/meson.build                                   |  7 ++-----
 glib/pcre/Makefile.am                              |  1 -
 glib/pcre/pcre_byte_order.c                        |  2 --
 glib/pcre/pcre_chartables.c                        |  2 --
 glib/pcre/pcre_compile.c                           |  2 --
 glib/pcre/pcre_config.c                            |  2 --
 glib/pcre/pcre_dfa_exec.c                          |  2 --
 glib/pcre/pcre_exec.c                              |  2 --
 glib/pcre/pcre_fullinfo.c                          |  2 --
 glib/pcre/pcre_get.c                               |  2 --
 glib/pcre/pcre_globals.c                           |  2 --
 glib/pcre/pcre_jit_compile.c                       |  2 --
 glib/pcre/pcre_newline.c                           |  2 --
 glib/pcre/pcre_ord2utf8.c                          |  2 --
 glib/pcre/pcre_string_utils.c                      |  2 --
 glib/pcre/pcre_study.c                             |  2 --
 glib/pcre/pcre_tables.c                            |  2 --
 glib/pcre/pcre_valid_utf8.c                        |  2 --
 glib/pcre/pcre_version.c                           |  2 --
 glib/pcre/pcre_xclass.c                            |  2 --
 glib/tests/hash.c                                  |  4 +---
 glib/tests/meson.build                             |  2 +-
 gobject/meson.build                                |  1 -
 gobject/tests/meson.build                          |  4 ++--
 tests/meson.build                                  |  2 +-
 win32/vs10/glib-build-defines.props                |  2 +-
 win32/vs9/glib-build-defines.vsprops               |  2 +-
 49 files changed, 31 insertions(+), 100 deletions(-)
---
diff --git a/build/win32/vs8/glib.vcproj b/build/win32/vs8/glib.vcproj
index 00d6efffd..de358764f 100644
--- a/build/win32/vs8/glib.vcproj
+++ b/build/win32/vs8/glib.vcproj
@@ -42,7 +42,7 @@
                                Name="VCCLCompilerTool"
                                Optimization="0"
                                
AdditionalIncludeDirectories="../../..;../../../glib;../../../../dependencies/proxy-libintl-20080418/include"
-                               
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;GLIB_COMPILATION;DLL_EXPORT;HAVE_CONFIG_H;G_LOG_DOMAIN=\&quot;Glib\&quot;;G_ENABLE_DEBUG;G_DISABLE_DEPRECATED;PCRE_STATIC;LINK_SIZE=2;MAX_NAME_SIZE=32;MAX_NAME_COUNT=10000;NEWLINE=-1;POSIX_MALLOC_THRESHOLD=10;MATCH_LIMIT=10000000;MATCH_LIMIT_RECURSION=10000000"
+                               
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;GLIB_COMPILATION;DLL_EXPORT;G_LOG_DOMAIN=\&quot;Glib\&quot;;G_ENABLE_DEBUG;G_DISABLE_DEPRECATED;PCRE_STATIC;LINK_SIZE=2;MAX_NAME_SIZE=32;MAX_NAME_COUNT=10000;NEWLINE=-1;POSIX_MALLOC_THRESHOLD=10;MATCH_LIMIT=10000000;MATCH_LIMIT_RECURSION=10000000"
                                MinimalRebuild="true"
                                BasicRuntimeChecks="3"
                                RuntimeLibrary="3"
@@ -125,7 +125,7 @@
                        <Tool
                                Name="VCCLCompilerTool"
                                
AdditionalIncludeDirectories="../../..;../../../glib;../../../../dependencies/proxy-libintl-20080418/include"
-                               
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;GLIB_COMPILATION;DLL_EXPORT;HAVE_CONFIG_H;G_LOG_DOMAIN=\&quot;Glib\&quot;;G_DISABLE_DEPRECATED;PCRE_STATIC;LINK_SIZE=2;MAX_NAME_SIZE=32;MAX_NAME_COUNT=10000;NEWLINE=-1;POSIX_MALLOC_THRESHOLD=10;MATCH_LIMIT=10000000;MATCH_LIMIT_RECURSION=10000000"
+                               
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;GLIB_COMPILATION;DLL_EXPORT;G_LOG_DOMAIN=\&quot;Glib\&quot;;G_DISABLE_DEPRECATED;PCRE_STATIC;LINK_SIZE=2;MAX_NAME_SIZE=32;MAX_NAME_COUNT=10000;NEWLINE=-1;POSIX_MALLOC_THRESHOLD=10;MATCH_LIMIT=10000000;MATCH_LIMIT_RECURSION=10000000"
                                RuntimeLibrary="2"
                                UsePrecompiledHeader="0"
                                WarningLevel="3"
diff --git a/build/win32/vs8/gmodule.vcproj b/build/win32/vs8/gmodule.vcproj
index b6e0e8c5a..bf519f70b 100644
--- a/build/win32/vs8/gmodule.vcproj
+++ b/build/win32/vs8/gmodule.vcproj
@@ -42,7 +42,7 @@
                                Name="VCCLCompilerTool"
                                Optimization="0"
                                AdditionalIncludeDirectories="../../../glib;../../.."
-                               
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;HAVE_CONFIG_H;G_LOG_DOMAIN=\&quot;GModule\&quot;;G_DISABLE_DEPRECATED"
+                               
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;G_LOG_DOMAIN=\&quot;GModule\&quot;;G_DISABLE_DEPRECATED"
                                MinimalRebuild="true"
                                BasicRuntimeChecks="3"
                                RuntimeLibrary="3"
@@ -123,7 +123,7 @@
                        <Tool
                                Name="VCCLCompilerTool"
                                AdditionalIncludeDirectories="../../../glib;../../.."
-                               
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;HAVE_CONFIG_H;G_LOG_DOMAIN=\&quot;GModule\&quot;;G_DISABLE_DEPRECATED"
+                               
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;G_LOG_DOMAIN=\&quot;GModule\&quot;;G_DISABLE_DEPRECATED"
                                RuntimeLibrary="2"
                                UsePrecompiledHeader="0"
                                WarningLevel="3"
diff --git a/build/win32/vs8/gobject.vcproj b/build/win32/vs8/gobject.vcproj
index 21c607952..dc1d542da 100644
--- a/build/win32/vs8/gobject.vcproj
+++ b/build/win32/vs8/gobject.vcproj
@@ -41,7 +41,7 @@
                                Name="VCCLCompilerTool"
                                Optimization="0"
                                AdditionalIncludeDirectories="../../..,../../../glib"
-                               
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;GOBJECT_COMPILATION;HAVE_CONFIG_H;G_LOG_DOMAIN=\&quot;Glib-GObject\&quot;;G_DISABLE_DEPRECATED"
+                               
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;GOBJECT_COMPILATION;G_LOG_DOMAIN=\&quot;Glib-GObject\&quot;;G_DISABLE_DEPRECATED"
                                MinimalRebuild="true"
                                BasicRuntimeChecks="3"
                                RuntimeLibrary="3"
@@ -121,7 +121,7 @@
                                Name="VCCLCompilerTool"
                                WholeProgramOptimization="false"
                                AdditionalIncludeDirectories="../../..,../../../glib"
-                               
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;GOBJECT_COMPILATION;HAVE_CONFIG_H;G_LOG_DOMAIN=\&quot;Glib-GObject\&quot;;G_DISABLE_DEPRECATED"
+                               
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;GOBJECT_COMPILATION;G_LOG_DOMAIN=\&quot;Glib-GObject\&quot;;G_DISABLE_DEPRECATED"
                                RuntimeLibrary="2"
                                UsePrecompiledHeader="0"
                                WarningLevel="3"
diff --git a/build/win32/vs8/gthread.vcproj b/build/win32/vs8/gthread.vcproj
index db73a4f90..386838dbb 100644
--- a/build/win32/vs8/gthread.vcproj
+++ b/build/win32/vs8/gthread.vcproj
@@ -41,7 +41,7 @@
                                Name="VCCLCompilerTool"
                                Optimization="0"
                                AdditionalIncludeDirectories="../../..,../../../glib"
-                               
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;HAVE_CONFIG_H;G_LOG_DOMAIN=\&quot;GThread\&quot;;G_DISABLE_DEPRECATED"
+                               
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;G_LOG_DOMAIN=\&quot;GThread\&quot;;G_DISABLE_DEPRECATED"
                                MinimalRebuild="true"
                                BasicRuntimeChecks="3"
                                RuntimeLibrary="3"
@@ -121,7 +121,7 @@
                        <Tool
                                Name="VCCLCompilerTool"
                                AdditionalIncludeDirectories="../../..,../../../glib"
-                               
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;HAVE_CONFIG_H;G_LOG_DOMAIN=\&quot;GThread\&quot;;G_DISABLE_DEPRECATED"
+                               
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;G_LOG_DOMAIN=\&quot;GThread\&quot;;G_DISABLE_DEPRECATED"
                                RuntimeLibrary="2"
                                UsePrecompiledHeader="0"
                                WarningLevel="3"
diff --git a/gio/inotify/meson.build b/gio/inotify/meson.build
index fc3ac711c..1fa8e0464 100644
--- a/gio/inotify/meson.build
+++ b/gio/inotify/meson.build
@@ -12,4 +12,4 @@ inotify_lib = static_library('inotify',
   include_directories : [configinc, glibinc, gmoduleinc],
   dependencies : [gioenumtypes_dep],
   pic : true,
-  c_args : [ '-DHAVE_CONFIG_H', '-DG_DISABLE_DEPRECATED' ] + gio_c_args)
+  c_args : [ '-DG_DISABLE_DEPRECATED' ] + gio_c_args)
diff --git a/gio/kqueue/meson.build b/gio/kqueue/meson.build
index 8f5b97aa2..51c5e788f 100644
--- a/gio/kqueue/meson.build
+++ b/gio/kqueue/meson.build
@@ -15,4 +15,4 @@ kqueue_lib = static_library('kqueue',
   sources : kqueue_sources,
   include_directories : [configinc, glibinc, gmoduleinc],
   pic : true,
-  c_args : [ '-DHAVE_CONFIG_H', '-DG_DISABLE_DEPRECATED' ] + gio_c_args)
+  c_args : [ '-DG_DISABLE_DEPRECATED' ] + gio_c_args)
diff --git a/gio/meson.build b/gio/meson.build
index 848851073..7817a4797 100644
--- a/gio/meson.build
+++ b/gio/meson.build
@@ -841,24 +841,22 @@ gio_tool_sources = [
   'gio-tool-tree.c',
 ]
 
-# FIXME: are all these HAVE_CONFIG_H needed/used here?
 executable('gio', gio_tool_sources,
   install : true,
-  c_args : ['-DHAVE_CONFIG_H=1'] + gio_c_args,
+  c_args : gio_c_args,
   # intl.lib is not compatible with SAFESEH
   link_args : noseh_link_args,
   dependencies : [libintl, libgio_dep, libgobject_dep, libgmodule_dep, libglib_dep])
 
 executable('gresource', 'gresource-tool.c',
   install : true,
-  c_args : ['-DHAVE_CONFIG_H=1'],
   # intl.lib is not compatible with SAFESEH
   link_args : noseh_link_args,
   dependencies : [libelf, libintl, libgio_dep, libgobject_dep, libgmodule_dep, libglib_dep])
 
 executable('gio-querymodules', 'gio-querymodules.c', 'giomodule-priv.c',
   install : true,
-  c_args : ['-DHAVE_CONFIG_H=1'] + gio_c_args,
+  c_args : gio_c_args,
   # intl.lib is not compatible with SAFESEH
   link_args : noseh_link_args,
   dependencies : [libgio_dep, libgobject_dep, libgmodule_dep, libglib_dep])
@@ -866,7 +864,6 @@ executable('gio-querymodules', 'gio-querymodules.c', 'giomodule-priv.c',
 glib_compile_schemas = executable('glib-compile-schemas',
   [gconstructor_as_data_h, 'gvdb/gvdb-builder.c', 'glib-compile-schemas.c'],
   install : true,
-  c_args : ['-DHAVE_CONFIG_H=1'],
   # intl.lib is not compatible with SAFESEH
   link_args : noseh_link_args,
   dependencies : [libintl, libgio_dep, libgobject_dep, libgmodule_dep, libglib_dep])
@@ -874,14 +871,14 @@ glib_compile_schemas = executable('glib-compile-schemas',
 glib_compile_resources = executable('glib-compile-resources',
   [gconstructor_as_data_h, 'gvdb/gvdb-builder.c', 'glib-compile-resources.c'],
   install : true,
-  c_args : ['-DHAVE_CONFIG_H=1'] + gio_c_args,
+  c_args : gio_c_args,
   # intl.lib is not compatible with SAFESEH
   link_args : noseh_link_args,
   dependencies : [libintl, libgio_dep, libgobject_dep, libgmodule_dep, libglib_dep])
 
 executable('gsettings', 'gsettings-tool.c',
   install : true,
-  c_args : ['-DHAVE_CONFIG_H=1'] + gio_c_args,
+  c_args : gio_c_args,
   # intl.lib is not compatible with SAFESEH
   link_args : noseh_link_args,
   dependencies : [libintl, libgio_dep, libgobject_dep, libgmodule_dep, libglib_dep])
@@ -893,7 +890,7 @@ install_data(['gschema.loc', 'gschema.its'],
 
 executable('gdbus', 'gdbus-tool.c',
   install : true,
-  c_args : ['-DHAVE_CONFIG_H=1'] + gio_c_args,
+  c_args : gio_c_args,
   # intl.lib is not compatible with SAFESEH
   link_args : noseh_link_args,
   dependencies : [libintl, libgio_dep, libgobject_dep, libgmodule_dep, libglib_dep])
@@ -901,7 +898,7 @@ executable('gdbus', 'gdbus-tool.c',
 if host_system != 'windows'
   executable('gapplication', 'gapplication-tool.c',
     install : true,
-    c_args : ['-DHAVE_CONFIG_H=1'] + gio_c_args,
+    c_args : gio_c_args,
     # intl.lib is not compatible with SAFESEH
     link_args : noseh_link_args,
     dependencies : [libintl, libgio_dep, libgobject_dep, libgmodule_dep, libglib_dep])
diff --git a/gio/tests/gdbus-object-manager-example/meson.build 
b/gio/tests/gdbus-object-manager-example/meson.build
index d594c685b..90dcc1f93 100644
--- a/gio/tests/gdbus-object-manager-example/meson.build
+++ b/gio/tests/gdbus-object-manager-example/meson.build
@@ -16,7 +16,7 @@ gdbus_example_objectmanager_generated = custom_target('gdbus-example-objectmanag
 
 libgdbus_example_objectmanager = library('libgdbus-example-objectmanager',
     gdbus_example_objectmanager_generated,
-    c_args : ['-DHAVE_CONFIG_H=1'] + gio_c_args,
+    c_args : gio_c_args,
     dependencies : [libglib_dep, libgmodule_dep, libgobject_dep, libgio_dep],
     install : false)
 
diff --git a/gio/tests/meson.build b/gio/tests/meson.build
index 70df55910..668839402 100644
--- a/gio/tests/meson.build
+++ b/gio/tests/meson.build
@@ -75,7 +75,6 @@ test_env = [
 ]
 
 test_c_args = [
-  '-DHAVE_CONFIG_H=1',
   '-DG_LOG_DOMAIN="GLib-GIO"',
   '-DTEST_SERVICES="@0@/gio/tests/services"'.format(meson.build_root()),
   '-DGLIB_MKENUMS="@0@"'.format(glib_mkenums),
diff --git a/gio/win32/meson.build b/gio/win32/meson.build
index 3f6af82fb..c1841cb64 100644
--- a/gio/win32/meson.build
+++ b/gio/win32/meson.build
@@ -12,4 +12,4 @@ giowin32_lib = static_library('giowin32',
   include_directories : [configinc, glibinc, gioinc, gmoduleinc],
   dependencies : [libintl],
   pic : true,
-  c_args : [ '-DHAVE_CONFIG_H', '-DG_DISABLE_DEPRECATED' ] + gio_c_args)
+  c_args : [ '-DG_DISABLE_DEPRECATED' ] + gio_c_args)
diff --git a/gio/xdgmime/meson.build b/gio/xdgmime/meson.build
index a8d545971..d107f71bb 100644
--- a/gio/xdgmime/meson.build
+++ b/gio/xdgmime/meson.build
@@ -13,4 +13,4 @@ xdgmime_lib = static_library('xdgmime',
   sources : xdgmime_sources,
   include_directories : [configinc],
   pic : true,
-  c_args : [ '-DHAVE_CONFIG_H', '-DXDG_PREFIX=_gio_xdg' ] + glib_hidden_visibility_args)
+  c_args : [ '-DXDG_PREFIX=_gio_xdg' ] + glib_hidden_visibility_args)
diff --git a/gio/xdgmime/xdgmime.c b/gio/xdgmime/xdgmime.c
index 0584fd5ab..95adf7ee0 100644
--- a/gio/xdgmime/xdgmime.c
+++ b/gio/xdgmime/xdgmime.c
@@ -23,9 +23,7 @@
  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif
 
 #include "xdgmime.h"
 #include "xdgmimeint.h"
diff --git a/gio/xdgmime/xdgmimealias.c b/gio/xdgmime/xdgmimealias.c
index 5bc70c347..bf95bc0d3 100644
--- a/gio/xdgmime/xdgmimealias.c
+++ b/gio/xdgmime/xdgmimealias.c
@@ -23,9 +23,7 @@
  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif
 
 #include "xdgmimealias.h"
 #include "xdgmimeint.h"
diff --git a/gio/xdgmime/xdgmimecache.c b/gio/xdgmime/xdgmimecache.c
index 1bcaf48e4..eab6119b6 100644
--- a/gio/xdgmime/xdgmimecache.c
+++ b/gio/xdgmime/xdgmimecache.c
@@ -22,9 +22,7 @@
  * 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 <stdlib.h>
diff --git a/gio/xdgmime/xdgmimeglob.c b/gio/xdgmime/xdgmimeglob.c
index 1d4fbc40d..c18762e9a 100644
--- a/gio/xdgmime/xdgmimeglob.c
+++ b/gio/xdgmime/xdgmimeglob.c
@@ -23,9 +23,7 @@
  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif
 
 #include "xdgmimeglob.h"
 #include "xdgmimeint.h"
diff --git a/gio/xdgmime/xdgmimeicon.c b/gio/xdgmime/xdgmimeicon.c
index 603d041e4..272b06268 100644
--- a/gio/xdgmime/xdgmimeicon.c
+++ b/gio/xdgmime/xdgmimeicon.c
@@ -22,9 +22,7 @@
  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif
 
 #include "xdgmimeicon.h"
 #include "xdgmimeint.h"
diff --git a/gio/xdgmime/xdgmimeint.c b/gio/xdgmime/xdgmimeint.c
index e1e9b4d99..d56bb8340 100644
--- a/gio/xdgmime/xdgmimeint.c
+++ b/gio/xdgmime/xdgmimeint.c
@@ -23,9 +23,7 @@
  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif
 
 #include "xdgmimeint.h"
 #include <ctype.h>
diff --git a/gio/xdgmime/xdgmimemagic.c b/gio/xdgmime/xdgmimemagic.c
index 051d727a8..51be9722b 100644
--- a/gio/xdgmime/xdgmimemagic.c
+++ b/gio/xdgmime/xdgmimemagic.c
@@ -23,9 +23,7 @@
  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif
 
 #include <assert.h>
 #include "xdgmimemagic.h"
diff --git a/gio/xdgmime/xdgmimeparent.c b/gio/xdgmime/xdgmimeparent.c
index 8b38b83b3..e87bf5513 100644
--- a/gio/xdgmime/xdgmimeparent.c
+++ b/gio/xdgmime/xdgmimeparent.c
@@ -23,9 +23,7 @@
  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif
 
 #include "xdgmimeparent.h"
 #include "xdgmimeint.h"
diff --git a/glib/gnulib/asnprintf.c b/glib/gnulib/asnprintf.c
index 10a8d38d0..0fdab2fba 100644
--- a/glib/gnulib/asnprintf.c
+++ b/glib/gnulib/asnprintf.c
@@ -14,9 +14,7 @@
    You should have received a copy of the GNU Lesser General Public License along
    with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
 
 #include "g-gnulib.h"
 
diff --git a/glib/gnulib/printf-parse.c b/glib/gnulib/printf-parse.c
index eab4b57ae..64bb8be2d 100644
--- a/glib/gnulib/printf-parse.c
+++ b/glib/gnulib/printf-parse.c
@@ -27,9 +27,7 @@
      STATIC             Set to 'static' to declare the function static.
      ENABLE_UNISTDIO    Set to 1 to enable the unistdio extensions.  */
 
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
 
 #include "g-gnulib.h"
 
diff --git a/glib/gnulib/printf.c b/glib/gnulib/printf.c
index 66261b8f1..242740a9d 100644
--- a/glib/gnulib/printf.c
+++ b/glib/gnulib/printf.c
@@ -22,9 +22,7 @@
  * GLib at ftp://ftp.gtk.org/pub/gtk/. 
  */
 
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
 #include <string.h>
 #include <stdlib.h>
 #include <stdio.h>
diff --git a/glib/meson.build b/glib/meson.build
index add29d06e..9df77b6f9 100644
--- a/glib/meson.build
+++ b/glib/meson.build
@@ -255,31 +255,28 @@ if host_system == 'windows'
     executable('gspawn-win32-helper', 'gspawn-win32-helper.c',
       install : true,
       gui_app : true,
-      c_args : ['-DHAVE_CONFIG_H=1'],
       include_directories : configinc,
       dependencies : [libintl, libglib_dep])
     executable('gspawn-win32-helper-console', 'gspawn-win32-helper.c',
       install : true,
-      c_args : ['-DHAVE_CONFIG_H=1', '-DHELPER_CONSOLE'],
+      c_args : ['-DHELPER_CONSOLE'],
       include_directories : configinc,
       dependencies : [libintl, libglib_dep])
   else
     executable('gspawn-win64-helper', 'gspawn-win32-helper.c',
       install : true,
       gui_app : true,
-      c_args : ['-DHAVE_CONFIG_H=1'],
       include_directories : configinc,
       dependencies : [libintl, libglib_dep])
     executable('gspawn-win64-helper-console', 'gspawn-win32-helper.c',
       install : true,
-      c_args : ['-DHAVE_CONFIG_H=1', '-DHELPER_CONSOLE'],
+      c_args : ['-DHELPER_CONSOLE'],
       include_directories : configinc,
       dependencies : [libintl, libglib_dep])
   endif
 else
   gtester = executable('gtester', 'gtester.c',
     install : true,
-    c_args : ['-DHAVE_CONFIG_H=1'],
     include_directories : configinc,
     dependencies : [libglib_dep])
 endif
diff --git a/glib/pcre/Makefile.am b/glib/pcre/Makefile.am
index 0787f9210..8f0bae66b 100644
--- a/glib/pcre/Makefile.am
+++ b/glib/pcre/Makefile.am
@@ -4,7 +4,6 @@ noinst_LTLIBRARIES += libpcre.la
 
 libpcre_la_CPPFLAGS = \
        -DG_LOG_DOMAIN=\"GLib-GRegex\" \
-       -DHAVE_CONFIG_H \
        -DHAVE_MEMMOVE \
        -DSUPPORT_UCP \
        -DSUPPORT_UTF \
diff --git a/glib/pcre/pcre_byte_order.c b/glib/pcre/pcre_byte_order.c
index 6ac8325b6..4f21433c1 100644
--- a/glib/pcre/pcre_byte_order.c
+++ b/glib/pcre/pcre_byte_order.c
@@ -43,9 +43,7 @@ see if it was compiled with the opposite endianness. If so, it uses an
 auxiliary local function to flip the appropriate bytes. */
 
 
-#ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif
 
 #include "pcre_internal.h"
 
diff --git a/glib/pcre/pcre_chartables.c b/glib/pcre/pcre_chartables.c
index 2a39e9ff3..293b16b32 100644
--- a/glib/pcre/pcre_chartables.c
+++ b/glib/pcre/pcre_chartables.c
@@ -20,9 +20,7 @@ and dead code stripping is activated. This leads to link errors. Pulling in the
 header ensures that the array gets flagged as "someone outside this compilation
 unit might reference this" and so it will always be supplied to the linker. */
 
-#ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif
 
 #include "pcre_internal.h"
 
diff --git a/glib/pcre/pcre_compile.c b/glib/pcre/pcre_compile.c
index d0ed8fbed..12e09c4ef 100644
--- a/glib/pcre/pcre_compile.c
+++ b/glib/pcre/pcre_compile.c
@@ -42,9 +42,7 @@ POSSIBILITY OF SUCH DAMAGE.
 supporting internal functions that are not used by other modules. */
 
 
-#ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif
 
 #define NLBLOCK cd             /* Block containing newline information */
 #define PSSTART start_pattern  /* Field containing processed string start */
diff --git a/glib/pcre/pcre_config.c b/glib/pcre/pcre_config.c
index aa0ef867b..34719591f 100644
--- a/glib/pcre/pcre_config.c
+++ b/glib/pcre/pcre_config.c
@@ -41,9 +41,7 @@ POSSIBILITY OF SUCH DAMAGE.
 /* This module contains the external function pcre_config(). */
 
 
-#ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif
 
 /* Keep the original link size. */
 static int real_link_size = LINK_SIZE;
diff --git a/glib/pcre/pcre_dfa_exec.c b/glib/pcre/pcre_dfa_exec.c
index f8c887fb3..9cc82323d 100644
--- a/glib/pcre/pcre_dfa_exec.c
+++ b/glib/pcre/pcre_dfa_exec.c
@@ -72,9 +72,7 @@ in others, so I abandoned this code. */
 
 
 
-#ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif
 
 #define NLBLOCK md             /* Block containing newline information */
 #define PSSTART start_subject  /* Field containing processed string start */
diff --git a/glib/pcre/pcre_exec.c b/glib/pcre/pcre_exec.c
index cecbbcf9d..4ba3eda01 100644
--- a/glib/pcre/pcre_exec.c
+++ b/glib/pcre/pcre_exec.c
@@ -41,9 +41,7 @@ POSSIBILITY OF SUCH DAMAGE.
 pattern matching using an NFA algorithm, trying to mimic Perl as closely as
 possible. There are also some static supporting functions. */
 
-#ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif
 
 #define NLBLOCK md             /* Block containing newline information */
 #define PSSTART start_subject  /* Field containing processed string start */
diff --git a/glib/pcre/pcre_fullinfo.c b/glib/pcre/pcre_fullinfo.c
index 7a7db110d..2fe785a13 100644
--- a/glib/pcre/pcre_fullinfo.c
+++ b/glib/pcre/pcre_fullinfo.c
@@ -42,9 +42,7 @@ POSSIBILITY OF SUCH DAMAGE.
 information about a compiled pattern. */
 
 
-#ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif
 
 #include "pcre_internal.h"
 
diff --git a/glib/pcre/pcre_get.c b/glib/pcre/pcre_get.c
index 3d9904e88..61147efe8 100644
--- a/glib/pcre/pcre_get.c
+++ b/glib/pcre/pcre_get.c
@@ -43,9 +43,7 @@ from the subject string after a regex match has succeeded. The original idea
 for these functions came from Scott Wimer. */
 
 
-#ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif
 
 #include "pcre_internal.h"
 
diff --git a/glib/pcre/pcre_globals.c b/glib/pcre/pcre_globals.c
index 534660c77..383ec7311 100644
--- a/glib/pcre/pcre_globals.c
+++ b/glib/pcre/pcre_globals.c
@@ -52,9 +52,7 @@ a local function is used.
 Also, when compiling for Virtual Pascal, things are done differently, and
 global variables are not used. */
 
-#ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif
 
 #include "pcre_internal.h"
 
diff --git a/glib/pcre/pcre_jit_compile.c b/glib/pcre/pcre_jit_compile.c
index acb7ea22a..d7233832f 100644
--- a/glib/pcre/pcre_jit_compile.c
+++ b/glib/pcre/pcre_jit_compile.c
@@ -40,9 +40,7 @@ POSSIBILITY OF SUCH DAMAGE.
 -----------------------------------------------------------------------------
 */
 
-#ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif
 
 #include "pcre_internal.h"
 
diff --git a/glib/pcre/pcre_newline.c b/glib/pcre/pcre_newline.c
index a0a13c8ed..ddd7708fa 100644
--- a/glib/pcre/pcre_newline.c
+++ b/glib/pcre/pcre_newline.c
@@ -47,9 +47,7 @@ and NLTYPE_ANY. The full list of Unicode newline characters is taken from
 http://unicode.org/unicode/reports/tr18/. */
 
 
-#ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif
 
 #include "pcre_internal.h"
 
diff --git a/glib/pcre/pcre_ord2utf8.c b/glib/pcre/pcre_ord2utf8.c
index b12da327a..71fd587e0 100644
--- a/glib/pcre/pcre_ord2utf8.c
+++ b/glib/pcre/pcre_ord2utf8.c
@@ -41,9 +41,7 @@ POSSIBILITY OF SUCH DAMAGE.
 /* This file contains a private PCRE function that converts an ordinal
 character value into a UTF8 string. */
 
-#ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif
 
 #include "pcre_internal.h"
 
diff --git a/glib/pcre/pcre_string_utils.c b/glib/pcre/pcre_string_utils.c
index 54a75f6c0..38cc2f958 100644
--- a/glib/pcre/pcre_string_utils.c
+++ b/glib/pcre/pcre_string_utils.c
@@ -42,9 +42,7 @@ POSSIBILITY OF SUCH DAMAGE.
 class. It is used by both pcre_exec() and pcre_def_exec(). */
 
 
-#ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif
 
 #include "pcre_internal.h"
 
diff --git a/glib/pcre/pcre_study.c b/glib/pcre/pcre_study.c
index acb531bdf..ee0930718 100644
--- a/glib/pcre/pcre_study.c
+++ b/glib/pcre/pcre_study.c
@@ -42,9 +42,7 @@ POSSIBILITY OF SUCH DAMAGE.
 supporting functions. */
 
 
-#ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif
 
 #include "pcre_internal.h"
 
diff --git a/glib/pcre/pcre_tables.c b/glib/pcre/pcre_tables.c
index b580a4a73..abcc96ef4 100644
--- a/glib/pcre/pcre_tables.c
+++ b/glib/pcre/pcre_tables.c
@@ -45,9 +45,7 @@ uses macros to change their names from _pcre_xxx to xxxx, thereby avoiding name
 clashes with the library. */
 
 
-#ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif
 
 #include "pcre_internal.h"
 
diff --git a/glib/pcre/pcre_valid_utf8.c b/glib/pcre/pcre_valid_utf8.c
index fc626b70b..cecaf347f 100644
--- a/glib/pcre/pcre_valid_utf8.c
+++ b/glib/pcre/pcre_valid_utf8.c
@@ -42,9 +42,7 @@ POSSIBILITY OF SUCH DAMAGE.
 strings. */
 
 
-#ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif
 
 #include "pcre_internal.h"
 
diff --git a/glib/pcre/pcre_version.c b/glib/pcre/pcre_version.c
index 58a0eaa26..3dd60a5bc 100644
--- a/glib/pcre/pcre_version.c
+++ b/glib/pcre/pcre_version.c
@@ -42,9 +42,7 @@ POSSIBILITY OF SUCH DAMAGE.
 string that identifies the PCRE version that is in use. */
 
 
-#ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif
 
 #include "pcre_internal.h"
 
diff --git a/glib/pcre/pcre_xclass.c b/glib/pcre/pcre_xclass.c
index e5a55d7bc..89ad09f54 100644
--- a/glib/pcre/pcre_xclass.c
+++ b/glib/pcre/pcre_xclass.c
@@ -42,9 +42,7 @@ POSSIBILITY OF SUCH DAMAGE.
 class. It is used by both pcre_exec() and pcre_def_exec(). */
 
 
-#ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif
 
 #include "pcre_internal.h"
 
diff --git a/glib/tests/hash.c b/glib/tests/hash.c
index 160ba4f56..0513d6558 100644
--- a/glib/tests/hash.c
+++ b/glib/tests/hash.c
@@ -26,9 +26,7 @@
 #undef G_DISABLE_ASSERT
 #undef G_LOG_DOMAIN
 
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
+#include <config.h>
 
 #include <stdio.h>
 #include <string.h>
diff --git a/glib/tests/meson.build b/glib/tests/meson.build
index 5ff885170..4ac3620b8 100644
--- a/glib/tests/meson.build
+++ b/glib/tests/meson.build
@@ -96,7 +96,7 @@ test_env = [
   'MALLOC_PERTURB_=@0@'.format(random_number % 256),
 ]
 
-test_cargs = ['-DHAVE_CONFIG_H=1', '-DG_LOG_DOMAIN="GLib"']
+test_cargs = ['-DG_LOG_DOMAIN="GLib"']
 
 # Tests that consistently time out on the CI infrastructure
 slow_tests = [
diff --git a/gobject/meson.build b/gobject/meson.build
index f58cfb297..f1ab8fd46 100644
--- a/gobject/meson.build
+++ b/gobject/meson.build
@@ -98,7 +98,6 @@ endforeach
 
 executable('gobject-query', 'gobject-query.c',
   install : true,
-  c_args : ['-DHAVE_CONFIG_H=1'],
   dependencies : [libglib_dep, libgobject_dep])
 
 install_data('gobject_gdb.py', install_dir : join_paths(glib_pkgdatadir, 'gdb'))
diff --git a/gobject/tests/meson.build b/gobject/tests/meson.build
index 3d99ef332..88eba19ae 100644
--- a/gobject/tests/meson.build
+++ b/gobject/tests/meson.build
@@ -38,7 +38,7 @@ foreach test_name : gobject_tests
     test_name = 'gobject-private'
   endif
   exe = executable(test_name, test_src,
-      c_args : ['-DHAVE_CONFIG_H=1', '-DG_LOG_DOMAIN="GLib-GObject"'],
+      c_args : ['-DG_LOG_DOMAIN="GLib-GObject"'],
       dependencies : deps,
   )
   test(test_name, exe, env : test_env)
@@ -74,7 +74,7 @@ marshalers_c = custom_target('marshalers_c',
 
 exe = executable('signals',
     'signals.c', marshalers_h, marshalers_c,
-    c_args : ['-DHAVE_CONFIG_H=1', '-DG_LOG_DOMAIN="GLib-GObject"'],
+    c_args : ['-DG_LOG_DOMAIN="GLib-GObject"'],
     dependencies : deps,
 )
 test('signals', exe, env : test_env)
diff --git a/tests/meson.build b/tests/meson.build
index 552178271..03997a634 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -7,7 +7,7 @@ test_env = [
   'MALLOC_CHECK_=2',
 ]
 
-test_cargs = ['-DHAVE_CONFIG_H=1', '-DG_LOG_DOMAIN="GLib"']
+test_cargs = ['-DG_LOG_DOMAIN="GLib"']
 
 subdir('gobject')
 subdir('refcount')
diff --git a/win32/vs10/glib-build-defines.props b/win32/vs10/glib-build-defines.props
index b87e22c55..86314a8c3 100644
--- a/win32/vs10/glib-build-defines.props
+++ b/win32/vs10/glib-build-defines.props
@@ -27,7 +27,7 @@
   <ItemDefinitionGroup>
     <ClCompile>
       
<AdditionalIncludeDirectories>..\..;..\..\glib;$(GlibEtcInstallRoot)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <PreprocessorDefinitions>HAVE_CONFIG_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <ForcedIncludeFiles>msvc_recommended_pragmas.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
       <MultiProcessorCompilation>true</MultiProcessorCompilation>
       <AdditionalOptions>/d2Zi+ %(AdditionalOptions)</AdditionalOptions>
diff --git a/win32/vs9/glib-build-defines.vsprops b/win32/vs9/glib-build-defines.vsprops
index 36fce8667..cccf36fe7 100644
--- a/win32/vs9/glib-build-defines.vsprops
+++ b/win32/vs9/glib-build-defines.vsprops
@@ -10,7 +10,7 @@
        <Tool
                Name="VCCLCompilerTool"
                AdditionalIncludeDirectories="..\..;..\..\glib;$(GlibEtcInstallRoot)\include"
-               PreprocessorDefinitions="HAVE_CONFIG_H"
+               PreprocessorDefinitions=""
                ForcedIncludeFiles="msvc_recommended_pragmas.h"
                AdditionalOptions="/MP"
        />


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