From d3f6bd13cb327edf8f1006ac6a3173a2cc74cbe3 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Wed, 29 Oct 2003 08:43:10 +0000 Subject: [PATCH] * include/stdint.h: Prevent signed->unsigned conversion for 32 and 64 bit min value constants. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/include/stdint.h | 26 +++++++++++++------------- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index f152be832..b2db13857 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2003-10-29 Danny Smith + + * include/stdint.h: Prevent signed->unsigned conversion for 32 and + 64 bit min value constants. + 2003-10-28 Igor Pechtchanski * path.cc (dot_special_chars): New global variable. diff --git a/winsup/cygwin/include/stdint.h b/winsup/cygwin/include/stdint.h index 95f76add8..406565cc0 100644 --- a/winsup/cygwin/include/stdint.h +++ b/winsup/cygwin/include/stdint.h @@ -70,8 +70,8 @@ typedef unsigned long long uintmax_t; #define INT8_MIN (-128) #define INT16_MIN (-32768) -#define INT32_MIN (-2147483647-1) -#define INT64_MIN (-9223372036854775808LL) +#define INT32_MIN (-2147483647 - 1) +#define INT64_MIN (-9223372036854775807LL - 1LL) #define INT8_MAX (127) #define INT16_MAX (32767) @@ -87,8 +87,8 @@ typedef unsigned long long uintmax_t; #define INT_LEAST8_MIN (-128) #define INT_LEAST16_MIN (-32768) -#define INT_LEAST32_MIN (-2147483648) -#define INT_LEAST64_MIN (-9223372036854775808LL) +#define INT_LEAST32_MIN (-2147483647 - 1) +#define INT_LEAST64_MIN (-9223372036854775807LL - 1LL) #define INT_LEAST8_MAX (127) #define INT_LEAST16_MAX (32767) @@ -103,9 +103,9 @@ typedef unsigned long long uintmax_t; /* Limits of fastest minimum-width integer types */ #define INT_FAST8_MIN (-128) -#define INT_FAST16_MIN (-2147483648) -#define INT_FAST32_MIN (-2147483648) -#define INT_FAST64_MIN (-9223372036854775808LL) +#define INT_FAST16_MIN (-2147483647 - 1) +#define INT_FAST32_MIN (-2147483647 - 1) +#define INT_FAST64_MIN (-9223372036854775807LL - 1LL) #define INT_FAST8_MAX (127) #define INT_FAST16_MAX (2147483647) @@ -119,25 +119,25 @@ typedef unsigned long long uintmax_t; /* Limits of integer types capable of holding object pointers */ -#define INTPTR_MIN (-2147483648) +#define INTPTR_MIN (-2147483647 - 1) #define INTPTR_MAX (2147483647) #define UINTPTR_MAX (4294967295UL) /* Limits of greatest-width integer types */ -#define INTMAX_MIN (-9223372036854775808) -#define INTMAX_MAX (9223372036854775807) +#define INTMAX_MIN (-9223372036854775807LL - 1LL) +#define INTMAX_MAX (9223372036854775807LL) #define UINTMAX_MAX (18446744073709551615ULL) /* Limits of other integer types */ #ifndef PTRDIFF_MIN -#define PTRDIFF_MIN (-2147483648) +#define PTRDIFF_MIN (-2147483647 - 1) #define PTRDIFF_MAX (2147483647) #endif #ifndef SIG_ATOMIC_MIN -#define SIG_ATOMIC_MIN (-2147483648) +#define SIG_ATOMIC_MIN (-2147483647 - 1) #endif #ifndef SIG_ATOMIC_MAX #define SIG_ATOMIC_MAX (2147483647) @@ -158,7 +158,7 @@ typedef unsigned long long uintmax_t; #endif #ifndef WINT_MIN -#define WINT_MIN (-2147483648) +#define WINT_MIN (-2147483647 - 1) #define WINT_MAX (2147483647) #endif -- 2.43.5