aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToon Moene <toon@moene.indiv.nluug.nl>2001-12-02 15:00:56 +0100
committerToon Moene <toon@gcc.gnu.org>2001-12-02 14:00:56 +0000
commitf813aee742fd9d67d1cd1cf465daff43932bac26 (patch)
tree68cf8b92c6cccbb3093d2684ff6809382984e0a9
parent710af8993d78c5d2989f0e2f3a7f46257aef0259 (diff)
downloadgcc-f813aee742fd9d67d1cd1cf465daff43932bac26.zip
gcc-f813aee742fd9d67d1cd1cf465daff43932bac26.tar.gz
gcc-f813aee742fd9d67d1cd1cf465daff43932bac26.tar.bz2
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
-rw-r--r--libf2c/ChangeLog5
-rw-r--r--libf2c/libI77/endfile.c1
2 files changed, 6 insertions, 0 deletions
diff --git a/libf2c/ChangeLog b/libf2c/ChangeLog
index c6c1f0a..4c1e4b5 100644
--- a/libf2c/ChangeLog
+++ b/libf2c/ChangeLog
@@ -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.
diff --git a/libf2c/libI77/endfile.c b/libf2c/libI77/endfile.c
index 14b51f0..4c5a9dd 100644
--- a/libf2c/libI77/endfile.c
+++ b/libf2c/libI77/endfile.c
@@ -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");