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.
pull/407/head
Matthew Seaman 2016-03-26 12:36:55 +00:00
parent 3c765606bd
commit b21327bd56
1 changed files with 1 additions and 1 deletions

View File

@ -22,7 +22,7 @@
/* total number of hash tokens (2^32) */ /* 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. */ /* In-memory representation of a typed tuple in pg_dist_shard. */
typedef struct ShardInterval typedef struct ShardInterval