AC_C_BIGENDIAN
-AC_CHECK_FUNCS([__setfpucw fork execl isinf isnan finite getpid feholdexcept fpsetmask popen round])
+AC_CHECK_FUNCS([__setfpucw fork execl isinf isnan finite getpid feholdexcept fpsetmask popen round fseeko64])
AC_PROG_LN_S
#include "gettext.h"
#define _(msgid) gettext (msgid)
+/* fseeko() doesn't work properly on Mingw despite Gnulib, but fseeko64() does,
+ according to Egbert van der Es:
+
+ https://lists.gnu.org/archive/html/bug-gnu-pspp/2025-05/msg00007.html
+ https://lists.gnu.org/archive/html/bug-gnu-pspp/2025-06/msg00001.html
+ https://lists.gnu.org/archive/html/bug-gnu-pspp/2025-06/msg00002.html */
+#if !HAVE_FSEEKO64
+#define fseeko64 fseeko
+#endif
+
enum op
{
OP_WRITE, /* writing */
{
if (ea->position == offset && ea->op == op)
return true;
- else if (fseeko (ea->file, offset, SEEK_SET) == 0)
+ else if (fseeko64 (ea->file, offset, SEEK_SET) == 0)
{
ea->position = offset;
return true;