From 9ca7ac782e9f8cc8d4648d45afd39d0ab7ef7289 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A0=D1=83=D1=81=D0=BB=D0=B0=D0=BD=20=D0=98=D0=B6=D0=B1?= =?UTF-8?q?=D1=83=D0=BB=D0=B0=D1=82=D0=BE=D0=B2?= Date: Wed, 20 Mar 2019 19:05:19 +0000 Subject: [PATCH] Set G_WITH_CYGWIN again This macro was lost during meson migration. Set it again. Also explain that Cygwin maintainers applied patches[0] to glib that simply marked all G_PLATFORM_WIN32-protected code as !defined(G_WITH_CYGWIN), i.e. they did not want that code to compile. Instead of altering ifdef guards all over the place, we'll just not define G_PLATFORM_WIN32 for Cygwin anymore. [0]: https://github.com/cygwinports/glib2.0/blob/3a873fdd1b9a9e649563fe8e6b8ae6951b0dd3be/2.36.3-not-win32.patch --- meson.build | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index d937b5fa3..9622ced5c 100644 --- a/meson.build +++ b/meson.build @@ -188,10 +188,18 @@ if host_system == 'windows' and get_option('default_library') == 'static' glibconfig_conf.set('GOBJECT_STATIC_COMPILATION', '1') endif -# FIXME: what about Cygwin (G_WITH_CYGWIN) +# Cygwin glib port maintainers made it clear +# (via the patches they apply) that they want no +# part of glib W32 code, therefore we do not define +# G_PLATFORM_WIN32 for host_system == 'cygwin'. +# This makes G_PLATFORM_WIN32 a synonym for +# G_OS_WIN32. if host_system == 'windows' glib_os = '''#define G_OS_WIN32 #define G_PLATFORM_WIN32''' +elif host_system == 'cygwin' + glib_os = '''#define G_OS_WIN32 +#define G_WITH_CYGWIN''' else glib_os = '#define G_OS_UNIX' endif