This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
glibc's limits.h
- To: libc-alpha at sourceware dot cygnus dot com
- Subject: glibc's limits.h
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- Date: Mon, 24 Jul 2000 00:10:48 +0100 (BST)
glibc's limits.h has a section for non-GCC compilers that provides the
constants required by standard C. This section seemed a bit out of date:
this patch removes __STDC__ conditionals and adds the C99 long long
constants if __USE_ISOC99. I guess the __alpha__ conditionals should be
updated with a longer list of architectures, but don't know what the
current such list is.
--- include/limits.h Wed Jun 16 21:02:32 1999
+++ include/limits.h.new Sun Jul 23 23:02:26 2000
@@ -92,11 +92,7 @@
# define INT_MAX 2147483647
/* Maximum value an `unsigned int' can hold. (Minimum is 0.) */
-# ifdef __STDC__
-# define UINT_MAX 4294967295U
-# else
-# define UINT_MAX 4294967295
-# endif
+# define UINT_MAX 4294967295U
/* Minimum and maximum values a `signed long int' can hold. */
# ifdef __alpha__
@@ -110,12 +106,19 @@
# ifdef __alpha__
# define ULONG_MAX 18446744073709551615UL
# else
-# ifdef __STDC__
-# define ULONG_MAX 4294967295UL
-# else
-# define ULONG_MAX 4294967295L
-# endif
+# define ULONG_MAX 4294967295UL
# endif
+
+# ifdef __USE_ISOC99
+
+/* Minimum and maximum values a `signed long long int' can hold. */
+# define LLONG_MAX 9223372036854775807LL
+# define LLONG_MIN (-LLONG_MAX - 1LL)
+
+/* Maximum value an `unsigned long long int' can hold. (Minimum is 0.) */
+# define ULLONG_MAX 18446744073709551615ULL
+
+# endif /* ISO C99 */
# endif /* limits.h */
#endif /* GCC 2. */
--
Joseph S. Myers
jsm28@cam.ac.uk