[GRASS-dev] winGRASS not built/broken

Markus Metz markus.metz.giswork at gmail.com
Sat Nov 11 15:07:49 PST 2017


On Sat, Nov 11, 2017 at 7:45 PM, Even Rouault <even.rouault at spatialys.com>
wrote:
>
>
>
> > 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.

Stupid question: such a #define has only effect on compile time. If GDAL
has been compiled without HAVE_LONG_LONG being defined, and then we define
HAVE_LONG_LONG when compiling against GDAL, is this creating a big mess?
GRASS might then use a different GIntBig than GDAL.

Markus M

>
> 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/20171112/469a383a/attachment.html>


More information about the grass-dev mailing list