mktemp: add suffix handling
authorEric Blake <ebb9@byu.net>
Wed, 4 Nov 2009 18:13:39 +0000 (11:13 -0700)
committerEric Blake <ebb9@byu.net>
Thu, 5 Nov 2009 14:10:40 +0000 (07:10 -0700)
commit31a9937081dc41a5f8d28d71709204e413e09972
treec8d994de7a8a903ec10a0b427059e6c4acebe615
parentd431c61873753673ad9fcbac90db6db04185e307
mktemp: add suffix handling

Now that mkstemps is supported, we might as well use it.

* src/mktemp.c (TMPDIR_OPTION): New enum value.
(longopts): Add new option.
(usage): Document it.
(count_trailing_X_s): Rename...
(count_consecutive_X_s): ...to this, and add parameter.
(mkstemp_len, mkdtemp_len): Add parameter.
(main): Implement new option.
(AUTHORS): Add myself.
* AUTHORS (mktemp): Likewise.
* tests/misc/mktemp: Test new option.
* doc/coreutils.texi (mktemp invocation): Document it.
* NEWS: Likewise.
Fixes http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=548316.
AUTHORS
NEWS
doc/coreutils.texi
src/mktemp.c
tests/misc/mktemp