[GRASS-dev] winGRASS not built/broken

Markus Metz markus.metz.giswork at gmail.com
Thu Nov 16 07:28:51 PST 2017


On Thu, Nov 16, 2017 at 10:03 AM, Markus Metz <markus.metz.giswork at gmail.com>
wrote:
>
>
>
> On Tue, Nov 14, 2017 at 9:54 PM, Markus Metz <
markus.metz.giswork at gmail.com> wrote:
> >
> >
> >
> > On Tue, Nov 14, 2017 at 9:30 PM, Markus Metz <
markus.metz.giswork at gmail.com> wrote:
> > >
> > >
> > >
> > > On Tue, Nov 14, 2017 at 9:27 PM, Markus Metz <
markus.metz.giswork at gmail.com> wrote:
> > > >
> > > >
> > > >
> > > > On Tue, Nov 14, 2017 at 8:26 PM, Even Rouault <
even.rouault at 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.rouault at 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).
> > >
> > > Wow, I see you have done that already!
> >
> > If long long is available with all Visual Studio versions supported by
GDAL, you could simplify
> >
> > #if defined(WIN32) || defined(HAVE_LONG_LONG)
> >
> > to
> >
> > #if defined(HAVE_LONG_LONG)
>
> Thanks for fixing this in gdal-trunk!
>
> However, there is still a small issue with the test for GIntBig in
port/cpl_port.h:L226
>
> #if HAVE_LONG_LONG
>
> In cpl_config.h, HAVE_LONG_LONG is either defined and set to 1, or it is
not defined. Therefore L226 should be
>
> #if defined(HAVE_LONG_LONG)
>
> or to be really sure that you have long long
>
> #if defined(HAVE_LONG_LONG) && HAVE_LONG_LONG
>
> but IMHO it is wrong to assume that HAVE_LONG_LONG is always defined and
either zero or non-zero.

Please ignore the above comment

#if HAVE_LONG_LONG

works just fine

Markus M
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20171116/6b1e2211/attachment-0001.html>


More information about the grass-dev mailing list