aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1999-09-12 19:00:11 +0000
committerIan Lance Taylor <ian@airs.com>1999-09-12 19:00:11 +0000
commita20a10a650d7948012d62d0341812cbf8ac5fde8 (patch)
tree9e6235d29db547a30c367aabc906901e34ba60cf /binutils
parent8bea4d5c6c4db6966c987d18dd6362db56472eeb (diff)
downloadgdb-a20a10a650d7948012d62d0341812cbf8ac5fde8.zip
gdb-a20a10a650d7948012d62d0341812cbf8ac5fde8.tar.gz
gdb-a20a10a650d7948012d62d0341812cbf8ac5fde8.tar.bz2
* ar.c (main): Clear output_file if we don't change the archive.
(delete_members, replace_members): Likewise.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog5
-rw-r--r--binutils/ar.c14
2 files changed, 16 insertions, 3 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 1c4eab0..4297c2a 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,8 @@
+1999-09-12 Ian Lance Taylor <ian@zembu.com>
+
+ * ar.c (main): Clear output_file if we don't change the archive.
+ (delete_members, replace_members): Likewise.
+
1999-09-12 Donn Terry <donn@interix.com>
* objdump.c (dump_headers): If wide_output, print Flags header.
diff --git a/binutils/ar.c b/binutils/ar.c
index 50d1edc7..bdc5103 100644
--- a/binutils/ar.c
+++ b/binutils/ar.c
@@ -647,17 +647,23 @@ main (argc, argv)
case delete:
if (files != NULL)
delete_members (arch, files);
+ else
+ output_filename = NULL;
break;
case move:
if (files != NULL)
move_members (arch, files);
+ else
+ output_filename = NULL;
break;
case replace:
case quick_append:
if (files != NULL || write_armap > 0)
replace_members (arch, files, operation == quick_append);
+ else
+ output_filename = NULL;
break;
/* Shouldn't happen! */
@@ -1179,9 +1185,9 @@ delete_members (arch, files_to_delete)
}
if (something_changed == true)
- {
- write_archive (arch);
- }
+ write_archive (arch);
+ else
+ output_filename = NULL;
}
@@ -1332,6 +1338,8 @@ replace_members (arch, files_to_move, quick)
if (changed)
write_archive (arch);
+ else
+ output_filename = NULL;
}
static void