소스 검색

Also try TEMP and TMP environment variables, not only TMPDIR

Samuel Thibault 8 년 전
부모
커밋
ec72b21232
2개의 변경된 파일8개의 추가작업 그리고 0개의 파일을 삭제
  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);