]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
string: constant value
authorGerrit Renker <grenker@cscs.ch>
Sun, 23 May 2010 05:43:04 +0000 (07:43 +0200)
committerAndre Noll <maan@systemlinux.org>
Sun, 23 May 2010 06:34:24 +0000 (08:34 +0200)
This replaces the LLONG_MAX constant with the value stolen
from limits.h (that value is only accessible when using
-std=c99). The value of 2^63-1 assumes 64-bit and can also
be computed as (1ULL << (sizeof(long long) * 8 - 1)) - 1).

string.c

index f51f3574f0cf372bdd8febb5ac517c45e3d92d59..1d8f69b938ca8a1139daf10a6b4139d0d97e5e42 100644 (file)
--- a/string.c
+++ b/string.c
@@ -525,9 +525,9 @@ __printf_2_3 int para_printf(struct para_buffer *b, const char *fmt, ...)
        }
 }
 
-/** \cond LLONG_MAX and LLONG_LIN might not be defined. */
+/** \cond LLONG_MAX and LLONG_MIN might not be defined. */
 #ifndef LLONG_MAX
-#define LLONG_MAX (1 << (sizeof(long) - 1))
+#define LLONG_MAX 9223372036854775807LL
 #endif
 #ifndef LLONG_MIN
 #define LLONG_MIN (-LLONG_MAX - 1LL)