<div dir="ltr"><div><div><br><br>On Tue, Nov 14, 2017 at 8:26 PM, Even Rouault <<a href="mailto:even.rouault@spatialys.com">even.rouault@spatialys.com</a>> wrote:<br>><br>> On mardi 14 novembre 2017 19:56:25 CET Markus Metz wrote:<br>><br>> > On Tue, Nov 14, 2017 at 3:13 PM, Even Rouault <<a href="mailto:even.rouault@spatialys.com">even.rouault@spatialys.com</a>><br>><br>> ><br>><br>> > wrote:<br>><br>> > > > --><br>><br>> > > ><br>><br>> > > > Index: port/cpl_port.h<br>><br>> > > ><br>><br>> > > > ===================================================================<br>><br>> > > ><br>><br>> > > > --- port/cpl_port.h (revision 40701)<br>><br>> > > ><br>><br>> > > > +++ port/cpl_port.h (working copy)<br>><br>> > > ><br>><br>> > > > @@ -219,7 +219,7 @@<br>><br>> > > ><br>><br>> > > > /* 64bit support */<br>><br>> > > ><br>><br>> > > > /* --------------------------------------------------------------------<br>><br>> ><br>><br>> > */<br>><br>> ><br>><br>> > > > -#if defined(WIN32) && defined(_MSC_VER)<br>><br>> > > ><br>><br>> > > > +#if defined(WIN32) && (defined(_MSC_VER) || defined(__MINGW32__))<br>><br>> > > ><br>><br>> > > ><br>><br>> > > ><br>><br>> > > > #define VSI_LARGE_API_SUPPORTED<br>><br>> > > ><br>><br>> > > > typedef __int64 GIntBig;<br>><br>> > > ><br>><br>> > > > <--<br>><br>> > > ><br>><br>> > > ><br>><br>> > > ><br>><br>> > > > to account for different compile environments on Windows that have<br>><br>> ><br>><br>> > __int64<br>><br>> ><br>><br>> > > Didn't know that mingw had __int64 as wel.<br>><br>> ><br>><br>> > According to the documentation, yes. I tested, and __int64 is indeed<br>><br>> > available with MinGW.<br>><br>> ><br>><br>> > > Could you submit that as a pull request against<br>><br>> ><br>><br>> > <a href="https://github.com/OSGeo/gdal">https://github.com/OSGeo/gdal</a> so we can check that this doesn't break our 2<br>><br>> > mingw targets at<br>><br>> ><br>><br>> > > <a href="https://travis-ci.org/OSGeo/gdal">https://travis-ci.org/OSGeo/gdal</a> ?<br>><br>> ><br>><br>> > Done:<br>><br>> > <a href="https://github.com/OSGeo/gdal/pull/262">https://github.com/OSGeo/gdal/pull/262</a><br>><br>> ><br>><br>> > Regarding integer types with MSC: why is HAVE_LONG_LONG not defined in<br>><br>> > cpl_config.h for WIN32? There is a long long in WIN32 (equivalent to<br>><br>> > __int64).<br>><br>>  <br>><br>> 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<br>><br>>  <br>><br>> I'm probably going to simplify things and have one single case for #if defined(WIN32) || defined(HAVE_LONG_LONG)<br><br></div>Just to be save, for this, and if compiling with MS Visual Studio, I guess you need to modify port/<a href="http://cpl_config.h.vc">cpl_config.h.vc</a> 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).<br><br></div>Markus M<br><div><div><br></div></div></div>