changeset 39517:7f0b8c24fd58

limits-h: Formalize side effects from other modules. * m4/limits-h.m4 (gl_REPLACE_LIMITS_H): New macro. * m4/stdint.m4 (gl_STDINT_H): Invoke it.
author Bruno Haible <bruno@clisp.org>
date Sun, 19 Aug 2018 20:57:24 +0200
parents 8f0926fb0cfe
children 3d5c2db5c8db
files ChangeLog m4/limits-h.m4 m4/stdint.m4
diffstat 3 files changed, 16 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sun Aug 19 14:14:17 2018 +0200
+++ b/ChangeLog	Sun Aug 19 20:57:24 2018 +0200
@@ -1,3 +1,9 @@
+2018-08-19  Bruno Haible  <bruno@clisp.org>
+
+	limits-h: Formalize side effects from other modules.
+	* m4/limits-h.m4 (gl_REPLACE_LIMITS_H): New macro.
+	* m4/stdint.m4 (gl_STDINT_H): Invoke it.
+
 2018-08-19  Bruno Haible  <bruno@clisp.org>
 
 	getpass: Move declaration to <unistd.h>.
--- a/m4/limits-h.m4	Sun Aug 19 14:14:17 2018 +0200
+++ b/m4/limits-h.m4	Sun Aug 19 20:57:24 2018 +0200
@@ -29,3 +29,11 @@
   AC_SUBST([LIMITS_H])
   AM_CONDITIONAL([GL_GENERATE_LIMITS_H], [test -n "$LIMITS_H"])
 ])
+
+dnl Unconditionally enables the replacement of <limits.h>.
+AC_DEFUN([gl_REPLACE_LIMITS_H],
+[
+  AC_REQUIRE([gl_LIMITS_H])
+  LIMITS_H='limits.h'
+  AM_CONDITIONAL([GL_GENERATE_LIMITS_H], [test -n "$LIMITS_H"])
+])
--- a/m4/stdint.m4	Sun Aug 19 14:14:17 2018 +0200
+++ b/m4/stdint.m4	Sun Aug 19 20:57:24 2018 +0200
@@ -1,4 +1,4 @@
-# stdint.m4 serial 51
+# stdint.m4 serial 52
 dnl Copyright (C) 2001-2018 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -364,8 +364,7 @@
   esac
 
   dnl The substitute stdint.h needs the substitute limit.h's _GL_INTEGER_WIDTH.
-  LIMITS_H=limits.h
-  AM_CONDITIONAL([GL_GENERATE_LIMITS_H], [test -n "$LIMITS_H"])
+  gl_REPLACE_LIMITS_H
 
   AC_SUBST([HAVE_C99_STDINT_H])
   AC_SUBST([HAVE_SYS_BITYPES_H])