diff options
Diffstat (limited to 'contrib/intarray')
-rw-r--r-- | contrib/intarray/_int.h | 4 | ||||
-rw-r--r-- | contrib/intarray/_int_gist.c | 2 | ||||
-rw-r--r-- | contrib/intarray/_int_tool.c | 2 | ||||
-rw-r--r-- | contrib/intarray/_intbig_gist.c | 2 |
4 files changed, 3 insertions, 7 deletions
diff --git a/contrib/intarray/_int.h b/contrib/intarray/_int.h index 3e702ca1afe..2231bdb095b 100644 --- a/contrib/intarray/_int.h +++ b/contrib/intarray/_int.h @@ -14,10 +14,6 @@ /* number ranges for compression */ #define MAXNUMRANGE 100 -#define max(a,b) ((a) > (b) ? (a) : (b)) -#define min(a,b) ((a) <= (b) ? (a) : (b)) -#define abs(a) ((a) < (0) ? -(a) : (a)) - /* dimension of array */ #define NDIM 1 diff --git a/contrib/intarray/_int_gist.c b/contrib/intarray/_int_gist.c index e4b923523b1..2d5e82a4596 100644 --- a/contrib/intarray/_int_gist.c +++ b/contrib/intarray/_int_gist.c @@ -425,7 +425,7 @@ g_int_picksplit(PG_FUNCTION_ARGS) union_d = inner_int_union(datum_r, datum_alpha); rt__int_size(union_d, &size_beta); pfree(union_d); - costvector[i - 1].cost = abs((size_alpha - size_l) - (size_beta - size_r)); + costvector[i - 1].cost = Abs((size_alpha - size_l) - (size_beta - size_r)); } qsort((void *) costvector, maxoff, sizeof(SPLITCOST), comparecost); diff --git a/contrib/intarray/_int_tool.c b/contrib/intarray/_int_tool.c index d5f169f7c82..216a4105c7f 100644 --- a/contrib/intarray/_int_tool.c +++ b/contrib/intarray/_int_tool.c @@ -137,7 +137,7 @@ inner_int_inter(ArrayType *a, ArrayType *b) nb = ARRNELEMS(b); da = ARRPTR(a); db = ARRPTR(b); - r = new_intArrayType(min(na, nb)); + r = new_intArrayType(Min(na, nb)); dr = ARRPTR(r); i = j = 0; diff --git a/contrib/intarray/_intbig_gist.c b/contrib/intarray/_intbig_gist.c index efd70758dc2..07a051dd50c 100644 --- a/contrib/intarray/_intbig_gist.c +++ b/contrib/intarray/_intbig_gist.c @@ -402,7 +402,7 @@ g_intbig_picksplit(PG_FUNCTION_ARGS) _j = GETENTRY(entryvec, j); size_alpha = hemdist(datum_l, _j); size_beta = hemdist(datum_r, _j); - costvector[j - 1].cost = abs(size_alpha - size_beta); + costvector[j - 1].cost = Abs(size_alpha - size_beta); } qsort((void *) costvector, maxoff, sizeof(SPLITCOST), comparecost); |