summaryrefslogtreecommitdiff
path: root/recipes/glib/0001-meson-Fix-gnulib-printf-checks.patch
blob: 3d97894146c5015de0539e7f42bedc50371ed435 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
From dade900c537bcdc54910a679c25368573f0e8c61 Mon Sep 17 00:00:00 2001
From: Nirbheek Chauhan <nirbheek@centricular.com>
Date: Mon, 8 Jun 2020 18:43:04 +0530
Subject: [PATCH] meson: Fix gnulib printf checks

Some typos, and accidental usage of the strings `'true'` / `'false'`
instead of the booleans `true` / `false`.
---
 .../meson.build                               | 20 +++++++++----------
 glib/meson.build                              |  2 +-
 2 files changed, 10 insertions(+), 12 deletions(-)

diff --git a/glib/gnulib/gl_cv_func_printf_infinite_long_double/meson.build b/glib/gnulib/gl_cv_func_printf_infinite_long_double/meson.build
index b7a714c..509e781 100644
--- a/glib/gnulib/gl_cv_func_printf_infinite_long_double/meson.build
+++ b/glib/gnulib/gl_cv_func_printf_infinite_long_double/meson.build
@@ -170,41 +170,39 @@ if gl_cv_func_printf_long_double
   if not meson.is_cross_build() or meson.has_exe_wrapper()
     run_result = cc.run(printf_infinite_long_double_test,
         name : 'printf supports infinite \'long double\' arguments')
-    gl_cv_func_printf_infinite_long_double = (run_result.compiled() and run_result.returncode() == 0) ? 'true' : 'false'
+    gl_cv_func_printf_infinite_long_double = (run_result.compiled() and run_result.returncode() == 0)
   else
     if host_machine.cpu_family() == 'x86_64'
-      gl_cv_func_printf_infinite_long_double = 'false'
+      gl_cv_func_printf_infinite_long_double = false
     else
       if host_system == 'linux'
-        gl_cv_func_printf_infinite_long_double = 'true'
+        gl_cv_func_printf_infinite_long_double = true
       elif (host_system.startswith ('freebsd1') or
             host_system.startswith ('freebsd2') or
             host_system.startswith ('freebsd3') or
             host_system.startswith ('freebsd4') or
             host_system.startswith ('freebsd5'))
-        gl_cv_func_printf_infinite_long_double = 'false'
+        gl_cv_func_printf_infinite_long_double = false
       elif (host_system.startswith ('freebsd') or
             host_system.startswith ('kfreebsd'))
-        gl_cv_func_printf_infinite_long_double = 'true'
+        gl_cv_func_printf_infinite_long_double = true
       elif (host_system.startswith ('hpux7') or
             host_system.startswith ('hpux8') or
             host_system.startswith ('hpux9') or
             host_system.startswith ('hpux10'))
         gl_cv_func_printf_infinite = false
       elif host_system.startswith ('hpux')
-        gl_cv_func_printf_infinite_long_double = 'true'
+        gl_cv_func_printf_infinite_long_double = true
       elif host_system == 'windows'
         # Guess yes on MSVC, no on mingw.
         if cc.get_id() == 'msvc' or cc.get_id() == 'clang-cl'
-          gl_cv_func_printf_infinite = 'true'
+          gl_cv_func_printf_infinite_long_double = true
         else
-          gl_cv_func_printf_infinite = 'false'
+          gl_cv_func_printf_infinite_long_double = false
         endif
       else
-        gl_cv_func_printf_infinite_long_double = 'false'
+        gl_cv_func_printf_infinite_long_double = false
       endif
     endif
   endif
-else
-  gl_cv_func_printf_infinite_long_double = 'irrelevant'
 endif
diff --git a/glib/meson.build b/glib/meson.build
index ef96772..914089c 100644
--- a/glib/meson.build
+++ b/glib/meson.build
@@ -99,7 +99,7 @@ else
     glib_conf.set('NEED_PRINTF_INFINITE_DOUBLE', 1)
   endif
 
-  if gl_cv_func_printf_long_double and gl_cv_func_printf_infinite_long_double != 'false'
+  if gl_cv_func_printf_long_double and gl_cv_func_printf_infinite_long_double
     glib_conf.set('NEED_PRINTF_INFINITE_LONG_DOUBLE', 1)
   endif
 
-- 
2.27.0.windows.1