PATCH: Parallel compilation of class files

Alexandre Oliva aoliva@redhat.com
Wed May 8 18:58:00 GMT 2002


On May  8, 2002, Mark Mitchell <mark@codesourcery.com> wrote:

> !       temporary_file_name = xmalloc (strlen (class_file_name)
> ! 				     + strlen (".tmp") + 1);
> !       sprintf (temporary_file_name, "%s.tmp", class_file_name);

Consider using `concat (class_file_name, ".tmp");'

> !       if (rename (temporary_file_name, class_file_name) == -1)
> ! 	fatal_io_error ("can't create %s", class_file_name);

wouldn't it be appropriate to unlink the temporary file in this case?

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist                Professional serial bug killer



More information about the Gcc-patches mailing list