[vte] build: Define list of libc feature test macros only once
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte] build: Define list of libc feature test macros only once
- Date: Tue, 21 Jun 2022 22:21:02 +0000 (UTC)
commit 67755af670ed1e560d34a441ea30eb4446ca3671
Author: Christian Persch <chpe src gnome org>
Date: Wed Jun 22 00:20:56 2022 +0200
build: Define list of libc feature test macros only once
meson.build | 26 ++++++++++++++++----------
1 file changed, 16 insertions(+), 10 deletions(-)
---
diff --git a/meson.build b/meson.build
index 61da2ec7..e62e9a26 100644
--- a/meson.build
+++ b/meson.build
@@ -214,10 +214,16 @@ endif
# Enable libc features
-config_h.set10('_GNU_SOURCE', true)
-config_h.set('_POSIX_C_SOURCE', '200809L')
-config_h.set('_XOPEN_SOURCE', '700')
-config_h.set10('_XOPEN_SOURCE_EXTENDED', true)
+libc_feature_defines = [
+ ['_GNU_SOURCE', '1'],
+ ['_POSIX_C_SOURCE', '200809L'],
+ ['_XOPEN_SOURCE', '700'],
+ ['_XOPEN_SOURCE_EXTENDED', 1],
+]
+
+foreach f: libc_feature_defines
+ config_h.set(f[0], f[1])
+endforeach
# Check headers
@@ -396,14 +402,14 @@ foreach func: check_functions
}
'''.format(__prot, __name)
+ __args = []
+ foreach f: libc_feature_defines
+ __args += '-D@0@=@1@'.format(f[0], f[1])
+ endforeach
+
__have = cxx.compiles(
__code,
- args: [
- '-D_GNU_SOURCE',
- '-D_POSIX_C_SOURCE=200809L',
- '-D_XOPEN_SOURCE=700',
- '-D_XOPEN_SOURCE_EXTENDED',
- ],
+ args: __args,
dependencies: __deps,
name: __name,
)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]