summaryrefslogtreecommitdiff
path: root/include/limits.h
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2009-10-17 04:17:57 +0200
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2009-11-19 23:09:22 +0100
commit343c9c0f915dc7dce19c9b30f2197d61389ef4f4 (patch)
treedbbdeb70a2f5819d8ccb75e011fe0757740502f9 /include/limits.h
parent2d9bad0c0a0309899b7fa603d4b4f9b2932165a0 (diff)
limits.h: update
Should we care about compilers not defining __LONG_LONG_MAX__? Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'include/limits.h')
-rw-r--r--include/limits.h23
1 files changed, 12 insertions, 11 deletions
diff --git a/include/limits.h b/include/limits.h
index 45cd6f253..3e9a5df88 100644
--- a/include/limits.h
+++ b/include/limits.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 1991, 92, 96, 97, 98, 99, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1996, 1997, 1998, 1999, 2000, 2005
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -122,20 +123,20 @@
#if defined __GNUC__ && !defined _GCC_LIMITS_H_
/* `_GCC_LIMITS_H_' is what GCC's file defines. */
# include_next <limits.h>
+#endif
/* The <limits.h> 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
+#if defined __USE_ISOC99 && defined __GNUC__
+# ifndef LLONG_MIN
+# define LLONG_MIN (-LLONG_MAX-1)
+# endif
+# ifndef LLONG_MAX
+# define LLONG_MAX __LONG_LONG_MAX__
+# endif
+# ifndef ULLONG_MAX
+# define ULLONG_MAX (LLONG_MAX * 2ULL + 1)
# endif
#endif