From be2454e0c5f77d57a27207406685f75490e0eee3 Mon Sep 17 00:00:00 2001 From: George Bosilca Date: Mon, 31 Mar 2008 20:15:49 +0000 Subject: [PATCH] Default the temporary directory to /tmp if no special environment variables are set. This commit was SVN r18046. --- opal/util/opal_environ.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/opal/util/opal_environ.c b/opal/util/opal_environ.c index e03c623e94..f6dd997bdc 100644 --- a/opal/util/opal_environ.c +++ b/opal/util/opal_environ.c @@ -30,6 +30,12 @@ #include "opal/util/opal_environ.h" #include "opal/constants.h" +#ifdef __WINDOWS__ +#define OMPI_DEFAULT_TMPDIR "C:\\TEMP" +#else +#define OMPI_DEFAULT_TMPDIR "/tmp" +#endif + /* * Merge two environ-like char arrays, ensuring that there are no * duplicate entires @@ -224,8 +230,7 @@ const char* opal_tmp_directory( void ) if( NULL == (str = getenv("TMPDIR")) ) if( NULL == (str = getenv("TEMP")) ) if( NULL == (str = getenv("TMP")) ) - if( NULL == (str = opal_home_directory()) ) - str = "."; + str = OMPI_DEFAULT_TMPDIR; return str; }