From: ljrittle Date: Tue, 15 May 2001 21:24:41 +0000 (+0000) Subject: * libI77/endfile.c (t_runc): Add cast to help case where X-Git-Tag: upstream/4.9.2~94431 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a6eec37ed8bc81a32415735164c645acfec1e80a;p=platform%2Fupstream%2Flinaro-gcc.git * libI77/endfile.c (t_runc): Add cast to help case where ftruncate() prototype is somehow missing even though autoconf test found it properly. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@42120 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/libf2c/ChangeLog b/libf2c/ChangeLog index 5206fa8..c535023 100644 --- a/libf2c/ChangeLog +++ b/libf2c/ChangeLog @@ -1,3 +1,9 @@ +2001-05-15 Loren J. Rittle + + * libI77/endfile.c (t_runc): Add cast to help case where + ftruncate() prototype is somehow missing even though autoconf + test found it properly. + 2001-02-26 Toon Moene * libI77/configure.in: Test for ftruncate. diff --git a/libf2c/libI77/endfile.c b/libf2c/libI77/endfile.c index 8e60d05..7b009c7 100644 --- a/libf2c/libI77/endfile.c +++ b/libf2c/libI77/endfile.c @@ -129,7 +129,10 @@ done: f__cf = b->ufd = bf; #else /* !defined(HAVE_FTRUNCATE) */ fflush(b->ufd); - rc = ftruncate(fileno(b->ufd),loc); + /* The cast of loc is helpful on FreeBSD. It helps + in any case where ftruncate() prototype is somehow missing + even though autoconf test found it properly. */ + rc = ftruncate(fileno(b->ufd), (off_t)loc); #endif /* !defined(HAVE_FTRUNCATE) */ if (rc) err(a->aerr,111,"endfile");