From 0c96ce220dae6767d11c1e1ad982368f658c39a8 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Mon, 17 Jul 2000 03:45:44 -0600 Subject: [PATCH] * glimits.h (LLONG_MIN, LLONG_MAX, ULLONG_MAX): Define for C99. From-SVN: r35088 --- gcc/ChangeLog | 2 ++ gcc/glimits.h | 17 +++++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2c05057a0b2..4219a7e2a5b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -28,6 +28,8 @@ Mon Jul 17 02:37:06 2000 Marc Espie 2000-07-17 Joseph S. Myers + * glimits.h (LLONG_MIN, LLONG_MAX, ULLONG_MAX): Define for C99. + * contrib.texi, cpp.texi, extend.texi, invoke.texi: Update references to C9X. Change references to -fstd and -flang-isoc9x to refer to -std. 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