* bootstrap.conf: Depend on tmpdir rather than tmpfile,
as the standard tmpfile() doesn't honor $TMPDIR.
* src/split.c (copy_to_tmpfile): Adjust to call temp_stream() rather
than tmpfile();
* NEWS: Mention the improvement.
split now uses more tuned access patterns for its potentially large input.
This was seen to improve throughput by 5% when reading from SSD.
+ split now supports a configurable $TMPDIR for handling any temporary files.
+
tac now falls back to '/tmp' if a configured $TMPDIR is unavailable.
time_rz
timer-time
timespec
- tmpfile
+ tmpdir
tzset
uname
unicodeio
src_cut_SOURCES = src/cut.c src/set-fields.c
src_numfmt_SOURCES = src/numfmt.c src/set-fields.c
+src_split_SOURCES = src/split.c src/temp-stream.c
src_tac_SOURCES = src/tac.c src/temp-stream.c
src_tail_SOURCES = src/tail.c src/iopoll.c
#include "quote.h"
#include "sig2str.h"
#include "sys-limits.h"
+#include "temp-stream.h"
#include "xbinary-io.h"
#include "xdectoint.h"
#include "xstrtol.h"
static off_t
copy_to_tmpfile (int fd, char *buf, idx_t bufsize)
{
- FILE *tmp = tmpfile ();
- if (!tmp)
+ FILE *tmp;
+ if (!temp_stream (&tmp, nullptr))
return -1;
off_t copied = 0;
off_t r;