summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoland McGrath <roland@hack.frob.com>2012-01-20 11:43:36 -0800
committerRoland McGrath <roland@hack.frob.com>2012-01-20 11:43:36 -0800
commit6e063d99a12beedde3ce1d4dc75c428d0ee7600e (patch)
tree85064a651979b91b36cc62ee3b17190fb6c3c5be
parent8592478d3bd1a021c0b51ace768b8ef944b13cf1 (diff)
Grok -U as inverse of -D in ar and ranlib.
-rw-r--r--NEWS3
-rw-r--r--src/ChangeLog2
-rw-r--r--src/arlib-argp.c6
3 files changed, 10 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 9d62d176..b0fb57b9 100644
--- a/NEWS
+++ b/NEWS
@@ -5,7 +5,8 @@ libdw: Support reading .zdebug_* DWARF sections compressed via zlib.
nm: Support C++ demangling.
ar: Support D modifier for "deterministic output" with no uid/gid/mtime info.
-ranlib: Support -D flag with same meaning.
+ The U modifier is the inverse.
+ranlib: Support -D and -U flags with same meaning.
Version 0.152
diff --git a/src/ChangeLog b/src/ChangeLog
index 22212f9b..46c277ce 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,7 @@
2012-01-20 Roland McGrath <roland@hack.frob.com>
+ * arlib-argp.c (options, parse_opt): Grok -U as inverse of -D.
+
* ranlib.c (argp): Use arlib_argp_children.
* arlib.c (arlib_init): Obey arlib_deterministic_output.
diff --git a/src/arlib-argp.c b/src/arlib-argp.c
index af19a255..e143fbf1 100644
--- a/src/arlib-argp.c
+++ b/src/arlib-argp.c
@@ -35,6 +35,8 @@ static const struct argp_option options[] =
{
{ NULL, 'D', NULL, 0,
N_("Use zero for uid, gid, and date in archive members."), 0 },
+ { NULL, 'U', NULL, 0,
+ N_("Use actual uid, gid, and date in archive members."), 0 },
{ NULL, 0, NULL, 0, NULL, 0 }
};
@@ -49,6 +51,10 @@ parse_opt (int key, char *arg __attribute__ ((unused)),
arlib_deterministic_output = true;
break;
+ case 'U':
+ arlib_deterministic_output = false;
+ break;
+
default:
return ARGP_ERR_UNKNOWN;
}