X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fstdint_.h;h=4fa52516d7bc3a2460253b8b39ebcc3e6b2775d5;hb=5d0b385594bc914e6233988bfb6bc1b92a2184b5;hp=92d64539a0dd6b044ea9ba2738296b2392df66fc;hpb=8debab49f4eeb1ba275d64c7c7b618ddc2ec197d;p=gnulib.git diff --git a/lib/stdint_.h b/lib/stdint_.h index 92d64539a..4fa52516d 100644 --- a/lib/stdint_.h +++ b/lib/stdint_.h @@ -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