From ac9991a24589dacf8bb671274c9b39608fb503d3 Mon Sep 17 00:00:00 2001 From: Marcus Boerger Date: Mon, 12 Aug 2002 19:09:26 +0000 Subject: [PATCH] -wrong fabsf define for MSVC.6 -MIN and MAX only if undefined #should be last commit to fix all warnings (-: --- ext/gd/libgd/gd.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ext/gd/libgd/gd.c b/ext/gd/libgd/gd.c index a06a4549b4..364b39e6ab 100644 --- a/ext/gd/libgd/gd.c +++ b/ext/gd/libgd/gd.c @@ -26,7 +26,7 @@ extern float floorf(float x); #endif #if HAVE_FABSF == 0 /* float fabsf(float x); */ -# define fabsf(x) ((float)(abs(x))) +# define fabsf(x) ((float)(fabs(x))) #endif #if HAVE_FLOORF == 0 /* float floorf(float x);*/ @@ -235,9 +235,13 @@ gdImageColorClosestAlpha (gdImagePtr im, int r, int g, int b, int a) #define HWB_UNDEFINED -1 #define SETUP_RGB(s, r, g, b) {s.R = r/255.0f; s.G = g/255.0f; s.B = b/255.0f;} +#ifndef MIN #define MIN(a,b) ((a)<(b)?(a):(b)) +#endif #define MIN3(a,b,c) ((a)<(b)?(MIN(a,c)):(MIN(b,c))) +#ifndef MAX #define MAX(a,b) ((a)<(b)?(b):(a)) +#endif #define MAX3(a,b,c) ((a)<(b)?(MAX(b,c)):(MAX(a,c))) -- 2.50.1