From 6ebd309cb87e763f9cda2bac5f5ded1eefbbe75c Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Fri, 5 May 1995 05:09:58 +0000 Subject: (save_stdin): Don't hard-code /tmp. [DEFAULT_TMPDIR]: Use this instead. --- src/tac.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/tac.c b/src/tac.c index 6ddaa1923..8ddfdd1fd 100644 --- 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); -- cgit v1.2.3-70-g09d2