On 09/22/2016 09:22 AM, Jim Meyering wrote:
the following fails:

   ./gnulib-tool --create-testdir --dir=/tmp/x --with-tests --test stdint

Odd, I'm not seeing those failures on x86-64 Fedora 24 (gcc 6.2.1 20160916 (Red Hat 6.2.1-2)).

Hmm, I think I see the problem. I guess you're using prerelease GCC 7? Anyway, there is a typo in m4/stdint.m4. I installed the attached; does it fix things for you?

any time we use certain features of stdint.h, we must currently
also be sure to build gnulib-derived limits.h for that definition.
m4/stdint.m4 was supposed to do that, but the typo got in the way.

From 461225a287cc9176c53de0b7479cad829544a5ef Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Thu, 22 Sep 2016 10:47:57 -0700
Subject: [PATCH] limits-h, stdint: Don't assume extensions, fix typo

* m4/limits-h.m4 (gl_LIMITS_H):
* m4/stdint.m4 (gl_STDINT_H):
Don't assume AC_USE_SYSTEM_EXTENSIONS.
* m4/stdint.m4 (gl_STDINT_H): Fix typo in setting of LIMITS_H,
reported by Jim Meyering in:
http://lists.gnu.org/archive/html/bug-gnulib/2016-09/msg00050.html
---
 ChangeLog      | 10 ++++++++++
 m4/limits-h.m4 |  4 +++-
 m4/stdint.m4   |  7 +++++--
 3 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 417de6a..61ac981 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2016-09-22  Paul Eggert  <eggert@cs.ucla.edu>
+
+	limits-h, stdint: Don't assume extensions, fix typo
+	* m4/limits-h.m4 (gl_LIMITS_H):
+	* m4/stdint.m4 (gl_STDINT_H):
+	Don't assume AC_USE_SYSTEM_EXTENSIONS.
+	* m4/stdint.m4 (gl_STDINT_H): Fix typo in setting of LIMITS_H,
+	reported by Jim Meyering in:
+	http://lists.gnu.org/archive/html/bug-gnulib/2016-09/msg00050.html
+
 2016-09-21  Jim Meyering  <meyering@fb.com>
 
 	getprogname: port to AIX
diff --git a/m4/limits-h.m4 b/m4/limits-h.m4
index 9130786..31fdf0a 100644
--- a/m4/limits-h.m4
+++ b/m4/limits-h.m4
@@ -14,7 +14,9 @@ AC_DEFUN_ONCE([gl_LIMITS_H],
   AC_CACHE_CHECK([whether limits.h has ULLONG_WIDTH etc.],
     [gl_cv_header_limits_width],
     [AC_COMPILE_IFELSE(
-       [AC_LANG_PROGRAM([[#define __STDC_WANT_IEC_60559_BFP_EXT__ 1
+       [AC_LANG_PROGRAM([[#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
+                           #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
+                          #endif
                           #include <limits.h>
                           int ullw = ULLONG_WIDTH;]])],
        [gl_cv_header_limits_width=yes],
diff --git a/m4/stdint.m4 b/m4/stdint.m4
index 52f7814..7328096 100644
--- a/m4/stdint.m4
+++ b/m4/stdint.m4
@@ -1,4 +1,4 @@
-# stdint.m4 serial 45
+# stdint.m4 serial 46
 dnl Copyright (C) 2001-2016 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -321,6 +321,9 @@ int32_t i32 = INT32_C (0x7fffffff);
          [AC_LANG_PROGRAM([[
             /* Work if build is not clean.  */
             #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
+            #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
+             #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
+            #endif
             #include <stdint.h>
             ]gl_STDINT_INCLUDES[
             int iw = UINTMAX_WIDTH;
@@ -343,7 +346,7 @@ int32_t i32 = INT32_C (0x7fffffff);
   fi
 
   # The substitute stdint.h needs the substitute limit.h's _GL_INTEGER_WIDTH.
-  test -z "$STDINT_H" || LIMITS_H=limits.h
+  LIMITS_H=limits.h
 
   AC_SUBST([HAVE_C99_STDINT_H])
   AC_SUBST([HAVE_SYS_BITYPES_H])
-- 
2.7.4

Reply via email to