re PR fortran/4885 (BACKSPACE example that doesn't work as of gcc/g77-3.0.x)

2001-01-02  Toon Moene  <toon@moene.indiv.nluug.nl>

	PR fortran/4885
	* endfile.c (t_runc): After ftruncate. seek to end-of-file.

From-SVN: r47529
This commit is contained in:
Toon Moene 2001-12-02 15:00:56 +01:00 committed by Toon Moene
parent 710af8993d
commit f813aee742
2 changed files with 6 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2001-01-02 Toon Moene <toon@moene.indiv.nluug.nl>
PR fortran/4885
* endfile.c (t_runc): After ftruncate. seek to end-of-file.
2001-11-25 Toon Moene <toon@moene.indiv.nluug.nl>
* libF77/Makefile.in: Fix non-portable use of `$<' in z_log.c's rule.

View File

@ -132,6 +132,7 @@ done:
#else /* !defined(HAVE_FTRUNCATE) */
fflush(b->ufd);
rc = ftruncate(fileno(b->ufd), loc);
FSEEK(bf,loc,SEEK_SET);
#endif /* !defined(HAVE_FTRUNCATE) */
if (rc)
err(a->aerr,111,"endfile");