aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLoren J. Rittle <ljrittle@acm.org>2002-01-04 22:24:07 +0000
committerLoren J. Rittle <ljrittle@gcc.gnu.org>2002-01-04 22:24:07 +0000
commitf1ec5635389b922c17580612307d02736d0e0c31 (patch)
tree12b581372e55e015bbe93d16eedcefbfd6c81c65
parent96eb115797a37da6564411e3eeb74a1c0c793805 (diff)
downloadgcc-f1ec5635389b922c17580612307d02736d0e0c31.zip
gcc-f1ec5635389b922c17580612307d02736d0e0c31.tar.gz
gcc-f1ec5635389b922c17580612307d02736d0e0c31.tar.bz2
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
-rw-r--r--libf2c/ChangeLog6
-rw-r--r--libf2c/libI77/fio.h6
2 files changed, 11 insertions, 1 deletions
diff --git a/libf2c/ChangeLog b/libf2c/ChangeLog
index 2505ccc..c6f4caf 100644
--- a/libf2c/ChangeLog
+++ b/libf2c/ChangeLog
@@ -1,3 +1,9 @@
+2002-01-04 Loren J. Rittle <ljrittle@acm.org>
+
+ * 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 <ljrittle@acm.org>
* Makefile.in ($(LIBG2C):): Let libtool decide when to add -lc.
diff --git a/libf2c/libI77/fio.h b/libf2c/libI77/fio.h
index 8c6d274..59526e7 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