[gnome-terminal] build: Improve libc feature extension defines



commit 8300cf99380da071b2d04c1588011894fbb9f7d2
Author: Christian Persch <chpe src gnome org>
Date:   Thu Jul 28 23:19:49 2022 +0200

    build: Improve libc feature extension defines
    
    Following the vte changes.

 meson.build | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)
---
diff --git a/meson.build b/meson.build
index 05756726..3bec4b0e 100644
--- a/meson.build
+++ b/meson.build
@@ -159,8 +159,26 @@ config_h.set_quoted('VERSION', gt_version)
 config_h.set('ENABLE_DEBUG', enable_debug)
 config_h.set('ENABLE_SEARCH_PROVIDER', get_option('search_provider'))
 
-# FIXME AC_USE_SYSTEM_EXTENSIONS also supported non-gnu systems
-config_h.set10('_GNU_SOURCE', true)
+# Enable libc features
+
+libc_feature_defines = [
+  ['_GNU_SOURCE', '1'],
+  ['_POSIX_C_SOURCE', '200809L'],
+  ['_XOPEN_SOURCE', '700'],
+  ['_XOPEN_SOURCE_EXTENDED', '1'],
+]
+
+if host_machine.system() == 'freebsd'
+  # Defining _POSIX_C_SOURCE above makes freebsd not expose some functionality
+  # that's hidden behind __BSD_VISIBLE.  Not defininy any of the above however
+  # makes it expose verything.
+
+  libc_feature_defines = []
+endif
+
+foreach f: libc_feature_defines
+  config_h.set(f[0], f[1])
+endforeach
 
 # Min/max version requirement flags
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]