From f1ec5635389b922c17580612307d02736d0e0c31 Mon Sep 17 00:00:00 2001 From: "Loren J. Rittle" Date: Fri, 4 Jan 2002 22:24:07 +0000 Subject: [PATCH] fio.h (FSEEK): Enforce type of second parameter to be off_t when... * libI77/fio.h (FSEEK): Enforce type of second parameter to be off_t when prototype is missing from system headers for the non-standard function. From-SVN: r48546 --- libf2c/ChangeLog | 6 ++++++ libf2c/libI77/fio.h | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/libf2c/ChangeLog b/libf2c/ChangeLog index 2505ccc8bf2..c6f4cafef6e 100644 --- a/libf2c/ChangeLog +++ b/libf2c/ChangeLog @@ -1,3 +1,9 @@ +2002-01-04 Loren J. Rittle + + * libI77/fio.h (FSEEK): Enforce type of second parameter to be + off_t when prototype is missing from system headers for the + non-standard function. + 2002-01-03 Loren J. Rittle * Makefile.in ($(LIBG2C):): Let libtool decide when to add -lc. diff --git a/libf2c/libI77/fio.h b/libf2c/libI77/fio.h index 8c6d274fe49..59526e77bff 100644 --- a/libf2c/libI77/fio.h +++ b/libf2c/libI77/fio.h @@ -18,7 +18,11 @@ /* Only use fseeko/ftello if they are both there. */ #if defined (HAVE_FSEEKO) && defined (HAVE_FTELLO) -#define FSEEK fseeko +/* The cast helps in any case where the fseeko() prototype is somehow missing + (perhaps because _POSIX_SOURCE is defined and the system headers try + to keep a clean namespace in that case) even though the autoconf test + found the non-standard function via its trivial link test. */ +#define FSEEK(a,b,c) fseeko(a, (off_t) b, c) #define FTELL ftello #else #define FSEEK fseek -- 2.30.2