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
This commit is contained in:
Ernestas Kulik
2018-02-19 14:09:10 +02:00
committed by Philip Withnall
parent 9d24c8b223
commit 03e86d000f
49 changed files with 31 additions and 100 deletions

View File

@@ -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)

View File

@@ -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)

View File

@@ -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])

View File

@@ -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)

View File

@@ -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),

View File

@@ -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)

View File

@@ -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)

View File

@@ -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"

View File

@@ -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"

View File

@@ -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>

View File

@@ -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"

View File

@@ -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"

View File

@@ -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>

View File

@@ -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"

View File

@@ -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"