From 34c8e07900277a88659d600e036ebfbad8e210e2 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Fri, 3 Apr 2009 10:35:43 -0500 Subject: [PATCH 1/2] make FSEEK macro for using _fseeki64 instead of fseeko on windows --- vm/io.c | 2 +- vm/os-genunix.h | 1 + vm/os-windows.h | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/vm/io.c b/vm/io.c index 950b1ed080..d88f1bab50 100755 --- a/vm/io.c +++ b/vm/io.c @@ -179,7 +179,7 @@ void primitive_fseek(void) break; } - if(fseeko(file,offset,whence) == -1) + if(FSEEK(file,offset,whence) == -1) { io_error(); diff --git a/vm/os-genunix.h b/vm/os-genunix.h index 7afc68998d..9a00758c8a 100644 --- a/vm/os-genunix.h +++ b/vm/os-genunix.h @@ -1,5 +1,6 @@ #define DLLEXPORT #define NULL_DLL NULL +#define FSEEK fseeko void c_to_factor_toplevel(CELL quot); void init_signals(void); diff --git a/vm/os-windows.h b/vm/os-windows.h index 0704459dd0..f47ca951ee 100755 --- a/vm/os-windows.h +++ b/vm/os-windows.h @@ -20,6 +20,7 @@ typedef wchar_t F_CHAR; #define STRNCMP wcsncmp #define STRDUP _wcsdup #define MIN(a,b) ((a)>(b)?(b):(a)) +#define FSEEK _fseeki64 #ifdef WIN64 #define CELL_FORMAT "%Iu" From 4f3e8be3f6a3ad28e602fcd9ebf152abf80a2f05 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Fri, 3 Apr 2009 12:26:04 -0500 Subject: [PATCH 2/2] move FSEEK definition from os-genuinx.h to os-unix.h --- vm/os-genunix.h | 1 - vm/os-unix.h | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/vm/os-genunix.h b/vm/os-genunix.h index 9a00758c8a..7afc68998d 100644 --- a/vm/os-genunix.h +++ b/vm/os-genunix.h @@ -1,6 +1,5 @@ #define DLLEXPORT #define NULL_DLL NULL -#define FSEEK fseeko void c_to_factor_toplevel(CELL quot); void init_signals(void); diff --git a/vm/os-unix.h b/vm/os-unix.h index d2f34b4bc4..35abfee41c 100755 --- a/vm/os-unix.h +++ b/vm/os-unix.h @@ -23,6 +23,8 @@ typedef char F_SYMBOL; #define STRNCMP strncmp #define STRDUP strdup +#define FSEEK fseeko + #define FIXNUM_FORMAT "%ld" #define CELL_FORMAT "%lu" #define CELL_HEX_FORMAT "%lx"