[mapserver-commits] r11582 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Fri Apr 15 05:55:46 EDT 2011


Author: tbonfort
Date: 2011-04-15 02:55:46 -0700 (Fri, 15 Apr 2011)
New Revision: 11582

Modified:
   trunk/mapserver/HISTORY.TXT
   trunk/mapserver/mapcluster.c
   trunk/mapserver/mapows.c
   trunk/mapserver/mapserver.h
   trunk/mapserver/mapunion.c
Log:
define EQUAL/EQUALN macros if cpl_port.h was not included (#3844)

Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT	2011-04-14 19:51:03 UTC (rev 11581)
+++ trunk/mapserver/HISTORY.TXT	2011-04-15 09:55:46 UTC (rev 11582)
@@ -20,6 +20,8 @@
 Version 6.0.0-beta6 (2011-04-13)
 --------------------------------
 
+- define EQUAL/EQUALN macros if cpl_port.h was not included (#3844)
+
 - add configurable PNG/ZLIB compression level (#3841)
 
 - SLD: use pixmap size when parameter size is not specified (#2305)

Modified: trunk/mapserver/mapcluster.c
===================================================================
--- trunk/mapserver/mapcluster.c	2011-04-14 19:51:03 UTC (rev 11581)
+++ trunk/mapserver/mapcluster.c	2011-04-15 09:55:46 UTC (rev 11582)
@@ -35,14 +35,7 @@
 
 MS_CVSID("$Id$")
 
-#ifndef EQUAL
-#define EQUAL(a,b) (strcasecmp(a, b) == 0)
-#endif
 
-#ifndef EQUALN
-#define EQUALN(a,b,n) (strncasecmp(a, b,n) == 0)
-#endif
-
 #ifdef USE_CLUSTER_PLUGIN
 #define USE_CLUSTER_EXTERNAL
 #endif

Modified: trunk/mapserver/mapows.c
===================================================================
--- trunk/mapserver/mapows.c	2011-04-14 19:51:03 UTC (rev 11581)
+++ trunk/mapserver/mapows.c	2011-04-15 09:55:46 UTC (rev 11582)
@@ -37,10 +37,6 @@
 
 MS_CVSID("$Id$")
 
-#ifndef EQUALN
-#define EQUALN(a,b,n) (strncasecmp(a, b,n) == 0)
-#endif
-
 /*
 ** msOWSDispatch() is the entry point for any OWS request (WMS, WFS, ...)
 ** - If this is a valid request then it is processed and MS_SUCCESS is returned

Modified: trunk/mapserver/mapserver.h
===================================================================
--- trunk/mapserver/mapserver.h	2011-04-14 19:51:03 UTC (rev 11581)
+++ trunk/mapserver/mapserver.h	2011-04-15 09:55:46 UTC (rev 11582)
@@ -155,7 +155,25 @@
 #include "ogr_api.h"
 #endif
 
+/* EQUAL and EQUALN are defined in cpl_port.h, so add them in here if ogr was not included */
 
+#ifndef EQUAL
+#if defined(WIN32) || defined(WIN32CE)
+#  define EQUAL(a,b)              (stricmp(a,b)==0)
+#else
+#  define EQUAL(a,b)              (strcasecmp(a,b)==0)
+#endif
+#endif
+
+#ifndef EQUALN
+#if defined(WIN32) || defined(WIN32CE)
+#  define EQUALN(a,b,n)           (strnicmp(a,b,n)==0)
+#else
+#  define EQUALN(a,b,n)           (strncasecmp(a,b,n)==0)
+#endif
+#endif
+
+
 #if defined(_WIN32) && !defined(__CYGWIN__)
 #define snprintf _snprintf
 #endif

Modified: trunk/mapserver/mapunion.c
===================================================================
--- trunk/mapserver/mapunion.c	2011-04-14 19:51:03 UTC (rev 11581)
+++ trunk/mapserver/mapunion.c	2011-04-15 09:55:46 UTC (rev 11582)
@@ -33,10 +33,6 @@
 #include <assert.h>
 #include "mapserver.h"
 
-#ifndef EQUAL
-#define EQUAL(a,b) (strcasecmp(a, b) == 0)
-#endif
-
 MS_CVSID("$Id$")
 
 #define MSUNION_NUMITEMS        2



More information about the mapserver-commits mailing list