[balsa] meson.build: Fix the definition of HAVE_CTIME_R



commit 50cdfb3c0b17b783e5f43483430af19f657c87e7
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 e01781b..8f058dd 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 85c198b..a70289c 100644
--- a/meson.build
+++ b/meson.build
@@ -551,9 +551,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]