VMS change to temp file handling in gcc.c
Daniel Jacobowitz
drow@mvista.com
Fri Jan 4 19:13:00 GMT 2002
On Fri, Jan 04, 2002 at 01:01:50PM -0800, Douglas B. Rupp wrote:
> How about something like this?
>
> % diff -p -c gcc.c gcc.c.new
> *** gcc.c Tue Jan 1 21:16:13 2002
> --- gcc.c.new Fri Jan 4 12:59:12 2002
> *************** delete_if_ordinary (name)
> *** 2115,2122 ****
> created. This ensures we delete all of them. */
> while (stat (name, &st) >= 0 && S_ISREG (st.st_mode))
> if (unlink (name) < 0)
> ! if (verbose_flag)
> ! perror_with_name (name);
> }
>
> static void
> --- 2115,2125 ----
> created. This ensures we delete all of them. */
> while (stat (name, &st) >= 0 && S_ISREG (st.st_mode))
> if (unlink (name) < 0)
> ! {
> ! if (verbose_flag)
> ! perror_with_name (name);
> ! break;
> ! }
> }
>
> static void
That -should- be fine. I'm not terribly comfortable with it, though;
even given a sufficiently broken filesystem GCC should not loop
forever. This also could backfire if something else creates a tempfile
with the same name - I suppose that's ignorable, though, since it's
vanishingly unlikely.
I'd really rather you create the tempfile on VMS in such a way that
multiple versions are not created. Is that impractical?
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
More information about the Gcc-patches
mailing list