Commit d2c43675 by Loren J. Rittle Committed by Loren J. Rittle

endfile.c (t_runc): Add cast to help case where ftruncate() prototype is somehow missing even...

	* libI77/endfile.c (t_runc): Add cast to help case where
	ftruncate() prototype is somehow missing even though autoconf
	test found it properly.

From-SVN: r42120
parent 7edc73b4
2001-05-15 Loren J. Rittle <ljrittle@acm.org>
* 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 <toon@moene.indiv.nluug.nl> 2001-02-26 Toon Moene <toon@moene.indiv.nluug.nl>
* libI77/configure.in: Test for ftruncate. * libI77/configure.in: Test for ftruncate.
......
...@@ -129,7 +129,10 @@ done: ...@@ -129,7 +129,10 @@ done:
f__cf = b->ufd = bf; f__cf = b->ufd = bf;
#else /* !defined(HAVE_FTRUNCATE) */ #else /* !defined(HAVE_FTRUNCATE) */
fflush(b->ufd); 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) */ #endif /* !defined(HAVE_FTRUNCATE) */
if (rc) if (rc)
err(a->aerr,111,"endfile"); err(a->aerr,111,"endfile");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment