From 75460b0ce5d7b23699799bd11b3bb6a516cb4f8e Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 1 Nov 2002 20:37:10 +0000 Subject: [PATCH] put MIN/MAX under ifndef MAX/MIN Originally committed as revision 1138 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/common.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/libavcodec/common.h b/libavcodec/common.h index ce26697816..1f9f8a2d57 100644 --- a/libavcodec/common.h +++ b/libavcodec/common.h @@ -162,8 +162,14 @@ inline void dprintf(const char* fmt,...) {} /* assume b>0 */ #define ROUNDED_DIV(a,b) (((a)>0 ? (a) + ((b)>>1) : (a) - ((b)>>1))/(b)) #define ABS(a) ((a) >= 0 ? (a) : (-(a))) -#define MAX(a,b) ((a) > (b) ? (a) : (b)) -#define MIN(a,b) ((a) > (b) ? (b) : (a)) + +#ifndef MAX +# define MAX(a,b) ((a) > (b) ? (a) : (b)) +#endif + +#ifndef MIN +# define MIN(a,b) ((a) > (b) ? (b) : (a)) +#endif #ifdef ARCH_X86 // avoid +32 for shift optimization (gcc should do that ...)