[GRASS-dev] winGRASS not built/broken

Even Rouault even.rouault at spatialys.com
Sat Nov 11 10:45:53 PST 2017


> If GDALSetCacheMax64 must evaluate to GDALSetCacheMax64 ( int ), 

My hypothesis might be wrong, but if it is true, then it *wrongly* evaluates to 
GDALSetCacheMax64 ( int ) when currently called by GRASS. If you define 
HAVE_LONG_LONG before including cpl_port.h or any other GDAL include files, that should 
work fine.
Similar issue, or more subtle ones, could also arise with other GDAL/OGR functions that use 
GIntBig (*). I guess the issue is only detected with GDALSetCacheMax64 since it uses 
CPL_STDCALL convention which apparently embeds the argument size in the symbol name, 
whereas C decl doesn't do it.

I'm not sure why this would only occur with 32 bit builds, though. But this situation of using 
cpl_config.h generated for MSVC is kind of dangerous

Even

(*)

$ grep GIntBig ogr/ogr_api*.h
GIntBig CPL_DLL OGR_F_GetFieldAsInteger64( OGRFeatureH, int );
const GIntBig CPL_DLL *OGR_F_GetFieldAsInteger64List( OGRFeatureH, int, int * );
void   CPL_DLL OGR_F_SetFieldInteger64( OGRFeatureH, int, GIntBig );
void   CPL_DLL OGR_F_SetFieldInteger64List( OGRFeatureH, int, int, const GIntBig * );
GIntBig CPL_DLL OGR_F_GetFID( OGRFeatureH );
OGRErr CPL_DLL OGR_F_SetFID( OGRFeatureH, GIntBig );
OGRErr CPL_DLL OGR_L_SetNextByIndex( OGRLayerH, GIntBig );
OGRFeatureH CPL_DLL OGR_L_GetFeature( OGRLayerH, GIntBig )  
CPL_WARN_UNUSED_RESULT;
OGRErr CPL_DLL OGR_L_DeleteFeature( OGRLayerH, GIntBig ) CPL_WARN_UNUSED_RESULT;
GIntBig CPL_DLL OGR_L_GetFeatureCount( OGRLayerH, int );
GIntBig CPL_DLL OGR_L_GetFeaturesRead( OGRLayerH );



-- 
Spatialys - Geospatial professional services
http://www.spatialys.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20171111/da77e7ab/attachment-0001.html>


More information about the grass-dev mailing list