Date: Mon, 11 Jan 2010 09:16:42 +0000 (UTC) From: Hartmut Brandt <harti@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r202070 - head/usr.bin/make Message-ID: <201001110916.o0B9Gg1A012733@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: harti Date: Mon Jan 11 09:16:42 2010 New Revision: 202070 URL: http://svn.freebsd.org/changeset/base/202070 Log: 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. Modified: head/usr.bin/make/job.c Modified: head/usr.bin/make/job.c ============================================================================== --- head/usr.bin/make/job.c Mon Jan 11 05:26:18 2010 (r202069) +++ head/usr.bin/make/job.c Mon Jan 11 09:16:42 2010 (r202070) @@ -115,6 +115,7 @@ __FBSDID("$FreeBSD$"); #include <fcntl.h> #include <inttypes.h> #include <limits.h> +#include <paths.h> #include <string.h> #include <signal.h> #include <stdlib.h> @@ -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 *prev } 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 *prev } 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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001110916.o0B9Gg1A012733>