diff --git a/src/backend/replication/basebackup.c b/src/backend/replication/basebackup.c index bc9f585b85..5688cbe2e9 100644 --- a/src/backend/replication/basebackup.c +++ b/src/backend/replication/basebackup.c @@ -1361,7 +1361,7 @@ sendFile(const char *readfilename, const char *tarfilename, struct stat *statbuf char buf[TAR_SEND_SIZE]; uint16 checksum; int checksum_failures = 0; - size_t cnt; + off_t cnt; int i; pgoff_t len = 0; char *page; diff --git a/src/bin/pgbench/pgbench.c b/src/bin/pgbench/pgbench.c index 21a52c2020..c36556c497 100644 --- a/src/bin/pgbench/pgbench.c +++ b/src/bin/pgbench/pgbench.c @@ -67,6 +67,7 @@ #define FNV_PRIME UINT64CONST(0x100000001b3) #define FNV_OFFSET_BASIS UINT64CONST(0xcbf29ce484222325) #define MM2_MUL UINT64CONST(0xc6a4a7935bd1e995) +#define MM2_MUL_TIMES_8 UINT64CONST(0x35253c9ade8f4ca8) #define MM2_ROT 47 /* @@ -968,7 +969,7 @@ getHashFnv1a(int64 val, uint64 seed) static int64 getHashMurmur2(int64 val, uint64 seed) { - uint64 result = seed ^ (sizeof(int64) * MM2_MUL); + uint64 result = seed ^ MM2_MUL_TIMES_8; /* sizeof(int64) */ uint64 k = (uint64) val; k *= MM2_MUL; diff --git a/src/include/pg_config.h.win32 b/src/include/pg_config.h.win32 index bc437b08f0..e776b34f22 100644 --- a/src/include/pg_config.h.win32 +++ b/src/include/pg_config.h.win32 @@ -357,7 +357,9 @@ #define HAVE_SSL_GET_CURRENT_COMPRESSION 1 /* Define to 1 if stdbool.h conforms to C99. */ -/* #undef HAVE_STDBOOL_H */ +#if (_MSC_VER >= 1800) +#define HAVE_STDBOOL_H 1 +#endif /* Define to 1 if you have the header file. */ /* #undef HAVE_STDINT_H */