libf2c I/O recursion fix
Mumit Khan
khan@xraylith.wisc.edu
Mon Oct 27 09:47:00 GMT 1997
Here's a fix for the problem I had reported to egcs-bugs sometime last
week. Scan for the message with the following Subject line:
g77 bug? "I/O recursion" -- very annoying
Fri Oct 24 11:15:22 1997 Mumit Khan <khan@brahma.xraylith.wisc.edu>
* libI77/close.c (f_exit): Reset f__init so that f_clos does not
(incorrectly) think there is an I/O recursion when program is
interrupted.
--- f/runtime/libI77/close.c.~1 Fri Oct 24 11:14:20 1997
+++ f/runtime/libI77/close.c Fri Oct 24 11:22:10 1997
@@ -75,6 +75,10 @@ f_exit(void)
static cllist xx;
if (! (f__init & 1))
return; /* Not initialized, so no open units. */
+ /* no more I/O to be done. If this is not done, then if the
+ program is interrupted during I/O, f_clos thinks, incorrectly,
+ that there is an I/O recursion. */
+ f__init &= ~2;
if (!xx.cerr) {
xx.cerr=1;
xx.csta=NULL;
Regards,
Mumit -- khan@xraylith.wisc.edu
http://www.xraylith.wisc.edu/~khan/
More information about the Gcc
mailing list