[PATCH v3 5/7] include/limits.h: Assume GCC defines LLONG_{MAX,MIN} and ULLONG_MAX
Alejandro Colomar
alx@kernel.org
Mon Nov 10 14:17:39 GMT 2025
GCC defines these since GCC 3.4.5, in gcc.git 0c96ce220dae (2000-07-17;
"* glimits.h (LLONG_MIN, LLONG_MAX, ULLONG_MAX): Define for C99.").
Signed-off-by: Alejandro Colomar <alx@kernel.org>
---
include/limits.h | 15 ---------------
1 file changed, 15 deletions(-)
diff --git a/include/limits.h b/include/limits.h
index 6370ccd84d..62dd78d56d 100644
--- a/include/limits.h
+++ b/include/limits.h
@@ -124,21 +124,6 @@
# include_next <limits.h>
#endif
-/* The <limits.h> files in some gcc versions don't define LLONG_MIN,
- LLONG_MAX, and ULLONG_MAX. Instead only the values gcc defined for
- ages are available. */
-#if defined __USE_ISOC99 && defined __GNUC__
-# ifndef LLONG_MIN
-# define LLONG_MIN (-LLONG_MAX-1)
-# endif
-# ifndef LLONG_MAX
-# define LLONG_MAX __LONG_LONG_MAX__
-# endif
-# ifndef ULLONG_MAX
-# define ULLONG_MAX (LLONG_MAX * 2ULL + 1)
-# endif
-#endif
-
/* 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. */
--
2.51.0
More information about the Libc-alpha
mailing list