On Tue, Nov 14, 2017 at 8:26 PM, Even Rouault <even.roua...@spatialys.com>
wrote:
>
> On mardi 14 novembre 2017 19:56:25 CET Markus Metz wrote:
>
> > On Tue, Nov 14, 2017 at 3:13 PM, Even Rouault <
even.roua...@spatialys.com>
>
> >
>
> > wrote:
>
> > > > -->
>
> > > >
>
> > > > Index: port/cpl_port.h
>
> > > >
>
> > > > ===================================================================
>
> > > >
>
> > > > --- port/cpl_port.h (revision 40701)
>
> > > >
>
> > > > +++ port/cpl_port.h (working copy)
>
> > > >
>
> > > > @@ -219,7 +219,7 @@
>
> > > >
>
> > > > /* 64bit support */
>
> > > >
>
> > > > /*
--------------------------------------------------------------------
>
> >
>
> > */
>
> >
>
> > > > -#if defined(WIN32) && defined(_MSC_VER)
>
> > > >
>
> > > > +#if defined(WIN32) && (defined(_MSC_VER) || defined(__MINGW32__))
>
> > > >
>
> > > >
>
> > > >
>
> > > > #define VSI_LARGE_API_SUPPORTED
>
> > > >
>
> > > > typedef __int64 GIntBig;
>
> > > >
>
> > > > <--
>
> > > >
>
> > > >
>
> > > >
>
> > > > to account for different compile environments on Windows that have
>
> >
>
> > __int64
>
> >
>
> > > Didn't know that mingw had __int64 as wel.
>
> >
>
> > According to the documentation, yes. I tested, and __int64 is indeed
>
> > available with MinGW.
>
> >
>
> > > Could you submit that as a pull request against
>
> >
>
> > https://github.com/OSGeo/gdal so we can check that this doesn't break
our 2
>
> > mingw targets at
>
> >
>
> > > https://travis-ci.org/OSGeo/gdal ?
>
> >
>
> > Done:
>
> > https://github.com/OSGeo/gdal/pull/262
>
> >
>
> > Regarding integer types with MSC: why is HAVE_LONG_LONG not defined in
>
> > cpl_config.h for WIN32? There is a long long in WIN32 (equivalent to
>
> > __int64).
>
>
>
> I guess this dates back to ancient times, like Visual Studio C++ 6.0,
where long long wasn't available, but we no longer support that compiler.
Apparently long long is available since VS 2005
>
>
>
> I'm probably going to simplify things and have one single case for #if
defined(WIN32) || defined(HAVE_LONG_LONG)

Just to be save, for this, and if compiling with MS Visual Studio, I guess
you need to modify port/cpl_config.h.vc to be aware of HAVE_LONG_LONG in
order to create a compatible port/cpl_config.h (compatible if GDAL has been
compiled with Visual Studio and another package is compiled with MinGW).

Markus M
_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

Reply via email to