[GRASS-SVN] r39418 - grass/trunk/lib/vector/Vlib

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Oct 5 17:48:28 EDT 2009


Author: neteler
Date: 2009-10-05 17:48:28 -0400 (Mon, 05 Oct 2009)
New Revision: 39418

Modified:
   grass/trunk/lib/vector/Vlib/field.c
Log:
avoid compilation error if OGR absent

Modified: grass/trunk/lib/vector/Vlib/field.c
===================================================================
--- grass/trunk/lib/vector/Vlib/field.c	2009-10-05 21:46:25 UTC (rev 39417)
+++ grass/trunk/lib/vector/Vlib/field.c	2009-10-05 21:48:28 UTC (rev 39418)
@@ -32,6 +32,10 @@
 #include <gdal_version.h>	/* needed for FID detection */
 #endif	/* HAVE_GDAL */
 
+#ifdef HAVE_OGR
+#include <ogr_api.h>
+#endif
+
 /*!
   \brief Create and init new dblinks structure
   
@@ -476,7 +480,7 @@
 	G_fatal_error(_("The support for OGR vector maps wasn't"
 			" compiled in"));
 #else
-#if GDAL_VERSION_NUM > 1320	/* seems to be fixed after 1320 release */
+#if GDAL_VERSION_NUM > 1320 && HAVE_OGR /* seems to be fixed after 1320 release */
 	int layer, nLayers;
 	OGRDataSourceH Ogr_ds;
 	OGRLayerH Ogr_layer = NULL;
@@ -628,7 +632,7 @@
 		}
 	    }
 	}
-#endif /* GDAL_VERSION_NUM > 1320 */
+#endif /* GDAL_VERSION_NUM > 1320 && HAVE_OGR */
 	return (1);
 #endif	/* HAVE_GDAL */
     }



More information about the grass-commit mailing list