Explorar o código

Also try TEMP and TMP environment variables, not only TMPDIR

Samuel Thibault %!s(int64=8) %!d(string=hai) anos
pai
achega
ec72b21232
Modificáronse 2 ficheiros con 8 adicións e 0 borrados
  1. 4 0
      src/common/utils.c
  2. 4 0
      src/datawizard/malloc.c

+ 4 - 0
src/common/utils.c

@@ -464,6 +464,10 @@ char *_starpu_get_home_path(void)
 		static int warn;
 		path = starpu_getenv("TMPDIR");
 		if (!path)
+			path = starpu_getenv("TEMP");
+		if (!path)
+			path = starpu_getenv("TMP");
+		if (!path)
 			path = "/tmp";
 		if (!warn)
 		{

+ 4 - 0
src/datawizard/malloc.c

@@ -251,6 +251,10 @@ int starpu_malloc_flags(void **A, size_t dim, int flags)
 			{
 				char *path = starpu_getenv("TMPDIR");
 				if (!path)
+					path = starpu_getenv("TEMP");
+				if (!path)
+					path = starpu_getenv("TMP");
+				if (!path)
 					path = "/tmp";
 				/* Create bogus file if not done already */
 				char *name = _starpu_mktemp(path, O_RDWR | O_BINARY, &bogusfile);