Index: uts/usr/src/uts/common/sys/param.h =================================================================== --- uts.orig/usr/src/uts/common/sys/param.h 2014-03-01 16:18:38.000000000 +0400 +++ uts/usr/src/uts/common/sys/param.h 2014-03-01 23:10:14.997888590 +0400 @@ -195,6 +195,13 @@ #define MAXSYMLINKS 20 #define MAXNAMELEN 256 +#ifndef MIN +#define MIN(a,b) (((a)<(b))?(a):(b)) +#endif +#ifndef MAX +#define MAX(a,b) (((a)>(b))?(a):(b)) +#endif + /* * MAXLINKNAMELEN defines the longest possible permitted datalink name, * including the terminating NUL. Note that this must not be larger Index: uts/usr/src/uts/common/sys/fs/hsfs_rrip.h =================================================================== --- uts.orig/usr/src/uts/common/sys/fs/hsfs_rrip.h 2014-03-01 16:18:37.000000000 +0400 +++ uts/usr/src/uts/common/sys/fs/hsfs_rrip.h 2014-03-01 23:10:15.004395216 +0400 @@ -62,8 +62,9 @@ */ #define MS_NO_RRIP 0x800000 /* if set, don't use Rock Ridge */ - +#ifndef MIN #define MIN(a, b) ((a) < (b) ? (a) : (b)) +#endif /* * Make sure we have this first Index: uts/usr/src/uts/intel/io/mc-amd/mcamd_drv.c =================================================================== --- uts.orig/usr/src/uts/intel/io/mc-amd/mcamd_drv.c 2014-03-01 16:18:39.000000000 +0400 +++ uts/usr/src/uts/intel/io/mc-amd/mcamd_drv.c 2014-03-01 23:10:15.008714353 +0400 @@ -77,8 +77,12 @@ krwlock_t mc_lock; int mc_hold_attached = 1; +#ifndef MAX #define MAX(m, n) ((m) >= (n) ? (m) : (n)) +#endif +#ifndef MIN #define MIN(m, n) ((m) <= (n) ? (m) : (n)) +#endif /* * The following tuneable is used to determine the DRAM scrubbing rate. Index: uts/usr/src/uts/common/io/ral/ral_rate.c =================================================================== --- uts.orig/usr/src/uts/common/io/ral/ral_rate.c 2014-03-01 16:18:32.000000000 +0400 +++ uts/usr/src/uts/common/io/ral/ral_rate.c 2014-03-01 23:10:15.011581762 +0400 @@ -53,7 +53,9 @@ #include "ral_rate.h" +#ifndef MAX #define MAX(a, b) ((a) > (b) ? (a) : (b)) +#endif #ifdef interpolate #undef interpolate Index: uts/usr/src/uts/common/io/ib/adapters/hermon/hermon_stats.c =================================================================== --- uts.orig/usr/src/uts/common/io/ib/adapters/hermon/hermon_stats.c 2014-03-01 16:18:31.000000000 +0400 +++ uts/usr/src/uts/common/io/ib/adapters/hermon/hermon_stats.c 2014-03-01 23:10:15.013397890 +0400 @@ -78,10 +78,9 @@ {"clear_pic", 0, 0} }; -/* - * Return the maximum of (x) and (y) - */ +#ifndef MAX #define MAX(x, y) (((x) > (y)) ? (x) : (y)) +#endif /* * Set (x) to the maximum of (x) and (y) Index: uts/usr/src/uts/common/io/ib/adapters/tavor/tavor_stats.c =================================================================== --- uts.orig/usr/src/uts/common/io/ib/adapters/tavor/tavor_stats.c 2014-03-01 16:18:31.000000000 +0400 +++ uts/usr/src/uts/common/io/ib/adapters/tavor/tavor_stats.c 2014-03-01 23:10:15.015041350 +0400 @@ -94,10 +94,9 @@ {"clear_pic", 0, 0, 0, 0} }; -/* - * Return the maximum of (x) and (y) - */ +#ifndef MAX #define MAX(x, y) (((x) > (y)) ? (x) : (y)) +#endif /* * Set (x) to the maximum of (x) and (y) Index: uts/usr/src/uts/common/io/ppp/spppcomp/zlib.c =================================================================== --- uts.orig/usr/src/uts/common/io/ppp/spppcomp/zlib.c 2014-03-01 16:18:32.000000000 +0400 +++ uts/usr/src/uts/common/io/ppp/spppcomp/zlib.c 2014-03-01 23:10:15.023367717 +0400 @@ -2444,9 +2444,9 @@ } #endif /* DEBUG_ZLIB */ - +#ifndef MAX #define MAX(a, b) (a >= b ? a : b) -/* the arguments must not have side effects */ +#endif /* * =========================================================================== Index: uts/usr/src/uts/intel/io/pci/pci_memlist.c =================================================================== --- uts.orig/usr/src/uts/intel/io/pci/pci_memlist.c 2014-03-01 16:18:39.000000000 +0400 +++ uts/usr/src/uts/intel/io/pci/pci_memlist.c 2014-03-01 23:10:15.025795978 +0400 @@ -144,8 +144,12 @@ * Delete memlist entries, assuming list sorted by address */ +#ifndef MIN #define MIN(a, b) ((a) < (b) ? (a) : (b)) +#endif +#ifndef MAX #define MAX(a, b) ((a) > (b) ? (a) : (b)) +#endif #define IN_RANGE(a, b, e) ((a) >= (b) && (a) <= (e)) int Index: uts/usr/src/uts/common/fs/sockfs/sockcommon_subr.c =================================================================== --- uts.orig/usr/src/uts/common/fs/sockfs/sockcommon_subr.c 2014-03-01 16:18:28.000000000 +0400 +++ uts/usr/src/uts/common/fs/sockfs/sockcommon_subr.c 2014-03-01 23:10:15.029136454 +0400 @@ -424,7 +424,9 @@ } } +#ifndef MIN #define MIN(a, b) ((a) < (b) ? (a) : (b)) +#endif /* Copy userdata into a new mblk_t */ mblk_t * socopyinuio(uio_t *uiop, ssize_t iosize, size_t wroff, ssize_t maxblk, Index: uts/usr/src/uts/common/io/ib/ibnex/ibnex_ioctl.c =================================================================== --- uts.orig/usr/src/uts/common/io/ib/ibnex/ibnex_ioctl.c 2014-03-01 16:18:31.000000000 +0400 +++ uts/usr/src/uts/common/io/ib/ibnex/ibnex_ioctl.c 2014-03-01 23:10:15.033471456 +0400 @@ -40,8 +40,9 @@ #include #include -/* return the minimum value of (x) and (y) */ +#ifndef MIN #define MIN(x, y) ((x) < (y) ? (x) : (y)) +#endif /* * function prototypes