From 8f3bfb82de5170ef78b53f13d73af5cbdb5fabb2 Mon Sep 17 00:00:00 2001 From: "Heiko Schlittermann (HS12-RIPE)" Date: Thu, 4 Feb 2016 10:00:50 +0100 Subject: [PATCH] Add backward compatibility for EXIM_TMPDIR --- src/scripts/Configure-Makefile | 4 +++- src/src/EDITME | 4 +++- src/src/exim.c | 5 ++++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/scripts/Configure-Makefile b/src/scripts/Configure-Makefile index eeb26eeb1..8f40d1c95 100755 --- a/src/scripts/Configure-Makefile +++ b/src/scripts/Configure-Makefile @@ -110,7 +110,9 @@ do if test -r ../$f echo "# End of $f" echo "" fi -done >> $mft || exit 1 +done \ + | sed 's/^TMPDIR=/EXIM_&/' \ + >> $mft || exit 1 # handle pkg-config # beware portability of extended regexps with sed. diff --git a/src/src/EDITME b/src/src/EDITME index 6afe0c74c..38321ecb2 100644 --- a/src/src/EDITME +++ b/src/src/EDITME @@ -1121,7 +1121,9 @@ SYSTEM_ALIASES_FILE=/etc/aliases # files, and thus be influenced by the value of TMPDIR. For this reason, when # Exim starts, it checks the environment for TMPDIR, and if it finds it is set, # it replaces the value with what is defined here. Commenting this setting -# suppresses the check altogether. +# suppresses the check altogether. Older installations call this macro +# just TMPDIR, but this has side effects at build time. At runtime +# TMPDIR is checked as before. EXIM_TMPDIR="/tmp" diff --git a/src/src/exim.c b/src/src/exim.c index c134bf5e6..02f2a9a4d 100644 --- a/src/src/exim.c +++ b/src/src/exim.c @@ -3899,7 +3899,10 @@ if (log_oneline) temporary files are created; Exim doesn't use these (apart from when delivering to MBX mailboxes), but called libraries such as DBM libraries may require them. If TMPDIR is found in the environment, reset it to the value defined in the -EXIM_TMPDIR macro, if this macro is defined. */ +EXIM_TMPDIR macro, if this macro is defined. For backward compatibility this +macro may be called TMPDIR in old "Local/Makefile"s. It's converted to +EXIM_TMPDIR by the build scripts. +*/ #ifdef EXIM_TMPDIR { -- 2.25.1