[GRASS-SVN] r66729 - grass/trunk/vector/v.in.ogr
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Nov 3 09:02:31 PST 2015
Author: zarch
Date: 2015-11-03 09:02:31 -0800 (Tue, 03 Nov 2015)
New Revision: 66729
Modified:
grass/trunk/vector/v.in.ogr/main.c
Log:
v.in.ogr: add #ifdefs to fix r66726
Modified: grass/trunk/vector/v.in.ogr/main.c
===================================================================
--- grass/trunk/vector/v.in.ogr/main.c 2015-11-03 16:34:21 UTC (rev 66728)
+++ grass/trunk/vector/v.in.ogr/main.c 2015-11-03 17:02:31 UTC (rev 66729)
@@ -1006,7 +1006,11 @@
/* check if the field is integer */
Ogr_field = OGR_FD_GetFieldDefn(Ogr_featuredefn, key_idx);
Ogr_ftype = OGR_Fld_GetType(Ogr_field);
- if (!(Ogr_ftype == OFTInteger || Ogr_ftype == OFTInteger64)) {
+ if (!(Ogr_ftype == OFTInteger
+#if GDAL_VERSION_NUM >= 2000000
+ || Ogr_ftype == OFTInteger64
+#endif
+ )) {
G_fatal_error(_("Key column '%s' is not integer"), param.key->answer);
}
key_column = G_store(OGR_Fld_GetNameRef(Ogr_field));
@@ -1282,7 +1286,11 @@
}
else {
/* G_warning (_("Column value not set" )); */
- if (Ogr_ftype == OFTInteger || Ogr_ftype == OFTInteger64 ||Ogr_ftype == OFTReal) {
+ if (Ogr_ftype == OFTInteger ||
+#if GDAL_VERSION_NUM >= 2000000
+ Ogr_ftype == OFTInteger64 ||
+#endif
+ Ogr_ftype == OFTReal) {
sprintf(buf, ", NULL");
}
#if GDAL_VERSION_NUM >= 1320
More information about the grass-commit
mailing list