* lib/limits.in.h (BOOL_MAX): Define to 1, not to 2^BOOL_WIDTH-1.
* tests/test-limits-h.c (main): Change expected value of BOOL_MAX.
+2024-02-12 Bruno Haible <bruno@clisp.org>
+
+ limits-h: Fix BOOL_MAX value.
+ * lib/limits.in.h (BOOL_MAX): Define to 1, not to 2^BOOL_WIDTH-1.
+ * tests/test-limits-h.c (main): Change expected value of BOOL_MAX.
+
2024-02-12 Florian Weimer <fweimer@redhat.com>
pthread_mutex_timedlock, pthread-spin: Fix configure test.
# define BOOL_WIDTH 1
# define BOOL_MAX 1
# elif ! defined BOOL_MAX
-# define BOOL_MAX ((((1U << (BOOL_WIDTH - 1)) - 1) << 1) + 1)
+# define BOOL_MAX 1
# endif
#endif
/* Macros specified by C23. */
int bool_attrs[] = { BOOL_MAX, BOOL_WIDTH };
-static_assert (BOOL_MAX == (((1U << (BOOL_WIDTH - 1)) - 1) * 2) + 1);
+static_assert (BOOL_MAX == 1);
static_assert (0 < MB_LEN_MAX);