]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(save_stdin): Don't hard-code /tmp.
authorJim Meyering <jim@meyering.net>
Fri, 5 May 1995 05:09:58 +0000 (05:09 +0000)
committerJim Meyering <jim@meyering.net>
Fri, 5 May 1995 05:09:58 +0000 (05:09 +0000)
[DEFAULT_TMPDIR]: Use this instead.

src/tac.c

index 6ddaa1923663d57d2216cfd1530da070c636308e..8ddfdd1fd76bf01e225a0a32174997986d0f509f 100644 (file)
--- a/src/tac.c
+++ b/src/tac.c
@@ -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);