X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fstdint_.h;h=4fa52516d7bc3a2460253b8b39ebcc3e6b2775d5;hb=5d0b385594bc914e6233988bfb6bc1b92a2184b5;hp=098637fcdbe1c68123b565802e6c0d5c57058344;hpb=33af49ec64a71a736aa33080b5e0a9bd4a980a2f;p=gnulib.git diff --git a/lib/stdint_.h b/lib/stdint_.h index 098637fcd..4fa52516d 100644 --- a/lib/stdint_.h +++ b/lib/stdint_.h @@ -179,7 +179,7 @@ #ifdef GL_INT64_T # define int_least64_t int64_t #endif -#ifdef GL_UIN64_T +#ifdef GL_UINT64_T # define uint_least64_t uint64_t #endif @@ -277,7 +277,9 @@ #undef INT64_MIN #undef INT64_MAX #ifdef GL_INT64_T -# define INT64_MIN (~ INT64_MAX) +/* Prefer (- INTMAX_C (1) << 63) over (~ INT64_MAX) because SunPRO C 5.0 + evaluates the latter incorrectly in preprocessor expressions. */ +# define INT64_MIN (- INTMAX_C (1) << 63) # define INT64_MAX INTMAX_C (9223372036854775807) #endif @@ -377,10 +379,11 @@ #undef INTMAX_MIN #undef INTMAX_MAX -#define INTMAX_MIN (~ INTMAX_MAX) #ifdef INT64_MAX +# define INTMAX_MIN INT64_MIN # define INTMAX_MAX INT64_MAX #else +# define INTMAX_MIN INT32_MIN # define INTMAX_MAX INT32_MAX #endif