pspp.git - GNU PSPP

index : pspp.git
GNU PSPP
summary refs log tree commit diff
path: root/src/libpspp/ext-array.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libpspp/ext-array.c')
-rw-r--r--src/libpspp/ext-array.c 12
1 files changed, 11 insertions, 1 deletions
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.39.1) at 2025年09月07日 16:40:07 +0000

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