Make the location for temporary files configurable at runtime.
To that effect observe the environment variable TMPDIR. If defined,
its value takes precedence over VG_TMPDIR.
Because the directory name is no longer a compile time constant,
VG_(err_config_error) was changed to take a variable argument list.
Fixes #267020.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11892 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/m_libcprint.c b/coregrind/m_libcprint.c
index fb2544d..75eff72 100644
--- a/coregrind/m_libcprint.c
+++ b/coregrind/m_libcprint.c
@@ -590,12 +590,16 @@
}
__attribute__((noreturn))
-void VG_(err_config_error) ( Char* msg )
+void VG_(err_config_error) ( Char* format, ... )
{
+ va_list vargs;
+ va_start(vargs,format);
revert_to_stderr();
- VG_(fmsg)("Startup or configuration error:\n %s\n", msg);
- VG_(fmsg)("Unable to start up properly. Giving up.\n");
+ VG_(message) (Vg_FailMsg, "Startup or configuration error:\n ");
+ VG_(vmessage)(Vg_FailMsg, format, vargs );
+ VG_(message) (Vg_FailMsg, "Unable to start up properly. Giving up.\n");
VG_(exit)(1);
+ va_end(vargs);
}