-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2022 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
+ <https://www.gnu.org/licenses/>. */
/*
* ISO C99 Standard: 7.10/5.2.4.2.1 Sizes of integer types <limits.h>
/* The integer width macros are not defined by GCC's <limits.h> before
GCC 7, or if _GNU_SOURCE rather than
__STDC_WANT_IEC_60559_BFP_EXT__ is used to enable this feature. */
-#if __GLIBC_USE (IEC_60559_BFP_EXT)
+#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
# ifndef CHAR_WIDTH
# define CHAR_WIDTH 8
# endif
# endif
#endif /* Use IEC_60559_BFP_EXT. */
+/* The macros for _Bool are not defined by GCC's <limits.h> before GCC
+ 11, or if _GNU_SOURCE is defined rather than enabling C2x support
+ with -std. */
+#if __GLIBC_USE (ISOC2X)
+# ifndef BOOL_MAX
+# define BOOL_MAX 1
+# endif
+# ifndef BOOL_WIDTH
+# define BOOL_WIDTH 1
+# endif
+#endif
+
#ifdef __USE_POSIX
/* POSIX adds things to <limits.h>. */
# include <bits/posix1_lim.h>