summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorРуслан Ижбулатов <lrn1986@gmail.com>2019-03-20 19:05:19 +0000
committerРуслан Ижбулатов <lrn1986@gmail.com>2019-03-22 14:44:53 +0000
commit9ca7ac782e9f8cc8d4648d45afd39d0ab7ef7289 (patch)
treed383424e5436dc42263e11023a3f3cc68f52c633
parentff47bb0e537fae02e222199208df58dd43948d0b (diff)
downloadglib-9ca7ac782e9f8cc8d4648d45afd39d0ab7ef7289.tar.gz
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
-rw-r--r--meson.build10
1 files changed, 9 insertions, 1 deletions
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