From 389b70491b4d6ff078712b848600a36efcced323 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 16 Sep 2000 01:04:19 +0000 Subject: Define LLONG_MIN, LLONG_MAX, ULLONG_MAX if necessary. Move includes of POSIX and Unix limits files to the end. --- include/limits.h | 41 ++++++++++++++++++++++++++++------------- 1 file changed, 28 insertions(+), 13 deletions(-) (limited to 'include') diff --git a/include/limits.h b/include/limits.h index 643c32d91f..d0c3d613f5 100644 --- a/include/limits.h +++ b/include/limits.h @@ -25,19 +25,6 @@ #include -#ifdef __USE_POSIX -/* POSIX adds things to . */ -# include -#endif - -#ifdef __USE_POSIX2 -# include -#endif - -#ifdef __USE_XOPEN -# include -#endif - /* Maximum length of any multibyte character in any locale. We define this value here since the gcc header does not define @@ -133,4 +120,32 @@ #if defined __GNUC__ && !defined _GCC_LIMITS_H_ /* `_GCC_LIMITS_H_' is what GCC's file defines. */ # include_next + +/* The 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. */ +# ifdef __USE_ISOC99 +# ifndef LLONG_MIN +# define LLONG_MIN LONG_LONG_MIN +# endif +# ifndef LLONG_MAX +# define LLONG_MAX LONG_LONG_MAX +# endif +# ifndef ULLONG_MAX +# define ULLONG_MAX ULONG_LONG_MAX +# endif +# endif +#endif + +#ifdef __USE_POSIX +/* POSIX adds things to . */ +# include +#endif + +#ifdef __USE_POSIX2 +# include +#endif + +#ifdef __USE_XOPEN +# include #endif -- cgit v1.2.3