From bbb2af5e5016f5d79e0b5d0c1312934b3ccd815d Mon Sep 17 00:00:00 2001
From: Ron Yorston <rmy@pobox.com>
Date: Mon, 24 Oct 2016 08:54:44 +0100
Subject: diff: use TMPDIR rather than TMP/TEMP

The getenv function in win32/env.c already handles replacing TMPDIR
with TMP/TEMP on Microsoft Windows.
---
 editors/diff.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/editors/diff.c b/editors/diff.c
index 5c8a55b93..0ae7e20b3 100644
--- a/editors/diff.c
+++ b/editors/diff.c
@@ -747,7 +747,7 @@ static int diffreg(char *file[2])
 #else
 			int fd_tmp;
 
-			if (!(tmpdir=getenv("TMP")) && !(tmpdir=getenv("TEMP")))
+			if (!(tmpdir=getenv("TMPDIR")))
 				goto out;
 			tmpfile[i] = xasprintf("%s/difXXXXXX", tmpdir);
 			fd_tmp = xmkstemp(tmpfile[i]);
-- 
cgit v1.2.3-55-g6feb