Build-time option TMPDIR included in Makefile clashes with environment
variable of the same name. This breaks tools that make use of that
variable, such as distcc.
The following example demonstrates what's going on:
$ cat Makefile
TMPDIR="/tmp"
all:
env
$ export TMPDIR=test
$ make | grep ^TMPDIR
TMPDIR="/tmp"
distcc error (note the extra quotes):
ERROR: can't use TMPDIR ""/tmp"": No such file or directory
TIMEZONE_DEFAULT optional default for timezone option
TLS_INCLUDE optional path to include files for TLS
TLS_LIBS optional additional libraries for TLS
TIMEZONE_DEFAULT optional default for timezone option
TLS_INCLUDE optional path to include files for TLS
TLS_LIBS optional additional libraries for TLS
-TMPDIR system value for TMPDIR environment variable
+EXIM_TMPDIR system value for TMPDIR environment variable
TRANSPORT_APPENDFILE driver include appendfile transport
TRANSPORT_AUTOREPLY driver include autoreply transport
TRANSPORT_LMTP driver include lmtp transport
TRANSPORT_APPENDFILE driver include appendfile transport
TRANSPORT_AUTOREPLY driver include autoreply transport
TRANSPORT_LMTP driver include lmtp transport
# it replaces the value with what is defined here. Commenting this setting
# suppresses the check altogether.
# it replaces the value with what is defined here. Commenting this setting
# suppresses the check altogether.
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
#define TCP_WRAPPERS_DAEMON_NAME "exim"
#define TIMEZONE_DEFAULT
#define TCP_WRAPPERS_DAEMON_NAME "exim"
#define TIMEZONE_DEFAULT
#define TRANSPORT_APPENDFILE
#define TRANSPORT_AUTOREPLY
#define TRANSPORT_APPENDFILE
#define TRANSPORT_AUTOREPLY
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
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
-TMPDIR macro, if this macro is defined. */
+EXIM_TMPDIR macro, if this macro is defined. */
{
uschar **p;
for (p = USS environ; *p != NULL; p++)
{
if (Ustrncmp(*p, "TMPDIR=", 7) == 0 &&
{
uschar **p;
for (p = USS environ; *p != NULL; p++)
{
if (Ustrncmp(*p, "TMPDIR=", 7) == 0 &&
- Ustrcmp(*p+7, TMPDIR) != 0)
+ Ustrcmp(*p+7, EXIM_TMPDIR) != 0)
- uschar *newp = malloc(Ustrlen(TMPDIR) + 8);
- sprintf(CS newp, "TMPDIR=%s", TMPDIR);
+ uschar *newp = malloc(Ustrlen(EXIM_TMPDIR) + 8);
+ sprintf(CS newp, "TMPDIR=%s", EXIM_TMPDIR);
- DEBUG(D_any) debug_printf("reset TMPDIR=%s in environment\n", TMPDIR);
+ DEBUG(D_any) debug_printf("reset TMPDIR=%s in environment\n", EXIM_TMPDIR);