From b21327bd56b2fbb26a68fb37bd458a2275213a22 Mon Sep 17 00:00:00 2001 From: Matthew Seaman Date: Sat, 26 Mar 2016 12:36:55 +0000 Subject: [PATCH] Fix macro expansion on 32-bit platforms This definition: causes a compilation failure on platforms where HAVE_LL_CONSTANTS is defined in pg_config.h. In those cases INT64CONST(4294967296UL) will expand to 4294967296ULLL. It's not clear to me whether this should be a signed or an unsigned constant -- I'm guessing you'ld have used UINT64CONST() if you'ld really wanted an unsigned type. Simply dropping the 'UL' suffix here correctly produces a constant case to the desired signed 64bit integer type on both 32- and 64-bit platforms. --- src/include/distributed/master_metadata_utility.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/include/distributed/master_metadata_utility.h b/src/include/distributed/master_metadata_utility.h index f0d0f4f4b..17a711ee2 100644 --- a/src/include/distributed/master_metadata_utility.h +++ b/src/include/distributed/master_metadata_utility.h @@ -22,7 +22,7 @@ /* total number of hash tokens (2^32) */ -#define HASH_TOKEN_COUNT INT64CONST(4294967296UL) +#define HASH_TOKEN_COUNT INT64CONST(4294967296) /* In-memory representation of a typed tuple in pg_dist_shard. */ typedef struct ShardInterval