Eli Zaretskii wrote: > While building the latest pretest of wget2 with mingw.org's MinGW, I > saw this warning: > > CC fseeko.lo > fseeko.c: In function 'fseeko': > fseeko.c:37:18: warning: implicit declaration of function '_fseeki64' > [-Wimplicit-function-declaration] > # define fseeko _fseeki64 > ^ > fseeko.c:163:10: note: in expansion of macro 'fseeko' > return fseeko (fp, offset, whence); > > This is because configure-time test for _fseeki64 succeeds, but the > prototype of _fseeki64 is not visible unless the condition > > _WIN32_WINNT >= 0x0600 > > holds
According to https://sourceforge.net/p/mingw/mingw-org-wsl/ci/5.1-trunk/tree/mingwrt/include/stdio.h#l743 the condition should be _WIN32_WINNT >= _WIN32_WINNT_VISTA || __MSVCRT_VERSION__ >= __MSVCR80_DLL I guess... Anyway, the issue is that the "old" mingw defines fseeko64 instead of _fseeki64, and the gnulib code attempts to distinguish the two cases: # if HAVE__FSEEKI64 /* msvc, mingw64 */ # define fseeko _fseeki64 # else /* mingw */ # define fseeko fseeko64 # endif But the distinction between mingw-w64 and mingw.org is broken. Do you know how to distinguish the two, just by preprocessor defines, without any autoconf test? Bruno