mirror of git://sourceware.org/git/glibc.git
Add C2x BOOL_MAX and BOOL_WIDTH to limits.h.
C2x adds BOOL_MAX and BOOL_WIDTH macros to <limits.h>. This patch adds them to glibc's <limits.h> for the case when they aren't defined by GCC's <limits.h>. Tested for x86_64.
This commit is contained in:
parent
c08df688f2
commit
e5baabf57b
|
|
@ -178,6 +178,18 @@
|
||||||
# endif
|
# endif
|
||||||
#endif /* Use IEC_60559_BFP_EXT. */
|
#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
|
#ifdef __USE_POSIX
|
||||||
/* POSIX adds things to <limits.h>. */
|
/* POSIX adds things to <limits.h>. */
|
||||||
# include <bits/posix1_lim.h>
|
# include <bits/posix1_lim.h>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue