From: Bruno Haible Date: Thu, 9 Feb 2023 12:30:04 +0000 (+0100) Subject: limits-h: Work around a clang 15 bug. X-Git-Tag: v1.0~1687 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=4603b10e536282d6c7e5f76d7388357d356ee2d3;p=gnulib.git 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. --- diff --git a/ChangeLog b/ChangeLog index 2bbb71a3ee..fc3663eedc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2023-02-09 Bruno Haible + + 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 Fix error in C++ mode on glibc systems (regression 2022-04-28). diff --git a/doc/posix-headers/limits.texi b/doc/posix-headers/limits.texi index 22dc4239f7..09440cac8d 100644 --- a/doc/posix-headers/limits.texi +++ b/doc/posix-headers/limits.texi @@ -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}: diff --git a/m4/limits-h.m4 b/m4/limits-h.m4 index 5088fa16fd..4f8ce41098 100644 --- a/m4/limits-h.m4 +++ b/m4/limits-h.m4 @@ -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])])