From a4d8692c9d23fed82f6f594ead826af83608f1c2 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Fri, 4 Dec 2015 06:01:22 -0800 Subject: Large file support. * stream.h (struct strm_ops): seek operation's second argument is now just a val. * stream.c (unimpl_seek, null_seek): Second argument is a val, not cnum, to conform with function pointer in stream structure. (stdio_seek): Accept offset as val, which could be a fixnum or bignum. Use new stdio_ftell and stdio_fseek functions so large values work. (seek_stream): No need to convert offset argument to cnum; pass the val directly to seek virtual function. * sysif.c (off_t_num, num_off_t, stdio_ftell, stdio_fseek): New functions. * sysif.h (OFF_T_MAX, OFF_T_MIN): New preprocessor symbols. (off_t_num, num_off_t, stdio_ftell, stdio_fseek): Declared. --- stream.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'stream.h') diff --git a/stream.h b/stream.h index d3ec649a..bfaf76c9 100644 --- a/stream.h +++ b/stream.h @@ -57,7 +57,7 @@ struct strm_ops { val (*unget_byte)(val, int); val (*close)(val, val); val (*flush)(val); - val (*seek)(val, cnum, enum strm_whence); + val (*seek)(val, val, enum strm_whence); val (*truncate)(val, val); val (*get_prop)(val, val ind); val (*set_prop)(val, val ind, val); -- cgit v1.2.3