]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
fio.h (FSEEK): Enforce type of second parameter to be off_t when...
authorLoren J. Rittle <ljrittle@acm.org>
Fri, 4 Jan 2002 22:24:07 +0000 (22:24 +0000)
committerLoren J. Rittle <ljrittle@gcc.gnu.org>
Fri, 4 Jan 2002 22:24:07 +0000 (22:24 +0000)
* 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
libf2c/libI77/fio.h

index 2505ccc8bf2fd704a0185ab18b041190d02db63d..c6f4cafef6e09169dcd58faf7a41218574b037e2 100644 (file)
@@ -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.
index 8c6d274fe49886567da994f3e234f8ed25e573af..59526e77bff3d0bd072ad497e39d237bd93eaa6b 100644 (file)
 /* 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