Subject: | default tmpdir should use P_tmpdir not /tmp |
The default location returned by par_mktmpdir is '/tmp' on all Unix
platforms. This ends up unpacking large files into swap on Solaris,
which can quickly fill up. It would be better to use /var/tmp on this
platform. This preference is already encoded in the P_tmpdir system
macro. So the following patch will address this issue in a platform
independent manner:
Index: myldr/mktmpdir.c
===================================================================
--- myldr/mktmpdir.c (revision 526)
+++ myldr/mktmpdir.c (working copy)
@@ -43,7 +43,7 @@
const char *tmpdir = NULL;
const char *key = NULL , *val = NULL;
- const char *temp_dirs[4] = { "C:\\TEMP", "/tmp", ".", "" };
+ const char *temp_dirs[4] = { "C:\\TEMP", P_tmpdir, ".", "" };
const char *temp_keys[6] = { "PAR_TMPDIR", "TMPDIR", "TEMPDIR",
"TEMP", "TMP", "" };
const char *user_keys[3] = { "USER", "USERNAME", "" };