public inbox for gas2@sourceware.org
 help / color / mirror / Atom feed
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	[thread overview]
Message-ID: <9505061619.AA04935@titanic.nynexst.com> (raw)

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
      {


                 reply	other threads:[~1995-05-06  9:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9505061619.AA04935@titanic.nynexst.com \
    --to=hjl@nynexst.com \
    --cc=gas2@cygnus.com \
    --cc=raeburn@cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).