[glibmm/glibmm-2-62] Prepare existing files for building with Meson
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glibmm/glibmm-2-62] Prepare existing files for building with Meson
- Date: Tue, 3 Mar 2020 12:26:49 +0000 (UTC)
commit 2f3c640af3aafc8bf3a1a8b6ae923c545bcbcf9f
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date: Tue Mar 3 13:24:23 2020 +0100
Prepare existing files for building with Meson
* examples/network/resolver.cc: Don't include config.h. It's not used.
* glib/glibmm/ustring.cc: Check if GLIBMM_SIZEOF_WCHAR_T is defined.
* tools/generate_wrap_init.pl.in:
* tools/gmmproc.in: Change '\@' to '\ @'. Meson's configure_file()
removes a backslash immediately before an at-sign.
examples/network/resolver.cc | 3 ---
glib/glibmm/ustring.cc | 8 ++++++++
tools/generate_wrap_init.pl.in | 6 ++++--
tools/gmmproc.in | 4 +++-
4 files changed, 15 insertions(+), 6 deletions(-)
---
diff --git a/examples/network/resolver.cc b/examples/network/resolver.cc
index 0f16cdbe..77538163 100644
--- a/examples/network/resolver.cc
+++ b/examples/network/resolver.cc
@@ -17,9 +17,6 @@
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef _WIN32
-#include <config.h>
-#endif
#include <giomm.h>
#include <iostream>
#include <mutex>
diff --git a/glib/glibmm/ustring.cc b/glib/glibmm/ustring.cc
index 639041ea..cd012fc4 100644
--- a/glib/glibmm/ustring.cc
+++ b/glib/glibmm/ustring.cc
@@ -29,6 +29,14 @@
#include <config.h>
#endif
+// If glibmm is built with Autotools, GLIBMM_SIZEOF_WCHAR_T is not defined and
+// SIZEOF_WCHAR_T is defined in config.h.
+// If glibmm is built with Meson, config.h does not exist and
+// GLIBMM_SIZEOF_WCHAR_T is defined in glibmmconfig.h.
+#if !defined(SIZEOF_WCHAR_T) && defined(GLIBMM_SIZEOF_WCHAR_T)
+#define SIZEOF_WCHAR_T GLIBMM_SIZEOF_WCHAR_T
+#endif
+
namespace
{
diff --git a/tools/generate_wrap_init.pl.in b/tools/generate_wrap_init.pl.in
index f49fe2f2..d725b198 100644
--- a/tools/generate_wrap_init.pl.in
+++ b/tools/generate_wrap_init.pl.in
@@ -151,16 +151,18 @@ while ($ARGV[0])
my $basename = lc($ccast);
my @names = ($cppname, $basename, @extra_namespace);
+ # Don't remove the space between \ and @. When glibmm is built with Meson,
+ # the \ would be removed in generate_wrap_int.pl.
if ($type_of_class eq "_CLASS_GOBJECT" or
($type_of_class eq "_CLASS_GTKOBJECT" and
#TODO: Remove this hack eventually.
($cname ne "GtkTree" && $cname ne "GtkTreeItem" && $cname ne "GtkText")))
{
- push(@{$objects{$filename_header}}, \@names);
+ push(@{$objects{$filename_header}}, \ @names);
}
elsif ($type_of_class eq "_WRAP_GERROR")
{
- push(@{$exceptions{$filename_header}}, \@names);
+ push(@{$exceptions{$filename_header}}, \ @names);
}
}
elsif (/\b_INCLUDE_IN_WRAP_INIT\((.+)\)/)
diff --git a/tools/gmmproc.in b/tools/gmmproc.in
index 56b44e62..264955fa 100644
--- a/tools/gmmproc.in
+++ b/tools/gmmproc.in
@@ -73,7 +73,9 @@ sub parse_command_line_args();
#main()
parse_command_line_args();
-my $objOutputter = &Output::new($main::m4path, \@main::macrodirs);
+# Don't remove the space between \ and @. When glibmm is built with Meson,
+# the \ would be removed in gmmproc.
+my $objOutputter = &Output::new($main::m4path, \ @main::macrodirs);
my $objWrapParser = &WrapParser::new($objOutputter);
$$objWrapParser{srcdir} = $main::srcdir;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]