From cd7215ceba2c590619f3800fd692ec609a85204e Mon Sep 17 00:00:00 2001 From: Hartmut Brandt Date: Mon, 11 Jan 2010 09:16:42 +0000 Subject: [PATCH] Fix the previous commit (still not used to svn vs. cvs). Use the define from paths.h for the default temporary directory and remove and unneccessary getenv call. --- usr.bin/make/job.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/usr.bin/make/job.c b/usr.bin/make/job.c index 4d4afa6d070..beb83dc4a62 100644 --- a/usr.bin/make/job.c +++ b/usr.bin/make/job.c @@ -115,6 +115,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -139,7 +140,6 @@ __FBSDID("$FreeBSD$"); #include "var.h" #define TMPPAT "makeXXXXXXXXXX" -#define TMPDIR "/tmp" #ifndef USE_KQUEUE /* @@ -1611,7 +1611,7 @@ JobStart(GNode *gn, int flags, Job *previous) } if ((tdir = getenv("TMPDIR")) == NULL) - tdir = TMPDIR; + tdir = _PATH_TMP; /* * If the -n flag wasn't given, we open up OUR (not the child's) @@ -1807,8 +1807,6 @@ JobStart(GNode *gn, int flags, Job *previous) } else { fprintf(stdout, "Remaking `%s'\n", gn->name); fflush(stdout); - if ((tdir = getenv("TMPDIR")) == NULL) - tdir = TMPDIR; snprintf(job->outFile, sizeof(job->outFile), "%s/%s", tdir, TMPPAT); if ((job->outFd = mkstemp(job->outFile)) == -1)