From 5aba44f5f272b669f6ba2973a88c7dfb5f0fb8d1 Mon Sep 17 00:00:00 2001 From: Ron Koenderink Date: Sun, 1 Jan 2006 16:02:48 +0000 Subject: [PATCH] (min, max) [_WIN32, __GNUC__]: Add min and max macros for mingw/gcc compile environment. min/max are not included in stdlib.h in mingw/gcc environment. --- include/misc.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/misc.h b/include/misc.h index 81da2c55..f238b369 100644 --- a/include/misc.h +++ b/include/misc.h @@ -48,9 +48,11 @@ typedef long ssize_t; /* integral mismatch, due to misuse of sector short */ #ifndef __GNUC__ #pragma warning (disable : 4761 ) +#else +#define max(a,b) ((a)>(b)?(a):(b)) +#define min(a,b) ((a)<(b)?(a):(b)) #endif -#include #include #define random rand