[GRASS-dev] winGRASS not built/broken

Markus Metz markus.metz.giswork at gmail.com
Tue Nov 14 06:05:03 PST 2017


On Mon, Nov 13, 2017 at 10:30 PM, Markus Metz <markus.metz.giswork at gmail.com>
wrote:
>
>
>
> On Sun, Nov 12, 2017 at 12:13 AM, Even Rouault <even.rouault at spatialys.com>
wrote:
> >
> > On dimanche 12 novembre 2017 00:07:49 CET Markus Metz wrote:
> >
> > > 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?
> >
> >
> >
> > With MSVC, GIntBig expands to __int64 , which is equivalent in practice
to long long.
>
> MinGW also has __int64, therefore it would be great if you could apply
>
> -->
> 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(_WIN32)
>
>  #define VSI_LARGE_API_SUPPORTED
>  typedef __int64          GIntBig;
> <--
>
> to gdal-trunk

wrong patch, it should rather be

-->
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

Markus M

>
> Apart from that, GDALSetCacheMax[64](bytes) could be replaced with
CPLSetConfigOption( "GDAL_CACHEMAX", "MB" ), that should avoid the issues
with GIntBig on MS Windows.
>
> Markus M
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20171114/74f82e55/attachment.html>


More information about the grass-dev mailing list