Commit b4a5fa45 authored by Bruce Momjian's avatar Bruce Momjian

Remove MAX/MIN() macros, use c.h Max/Min() instead.

parent d622cf86
......@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.72 2001/11/29 21:02:41 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.73 2002/02/18 14:24:34 momjian Exp $
*
*-------------------------------------------------------------------------
*/
......@@ -46,13 +46,6 @@
* Local definitions
* ----------
*/
#ifndef MIN
#define MIN(a,b) (((a)<(b)) ? (a) : (b))
#endif
#ifndef MAX
#define MAX(a,b) (((a)>(b)) ? (a) : (b))
#endif
#define ASSGN "="
#define RETURN_NULL(type) do { *isNull = true; return (type) 0; } while (0)
......@@ -1222,8 +1215,8 @@ array_set_slice(ArrayType *array,
*/
int oldlb = ARR_LBOUND(array)[0];
int oldub = oldlb + ARR_DIMS(array)[0] - 1;
int slicelb = MAX(oldlb, lowerIndx[0]);
int sliceub = MIN(oldub, upperIndx[0]);
int slicelb = Max(oldlb, lowerIndx[0]);
int sliceub = Min(oldub, upperIndx[0]);
char *oldarraydata = ARR_DATA_PTR(array);
lenbefore = array_nelems_size(oldarraydata,
......
/* -----------------------------------------------------------------------
* formatting.c
*
* $Header: /cvsroot/pgsql/src/backend/utils/adt/formatting.c,v 1.49 2002/01/04 15:49:42 thomas Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/formatting.c,v 1.50 2002/02/18 14:24:35 momjian Exp $
*
*
* Portions Copyright (c) 1999-2000, PostgreSQL Global Development Group
......@@ -434,17 +434,6 @@ typedef struct TmToChar
tmtcTzn(_X) = NULL; \
} while(0)
/* ----------
* Utils
* ----------
*/
#ifndef MIN
#define MIN(a,b) (((a)<(b)) ? (a) : (b))
#endif
#ifndef MAX
#define MAX(a,b) (((a)>(b)) ? (a) : (b))
#endif
/*****************************************************************************
* KeyWords definition & action
*****************************************************************************/
......@@ -4333,7 +4322,7 @@ numeric_to_number(PG_FUNCTION_ARGS)
VARSIZE(value) - VARHDRSZ, 0, FROM_CHAR);
scale = Num.post;
precision = MAX(0, Num.pre) + scale;
precision = Max(0, Num.pre) + scale;
if (flag)
pfree(format);
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment