[Gc] GC patch for DJGPP
Mon, 3 Nov 2003 00:18:17 +1100
On 01-Nov-2003, Doug Kaufman <email@example.com> wrote:
> The errno was EACCESS. Adding a call to fflush() seems to fix the
> problem. I am not really sure why.
> if ((f = fopen(FNAME2, "w")) == 0) ABORT("2nd open failed");
> + fflush(f);
That really ought to be
if (fflush(f) == EOF) ABORT("fflush failed");
By ignoring the return value from fflush(),
you may be hiding some real failures.
Fergus Henderson <firstname.lastname@example.org> | "I have always known that the pursuit
The University of Melbourne | of excellence is a lethal habit"
WWW: <https://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.