]> Savannah Git Hosting - gnulib.git/commitdiff
limits-h: Work around a clang 15 bug.
authorBruno Haible <bruno@clisp.org>
Thu, 9 Feb 2023 12:30:04 +0000 (13:30 +0100)
committerBruno Haible <bruno@clisp.org>
Thu, 9 Feb 2023 12:30:04 +0000 (13:30 +0100)
* m4/limits-h.m4 (gl_LIMITS_H): Test also for BOOL_MAX.
* doc/posix-headers/limits.texi: Mention the clang bug.

ChangeLog
doc/posix-headers/limits.texi
m4/limits-h.m4

index 2bbb71a3eeaeddac544a1e3b47f2510ac46d402a..fc3663eedc273d4e76d35e7bbd316bd8787b6830 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2023-02-09  Bruno Haible  <bruno@clisp.org>
+
+       limits-h: Work around a clang 15 bug.
+       * m4/limits-h.m4 (gl_LIMITS_H): Test also for BOOL_MAX.
+       * doc/posix-headers/limits.texi: Mention the clang bug.
+
 2023-02-09  Bruno Haible  <bruno@clisp.org>
 
        Fix error in C++ mode on glibc systems (regression 2022-04-28).
index 22dc4239f7d54b1ccba3da021ba1720209d86679..09440cac8d66d3f8a7d92d93a05fb4c7dd768817 100644 (file)
@@ -21,6 +21,9 @@ glibc 2.24, NetBSD 9.0, many others.
 The macros @code{BOOL_MAX} and @code{BOOL_WIDTH} are not defined on
 some platforms:
 glibc 2.32, many others.
+@item
+The macro @code{BOOL_MAX} is not defined with some compilers:
+clang 15.0.6.
 @end itemize
 
 Portability problems fixed by Gnulib module @code{gethostname}:
index 5088fa16fd3b71101d4fb4da1a4db4d653710481..4f8ce41098a96a2eea7c80be38051c3e9c76e5ec 100644 (file)
@@ -23,6 +23,7 @@ AC_DEFUN_ONCE([gl_LIMITS_H],
             int wb = WORD_BIT;
             int ullw = ULLONG_WIDTH;
             int bw = BOOL_WIDTH;
+            int bm = BOOL_MAX;
           ]])],
        [gl_cv_header_limits_width=yes],
        [gl_cv_header_limits_width=no])])