summaryrefslogtreecommitdiff
path: root/gcc/glimits.h
diff options
context:
space:
mode:
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>2000-07-17 09:45:44 +0000
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>2000-07-17 09:45:44 +0000
commitcee8b059aef53d3cf1944d5b35188f9cf431c797 (patch)
treedfc63b292aa624d49add0d8553f70d2a3e22871a /gcc/glimits.h
parentdbe4c49e0a17e2ef3fb20b9d6b528cbf194ad687 (diff)
downloadgcc-cee8b059aef53d3cf1944d5b35188f9cf431c797.tar.gz
* glimits.h (LLONG_MIN, LLONG_MAX, ULLONG_MAX): Define for C99.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35088 138bc75d-0d04-0410-961f-82ee72b054a4
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 a766f81bdd5..f7dab82c3c1 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