This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

libf2c I/O recursion fix


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]