hrev48532 adds 1 changeset to branch 'master' old head: 0305947d0a69d723efe9fc0eaa6ca10dc27bdc47 new head: d1dc9cf655f283cf9a8b12f11b6cca7eb5d7a55e overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=d1dc9cf+%5E0305947 ---------------------------------------------------------------------------- d1dc9cf: stdint.h: use correct type for INT64_MAX (#11647) int64_t is signed. Although it does not make a difference by itself, because INT64_MAX is still a valid number for uint64_t (UL), the later INT64_MIN declaration depends on INT64_MAX, and therefore got implicitly casted to unsigned type. This fixes the following program on a x86_64 system: #include <stdint.h> int main() { int64_t test = 5; if (test < INT64_MIN) return 1; return 0; } This is a regression since commit 1d13a609 ("stdint.h: define [U]INT64[MAX|MIN] with [U]L on x86_64"). Signed-off-by: Jerome Duval <jerome.duval@xxxxxxxxx> [ Timothy Gu <timothygu99@xxxxxxxxx> ] ---------------------------------------------------------------------------- Revision: hrev48532 Commit: d1dc9cf655f283cf9a8b12f11b6cca7eb5d7a55e URL: http://cgit.haiku-os.org/haiku/commit/?id=d1dc9cf Author: Timothy Gu <timothygu99@xxxxxxxxx> Date: Fri Dec 19 23:16:47 2014 UTC Committer: Jerome Duval <jerome.duval@xxxxxxxxx> Commit-Date: Sat Dec 20 09:06:21 2014 UTC Ticket: https://dev.haiku-os.org/ticket/11647 ---------------------------------------------------------------------------- 1 file changed, 2 insertions(+), 2 deletions(-) headers/posix/stdint.h | 4 ++-- ---------------------------------------------------------------------------- diff --git a/headers/posix/stdint.h b/headers/posix/stdint.h index 03e6695..b90fca2 100644 --- a/headers/posix/stdint.h +++ b/headers/posix/stdint.h @@ -70,10 +70,10 @@ typedef uint64_t uintmax_t; #define UINT32_MAX (4294967295U) #if defined(__SIZEOF_LONG__) && __SIZEOF_LONG__ > 4 -#define INT64_MAX (9223372036854775807UL) +#define INT64_MAX (9223372036854775807L) #define UINT64_MAX (18446744073709551615UL) #else -#define INT64_MAX (9223372036854775807ULL) +#define INT64_MAX (9223372036854775807LL) #define UINT64_MAX (18446744073709551615ULL) #endif #define INT64_MIN (-INT64_MAX-1)