a strip bug fix

H.J. Lu hjl@nynexst.com
Sat May 6 09:23:00 GMT 1995


Sat May  6 08:52:24 1995  H.J. Lu (hjl@nynexst.com)

	* objcopy.c (smart_rename): make it smarter, clean up
	  if rename () fails.

diff -c gnu/binutils/binutils/objcopy.c:1.1.1.5 gnu/binutils/binutils/objcopy.c:1.1.1.5.2.1
*** gnu/binutils/binutils/objcopy.c:1.1.1.5	Sat May  6 11:12:32 1995
--- gnu/binutils/binutils/objcopy.c	Sat May  6 11:12:32 1995
***************
*** 1326,1331 ****
--- 1326,1340 ----
  	  chmod (to, s.st_mode & 07777);
  	  chown (to, s.st_uid, s.st_gid);
  	}
+       else
+ 	{
+ 	  /* We have to clean up here. */
+ 	  int saved = errno;
+ 	  fprintf (stderr, "%s: `%s': ", program_name, to);
+ 	  errno = saved;
+ 	  perror ("rename");
+ 	  unlink (from);
+ 	}
      }
    else
      {




More information about the Gas2 mailing list