This is the mail archive of the gas2@sourceware.cygnus.com mailing list for the gas2 project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
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
{