From 1741fc2c6eb8e11f4e786ccc5c19c0da327630a5 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Mon, 27 May 2019 18:19:07 +0100 Subject: [PATCH] build: Drop use of G_DISABLE_DEPRECATED from the build system MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It’s no longer used in any of the headers. See preceding commits. Signed-off-by: Philip Withnall --- docs/reference/glib/compiling.xml | 7 +++---- docs/reference/meson.build | 1 - gio/fam/meson.build | 2 +- gio/inotify/meson.build | 2 +- gio/kqueue/meson.build | 2 +- gio/win32/meson.build | 2 +- gmodule/meson.build | 2 +- 7 files changed, 8 insertions(+), 10 deletions(-) diff --git a/docs/reference/glib/compiling.xml b/docs/reference/glib/compiling.xml index 6a8626488..02971a60f 100644 --- a/docs/reference/glib/compiling.xml +++ b/docs/reference/glib/compiling.xml @@ -93,11 +93,10 @@ this range will trigger compiler warnings. -The older deprecation mechanism of hiding deprecated interfaces +Since GLib 2.62, the older deprecation mechanism of hiding deprecated interfaces entirely from the compiler by using the preprocessor symbol -G_DISABLE_DEPRECATED is still used for deprecated macros, -enumeration values, etc. To detect uses of these in your code, -use the commandline option -DG_DISABLE_DEPRECATED. +G_DISABLE_DEPRECATED has been removed. All deprecations +are now handled using the above mechanism. diff --git a/docs/reference/meson.build b/docs/reference/meson.build index e4dbf3f12..8da9665f4 100644 --- a/docs/reference/meson.build +++ b/docs/reference/meson.build @@ -26,7 +26,6 @@ foreach version : stable_2_series_versions endforeach gtkdoc_common_scan_args = [ - '--deprecated-guards=G_DISABLE_DEPRECATED', '--ignore-decorators=' + '|'.join(ignore_decorators), ] diff --git a/gio/fam/meson.build b/gio/fam/meson.build index d24670a63..8019fe5c4 100644 --- a/gio/fam/meson.build +++ b/gio/fam/meson.build @@ -3,7 +3,7 @@ if not get_option('fam') endif fam_dep = cc.find_library('fam') -fam_c_args = ['-DG_DISABLE_DEPRECATED'] + gio_c_args +fam_c_args = gio_c_args if cc.has_function('FAMNoExists', dependencies : fam_dep) fam_c_args += '-DHAVE_FAM_NO_EXISTS=1' endif diff --git a/gio/inotify/meson.build b/gio/inotify/meson.build index 8183f141e..9b0c7ab30 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, libglib_dep, libgobject_dep], pic : true, - c_args : [ '-DG_DISABLE_DEPRECATED' ] + gio_c_args) + c_args : gio_c_args) diff --git a/gio/kqueue/meson.build b/gio/kqueue/meson.build index e5057c83d..d389b06f7 100644 --- a/gio/kqueue/meson.build +++ b/gio/kqueue/meson.build @@ -10,4 +10,4 @@ kqueue_lib = static_library('kqueue', include_directories : [configinc, glibinc, gmoduleinc], dependencies : [gioenumtypes_dep], pic : true, - c_args : [ '-DG_DISABLE_DEPRECATED' ] + gio_c_args) + c_args : gio_c_args) diff --git a/gio/win32/meson.build b/gio/win32/meson.build index f0fc307ba..8d589989b 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, gioenumtypes_dep], pic : true, - c_args : [ '-DG_DISABLE_DEPRECATED' ] + gio_c_args) + c_args : gio_c_args) diff --git a/gmodule/meson.build b/gmodule/meson.build index e4a6a1c81..a7a2a5c87 100644 --- a/gmodule/meson.build +++ b/gmodule/meson.build @@ -103,7 +103,7 @@ libgmodule = library('gmodule-2.0', install : true, include_directories : [configinc, gmoduleinc], dependencies : [libdl_dep, libglib_dep], - c_args : ['-DG_LOG_DOMAIN="GModule"', '-DG_DISABLE_DEPRECATED'] + glib_hidden_visibility_args, + c_args : ['-DG_LOG_DOMAIN="GModule"'] + glib_hidden_visibility_args, link_args : [glib_link_flags], )