From b3f21e4a58cbbeca439d4270f4234ef565a59030 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Tue, 26 Oct 2004 08:08:21 +0000 Subject: * ar.c (extract_file): Set atime to mtime for ar xo. --- binutils/ChangeLog | 4 ++++ binutils/ar.c | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'binutils') diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 3d833e4..136ca47 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,7 @@ +2004-10-26 Jakub Jelinek + + * ar.c (extract_file): Set atime to mtime for ar xo. + 2004-10-25 Ian Lance Taylor * stabs.c (stab_demangle_v3_arglist): New static function, broken diff --git a/binutils/ar.c b/binutils/ar.c index ab54ace..6cc7941 100644 --- a/binutils/ar.c +++ b/binutils/ar.c @@ -935,7 +935,12 @@ extract_file (bfd *abfd) chmod (bfd_get_filename (abfd), buf.st_mode); if (preserve_dates) - set_times (bfd_get_filename (abfd), &buf); + { + /* Set access time to modification time. Only st_mtime is + initialized by bfd_stat_arch_elt. */ + buf.st_atime = buf.st_mtime; + set_times (bfd_get_filename (abfd), &buf); + } free (cbuf); } -- cgit v1.1