+2018-05-12 Bruno Haible <bruno@clisp.org>
+
+ fseeko: On mingw, don't use the hidden function _fseeki64.
+ Reported by Eli Zaretskii <eliz@gnu.org>.
+ * m4/fseeko.m4 (gl_PREREQ_FSEEKO): Test whether _fseeki64 is declared.
+ * lib/fseeko.c (fseeko): Use _fseeki64 only if it is declared.
+
2018-05-12 Bruno Haible <bruno@clisp.org>
glob: Choose 'dirent_type' in a way that works better on mingw.
#endif
#if _GL_WINDOWS_64_BIT_OFF_T
# undef fseeko
-# if HAVE__FSEEKI64 /* msvc, mingw64 */
+# if HAVE__FSEEKI64 && HAVE_DECL__FSEEKI64 /* msvc, mingw since msvcrt8.0, mingw64 */
# define fseeko _fseeki64
-# else /* mingw */
+# else /* mingw before msvcrt8.0 */
# define fseeko fseeko64
# endif
#endif
-# fseeko.m4 serial 18
+# fseeko.m4 serial 19
dnl Copyright (C) 2007-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
# Prerequisites of lib/fseeko.c.
AC_DEFUN([gl_PREREQ_FSEEKO],
[
- dnl Native Windows has the function _fseeki64. mingw hides it, but mingw64
- dnl makes it usable again.
+ dnl Native Windows has the function _fseeki64. mingw hides it in some
+ dnl circumstances, but mingw64 makes it usable again.
AC_CHECK_FUNCS([_fseeki64])
+ if test $ac_cv_func__fseeki64 = yes; then
+ AC_CHECK_DECLS([_fseeki64])
+ fi
])