[GRASS-dev] diglib test.c fails on 64bit win
markus.metz.giswork at googlemail.com
Tue May 18 08:16:44 EDT 2010
Glynn Clements wrote:
> Markus Metz wrote:
>> In GRASS, config.h does not know about __MINGW32__ even if __MINGW32__
>> is (somewhere else) defined, thus off_t is not redefined for mingw32,
>> and I placed the redefinitions for testing in another header. Looks
>> like a lot of hacking to get LFS for wingrass.
> __MINGW32__ is defined by the compiler.
> But note that the "#ifdef __MINGW32__" block is within a
> "#ifdef USE_LARGEFILES" block, and USE_LARGEFILES isn't defined as a
> preprocessor macro (AC_DEFINE), only as a substitution (AC_SUBST), so
> all of that LFS stuff at the bottom of config.h is ignored.
Interesting. IOW, "#ifdef USE_LARGEFILES" in config.h.in is
(unintentionally?) used to disable all that LFS stuff. That also means
that the IOSTREAM library always uses fseek and never fseeko because
HAVE_LARGEFILES is not defined. IIUC, the largefile test in configure
is passed for MINGW32 because fseeko64 and ftello64 exist,
USE_LARGEFILES is defined, LFS flags are set in Grass.make, but LFS is
not available because these explicit 64bit versions are never
activated. Wouldn't it make more sense to sync configure.in and
config.h.in? I think that LFS in grass also for mingw32 would be
highly appreciated by Windows users.
More information about the grass-dev