[mapserver-commits] r9998 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Wed Mar 24 11:08:19 EDT 2010


Author: warmerdam
Date: 2010-03-24 11:08:16 -0400 (Wed, 24 Mar 2010)
New Revision: 9998

Modified:
   trunk/mapserver/mapraster.c
   trunk/mapserver/mapstring.c
Log:
mapraster.c: fix build problem when GDAL not available (#3400).
mapstring.c: Make sure errno.h is included for errno stuff.


Modified: trunk/mapserver/mapraster.c
===================================================================
--- trunk/mapserver/mapraster.c	2010-03-23 00:37:49 UTC (rev 9997)
+++ trunk/mapserver/mapraster.c	2010-03-24 15:08:16 UTC (rev 9998)
@@ -323,6 +323,18 @@
 int msDrawRasterLayerLow(mapObj *map, layerObj *layer, imageObj *image,
                          rasterBufferObj *rb ) 
 {
+/* -------------------------------------------------------------------- */
+/*      As of MapServer 6.0 GDAL is required for rendering raster       */
+/*      imagery.                                                        */
+/* -------------------------------------------------------------------- */
+#if !defined(USE_GDAL)
+  msSetError(MS_MISCERR, 
+             "Attempt to render a RASTER (or WMS) layer but without\n"
+             "GDAL support enabled.  Raster rendering requires GDAL.",
+             "msDrawRasterLayerLow()" );
+  return MS_FAILURE;
+
+#else /* defined(USE_GDAL) */
   int status, i, done;
   char *filename=NULL, tilename[MS_MAXPATHLEN];
 
@@ -341,19 +353,6 @@
   double	adfGeoTransform[6];
   const char *close_connection;
 
-/* -------------------------------------------------------------------- */
-/*      As of MapServer 6.0 GDAL is required for rendering raster       */
-/*      imagery.                                                        */
-/* -------------------------------------------------------------------- */
-#if !defined(USE_GDAL)
-  msSetError(MS_MISCERR, 
-             "Attempt to render a RASTER (or WMS) layer but without\n"
-             "GDAL support enabled.  Raster rendering requires GDAL.",
-             "msDrawRasterLayerLow()" );
-  return MS_FAILURE;
-
-#else /* defined(USE_GDAL) */
-
   msGDALInitialize();
 
   if(layer->debug > 0 || map->debug > 1)

Modified: trunk/mapserver/mapstring.c
===================================================================
--- trunk/mapserver/mapstring.c	2010-03-23 00:37:49 UTC (rev 9997)
+++ trunk/mapserver/mapstring.c	2010-03-24 15:08:16 UTC (rev 9998)
@@ -37,6 +37,7 @@
 
 #include <ctype.h>
 #include <string.h>
+#include <errno.h>
 
 /*
  * Find the first occurrence of find in s, ignore case.



More information about the mapserver-commits mailing list