From mboxrd@z Thu Jan 1 00:00:00 1970 From: hjl@nynexst.com (H.J. Lu) To: raeburn@cygnus.com (Ken Raeburn) Cc: gas2@cygnus.com Subject: a strip bug fix Date: Sat, 06 May 1995 09:23:00 -0000 Message-id: <9505061619.AA04935@titanic.nynexst.com> X-SW-Source: 1995/msg00087.html 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 {