• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GNU Binutils with patches for OS216


Commit MetaInfo

Revision931004e4578333db0429abc7219282dbc0e10076 (tree)
Zeit1991-04-20 03:04:37
AutorDavid Henkel-Wallace <gumby@cygn...>
CommiterDavid Henkel-Wallace

Log Message

allow the user to specify a file more than once on the command line --
the duplicate references are ignored.
::wq

Ändern Zusammenfassung

Diff

--- a/binutils/ar.c
+++ b/binutils/ar.c
@@ -511,7 +511,6 @@ extract_file(abfd)
511511 exit(1);
512512 }
513513 }
514- /* no need to byte-swap; the two formats are presumably compatible(!) */
515514 fwrite(cbuf, 1, nread, ostream);
516515 ncopied += tocopy;
517516 }
@@ -845,6 +844,14 @@ replace_members(files_to_move)
845844 if (newer_only) {
846845 struct stat fsbuf,
847846 asbuf;
847+
848+ if (current->arelt_data == NULL) {
849+ /* This can only happen if you specify a file on the
850+ command line more than once. */
851+ fprintf (stderr, "Duplicate file specified: %s -- skipping.\n", *files_to_move);
852+ goto next_file;
853+ }
854+
848855 if (stat(*files_to_move, &fsbuf) != 0) {
849856 if (errno != ENOENT)
850857 bfd_fatal(*files_to_move);