cvs: php4 /ext/gd/libgd gd.c
| From: | Marcus B�rger | Date: | Mon, 12 Aug 2002 19:09:26 +0000 |
| Subject: | cvs: php4 /ext/gd/libgd gd.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-13284@lists.php.net to get a copy of this message | ||
helly Mon Aug 12 15:09:26 2002 EDT
Modified files:
/php4/ext/gd/libgd gd.c
Log:
-wrong fabsf define for MSVC.6
-MIN and MAX only if undefined
#should be last commit to fix all warnings (-:
Index: php4/ext/gd/libgd/gd.c
diff -u php4/ext/gd/libgd/gd.c:1.12 php4/ext/gd/libgd/gd.c:1.13
--- php4/ext/gd/libgd/gd.c:1.12 Mon Aug 12 11:29:05 2002
+++ php4/ext/gd/libgd/gd.c Mon Aug 12 15:09:26 2002
@@ -26,7 +26,7 @@
#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 @@
#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)))