From: Jim Meyering Date: Fri, 5 May 1995 05:09:58 +0000 (+0000) Subject: (save_stdin): Don't hard-code /tmp. X-Git-Tag: textutils-1_12_1~210 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6ebd309cb87e763f9cda2bac5f5ded1eefbbe75c;p=thirdparty%2Fcoreutils.git (save_stdin): Don't hard-code /tmp. [DEFAULT_TMPDIR]: Use this instead. --- diff --git a/src/tac.c b/src/tac.c index 6ddaa19236..8ddfdd1fd7 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);