pspp.git - GNU PSPP

index : pspp.git
GNU PSPP
summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat
-rw-r--r--configure.ac 2
-rw-r--r--src/libpspp/ext-array.c 12
2 files changed, 12 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 40c972d88..74224b7d2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -293,7 +293,7 @@ AC_C_INLINE
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
diff --git a/src/libpspp/ext-array.c b/src/libpspp/ext-array.c
index c03d0c23c..bb8b91ea2 100644
--- a/src/libpspp/ext-array.c
+++ b/src/libpspp/ext-array.c
@@ -36,6 +36,16 @@
#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 */
@@ -97,7 +107,7 @@ do_seek (const struct ext_array *ea_, off_t offset, enum op op)
{
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;
generated by cgit v1.2.3 (git 2.25.1) at 2025年09月06日 15:35:32 +0000

AltStyle によって変換されたページ (->オリジナル) /