[balsa/wip/gtk4: 138/351] meson.build: Fix the definition of HAVE_CTIME_R



commit 47aea6b38148e504824de337f72980de7f473703
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date:   Fri Jan 26 17:25:40 2018 -0500

    meson.build: Fix the definition of HAVE_CTIME_R
    
    It was always defined, to 0 if ctime_r is not available, which is not
    what autotools does.
    
        * meson.build: fix the definition of HAVE_CTIME_R.

 ChangeLog   |    4 ++++
 meson.build |    7 ++++---
 2 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 90b8c95..f5b4da9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2018-01-26  Peter Bloomfield  <pbloomfield bellsouth net>
 
+       * meson.build: fix the definition of HAVE_CTIME_R.
+
+2018-01-26  Peter Bloomfield  <pbloomfield bellsouth net>
+
        * meson.build: test for <locale.h> and set HAVE_LOCALE_H if
        found.
 
diff --git a/meson.build b/meson.build
index 01ef30a..7a75a93 100644
--- a/meson.build
+++ b/meson.build
@@ -539,9 +539,10 @@ conf.set('HAVE_DECL_CTIME_R',
   compiler.has_header_symbol('time.h', 'ctime_r') ? 1 : 0,
   description : 'Define to 1 if you have the declaration of ctime_r, and to 0 if you do not.')
 
-conf.set('HAVE_CTIME_R',
-  compiler.has_function('ctime_r') ? 1 : 0,
-  description : 'Define to 1 if you have the ctime_r function.')
+if compiler.has_function('ctime_r')
+  conf.set('HAVE_CTIME_R', 1,
+    description : 'Define to 1 if you have the ctime_r function.')
+endif
 
 if not compiler.has_header('zlib.h')
   error('zlib library required')


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