aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'contrib')
-rw-r--r--contrib/btree_gist/btree_ts.c4
-rw-r--r--contrib/intarray/_int_gist.c4
-rw-r--r--contrib/pgbench/pgbench.c6
3 files changed, 6 insertions, 8 deletions
diff --git a/contrib/btree_gist/btree_ts.c b/contrib/btree_gist/btree_ts.c
index b9c2b49ef3c..d472d494c9c 100644
--- a/contrib/btree_gist/btree_ts.c
+++ b/contrib/btree_gist/btree_ts.c
@@ -153,7 +153,7 @@ ts_dist(PG_FUNCTION_ARGS)
p->day = INT_MAX;
p->month = INT_MAX;
#ifdef HAVE_INT64_TIMESTAMP
- p->time = INT64CONST(0x7FFFFFFFFFFFFFFF);
+ p->time = INT64_MAX;
#else
p->time = DBL_MAX;
#endif
@@ -181,7 +181,7 @@ tstz_dist(PG_FUNCTION_ARGS)
p->day = INT_MAX;
p->month = INT_MAX;
#ifdef HAVE_INT64_TIMESTAMP
- p->time = INT64CONST(0x7FFFFFFFFFFFFFFF);
+ p->time = INT64_MAX;
#else
p->time = DBL_MAX;
#endif
diff --git a/contrib/intarray/_int_gist.c b/contrib/intarray/_int_gist.c
index 876a7b9a8ab..07108eb15eb 100644
--- a/contrib/intarray/_int_gist.c
+++ b/contrib/intarray/_int_gist.c
@@ -3,6 +3,8 @@
*/
#include "postgres.h"
+#include <limits.h>
+
#include "access/gist.h"
#include "access/skey.h"
@@ -191,7 +193,7 @@ g_int_compress(PG_FUNCTION_ARGS)
cand = 1;
while (len > MAXNUMRANGE * 2)
{
- min = 0x7fffffff;
+ min = INT_MAX;
for (i = 2; i < len; i += 2)
if (min > (dr[i] - dr[i - 1]))
{
diff --git a/contrib/pgbench/pgbench.c b/contrib/pgbench/pgbench.c
index 706fdf5b197..822adfd5817 100644
--- a/contrib/pgbench/pgbench.c
+++ b/contrib/pgbench/pgbench.c
@@ -49,10 +49,6 @@
#include <sys/resource.h> /* for getrlimit */
#endif
-#ifndef INT64_MAX
-#define INT64_MAX INT64CONST(0x7FFFFFFFFFFFFFFF)
-#endif
-
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif
@@ -453,7 +449,7 @@ strtoint64(const char *str)
*/
if (strncmp(ptr, "9223372036854775808", 19) == 0)
{
- result = -INT64CONST(0x7fffffffffffffff) - 1;
+ result = INT64_MIN;
ptr += 19;
goto gotdigits;
}