mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-17 18:02:09 +03:00
(save_stdin): Don't hard-code /tmp.
[DEFAULT_TMPDIR]: Use this instead.
This commit is contained in:
1 parent
151f4af0da
commit
6ebd309cb8
1 file changed
+5
-1
@@ -51,6 +51,10 @@ char *malloc ();
|
||||
char *realloc ();
|
||||
#endif
|
||||
|
||||
#ifndef DEFAULT_TMPDIR
|
||||
#define DEFAULT_TMPDIR "/tmp"
|
||||
#endif
|
||||
|
||||
/* The number of bytes per atomic read. */
|
||||
#define INITIAL_READSIZE 8192
|
||||
|
||||
@@ -363,7 +367,7 @@ save_stdin ()
|
||||
{
|
||||
tempdir = getenv ("TMPDIR");
|
||||
if (tempdir == NULL)
|
||||
tempdir = "/tmp";
|
||||
tempdir = DEFAULT_TMPDIR;
|
||||
template = xmalloc (strlen (tempdir) + 11);
|
||||
}
|
||||
sprintf (template, "%s/tacXXXXXX", tempdir);
|
||||
|
||||
Reference in new issue
Block a user