aboutsummaryrefslogtreecommitdiff
path: root/gcc/glimits.h
diff options
context:
space:
mode:
authorJoseph Myers <jsm28@cam.ac.uk>2000-07-17 03:45:44 -0600
committerJeff Law <law@gcc.gnu.org>2000-07-17 03:45:44 -0600
commit0c96ce220dae6767d11c1e1ad982368f658c39a8 (patch)
treedfc63b292aa624d49add0d8553f70d2a3e22871a /gcc/glimits.h
parent49419c8f9ec568675219effb77a6fc2bdb586e65 (diff)
downloadgcc-0c96ce220dae6767d11c1e1ad982368f658c39a8.zip
gcc-0c96ce220dae6767d11c1e1ad982368f658c39a8.tar.gz
gcc-0c96ce220dae6767d11c1e1ad982368f658c39a8.tar.bz2
* glimits.h (LLONG_MIN, LLONG_MAX, ULLONG_MAX): Define for C99.
From-SVN: r35088
Diffstat (limited to 'gcc/glimits.h')
-rw-r--r--gcc/glimits.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/gcc/glimits.h b/gcc/glimits.h
index a766f81..f7dab82 100644
--- a/gcc/glimits.h
+++ b/gcc/glimits.h
@@ -79,11 +79,24 @@
#undef ULONG_MAX
#define ULONG_MAX (LONG_MAX * 2UL + 1)
-#if defined (__GNU_LIBRARY__) ? defined (__USE_GNU) : !defined (__STRICT_ANSI__)
-/* Minimum and maximum values a `signed long long int' can hold. */
#ifndef __LONG_LONG_MAX__
#define __LONG_LONG_MAX__ 9223372036854775807LL
#endif
+
+#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+/* Minimum and maximum values a `signed long long int' can hold. */
+#undef LLONG_MIN
+#define LLONG_MIN (-LLONG_MAX-1)
+#undef LLONG_MAX
+#define LLONG_MAX __LONG_LONG_MAX__
+
+/* Maximum value an `unsigned long long int' can hold. (Minimum is 0). */
+#undef ULLONG_MAX
+#define ULLONG_MAX (LLONG_MAX * 2ULL + 1)
+#endif
+
+#if defined (__GNU_LIBRARY__) ? defined (__USE_GNU) : !defined (__STRICT_ANSI__)
+/* Minimum and maximum values a `signed long long int' can hold. */
#undef LONG_LONG_MIN
#define LONG_LONG_MIN (-LONG_LONG_MAX-1)
#undef LONG_LONG_MAX