<feed xmlns='http://www.w3.org/2005/Atom'>
<title>coreutils/src/mktemp.c, branch v8.7</title>
<subtitle>Mirror of https://https.git.savannah.gnu.org/git/coreutils.git/
</subtitle>
<id>https://git.shady.money/coreutils/atom?h=v8.7</id>
<link rel='self' href='https://git.shady.money/coreutils/atom?h=v8.7'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/'/>
<updated>2010-02-11T08:01:15Z</updated>
<entry>
<title>doc: remove extraneous periods from --help output</title>
<updated>2010-02-11T08:01:15Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2010-02-10T17:05:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=45b46f4951758e6d3564537bbc8535cf76e9114a'/>
<id>urn:sha1:45b46f4951758e6d3564537bbc8535cf76e9114a</id>
<content type='text'>
* src/join.c (usage): Mention "fields" rather than repeating "line"
so that it's more obvious that the fields are still parsed, and
thus -o is still honored for headers.  Also remove an extraneous
'.' reported by Stéphane Raimbault.
* src/base64.c (usage): Remove extraneous blank line and order
the options alphabetically.  Also remove an extraneous '.'
* src/chown.c (usage): Remove extraneous '.'
* src/cp.c (usage): Likewise.
* src/mktemp.c (usage): Likewise.
* src/pr.c (usage): Likewise.
* src/stat.c (usage): Likewise.
* src/uniq.c (usage): Likewise.
</content>
</entry>
<entry>
<title>maint: update all FSF copyright year lists to include 2010</title>
<updated>2010-01-01T13:06:47Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2010-01-01T09:56:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=1aa17dc89b3f313697661541adca0aa0defbdc09'/>
<id>urn:sha1:1aa17dc89b3f313697661541adca0aa0defbdc09</id>
<content type='text'>
Use this command:
git ls-files | grep -v COPYING \
  | xargs env UPDATE_COPYRIGHT_USE_INTERVALS=1 \
      build-aux/update-copyright
</content>
</entry>
<entry>
<title>mktemp: fix bug with -q and closed stdout</title>
<updated>2009-11-07T17:10:25Z</updated>
<author>
<name>Eric Blake</name>
<email>ebb9@byu.net</email>
</author>
<published>2009-11-05T19:19:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=c768e2231b89901a2e29c3bf96c027b64f8646d9'/>
<id>urn:sha1:c768e2231b89901a2e29c3bf96c027b64f8646d9</id>
<content type='text'>
If stdin or stdout is closed, then freopen(,stderr) can violate
the premise that STDERR_FILENO==fileno(stderr), which in turn
breaks mktemp -q.

* bootstrap.conf (gnulib_modules): Add freopen-safer.
* src/mktemp.c (includes): Use stdio--.h.
* tests/misc/close-stdout: Enhance test to catch bug.
</content>
</entry>
<entry>
<title>mktemp: use more robust means to avoid double-close of stdout</title>
<updated>2009-11-05T20:12:35Z</updated>
<author>
<name>Eric Blake</name>
<email>ebb9@byu.net</email>
</author>
<published>2009-11-05T16:05:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=dde83c27b4e5c75063c304e5dcfada6950a6d7ee'/>
<id>urn:sha1:dde83c27b4e5c75063c304e5dcfada6950a6d7ee</id>
<content type='text'>
Reverts earlier patch - fflush() can succeed but fclose() fail for
some cases of write failures, and we want to catch those.

* src/mktemp.c (stdout_closed): New variable.
(maybe_close_stdout): New function, borrowed from dd.c.
(main): Track whether stdout has been closed.
</content>
</entry>
<entry>
<title>mktemp: don't try to close stdout twice</title>
<updated>2009-11-05T15:32:52Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2009-11-05T15:26:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=22e4276ed1b3ef67446e8f003b7bcf7753cbc9bc'/>
<id>urn:sha1:22e4276ed1b3ef67446e8f003b7bcf7753cbc9bc</id>
<content type='text'>
* src/mktemp.c (main): Rather than calling close_stream (which would
make atexit-called close_stdout try to close it a second time),
check for write failure via ferror and fflush.
</content>
</entry>
<entry>
<title>mktemp: don't use suff_len in place of #-of-`X's variable</title>
<updated>2009-11-05T15:23:59Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2009-11-05T15:23:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=25d2460ae3dcbfb557016bbac6e8568e258caed3'/>
<id>urn:sha1:25d2460ae3dcbfb557016bbac6e8568e258caed3</id>
<content type='text'>
* src/mktemp.c (mkstemp_len, mkdtemp_len): Pass x_len as final
argument, and not suff_len.
</content>
</entry>
<entry>
<title>mktemp: add suffix handling</title>
<updated>2009-11-05T14:10:40Z</updated>
<author>
<name>Eric Blake</name>
<email>ebb9@byu.net</email>
</author>
<published>2009-11-04T18:13:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=31a9937081dc41a5f8d28d71709204e413e09972'/>
<id>urn:sha1:31a9937081dc41a5f8d28d71709204e413e09972</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>build: reflect gnulib changes to tempname</title>
<updated>2009-11-05T14:00:52Z</updated>
<author>
<name>Eric Blake</name>
<email>ebb9@byu.net</email>
</author>
<published>2009-11-03T15:51:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=d431c61873753673ad9fcbac90db6db04185e307'/>
<id>urn:sha1:d431c61873753673ad9fcbac90db6db04185e307</id>
<content type='text'>
In glibc 2.11 and gnulib, gen_tempname added a parameter
suffixlen (unfortunately, it is typed as int rather than
size_t, for historical compatibility to a poor choice by BSD).

* gnulib: Import latest changes.
* gl/lib/tempname.h.diff: Accommodate new suffixlen parameter.
* gl/lib/tempname.c.diff (check_x_suffix): Allow for X in suffix
beyond x_suffix_len.
(gen_tempname_len): Add suffixlen parameter.
(__gen_tempname): Update caller.
* src/mktemp.c (mkstemp_len, mkdtemp_len): Update callers.
</content>
</entry>
<entry>
<title>mktemp: rearrange --help output</title>
<updated>2009-11-05T13:59:03Z</updated>
<author>
<name>Eric Blake</name>
<email>ebb9@byu.net</email>
</author>
<published>2009-11-04T23:09:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=0c5ae3a8ace333fcafff237fa4707b6469df10e5'/>
<id>urn:sha1:0c5ae3a8ace333fcafff237fa4707b6469df10e5</id>
<content type='text'>
* src/mktemp.c (usage): Align indentation and sort by long
options.  Describe valid templates.
Suggested by http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=548316.
</content>
</entry>
<entry>
<title>mktemp: don't leave file behind on write failure</title>
<updated>2009-11-05T13:53:21Z</updated>
<author>
<name>Eric Blake</name>
<email>ebb9@byu.net</email>
</author>
<published>2009-11-04T21:02:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=41b3a8ed8b2480ca12baaa6c692a7fba3ebd53cf'/>
<id>urn:sha1:41b3a8ed8b2480ca12baaa6c692a7fba3ebd53cf</id>
<content type='text'>
* src/mktemp.c (main): Remove just-created file if stdout had
problems.
* bootstrap.conf (gnulib_modules): Add remove.
* tests/misc/close-stdout: Test it.
* NEWS: Document it.
</content>
</entry>
</feed>
