From d0bbc139bb5719596409b468b7e15f2bd7880d3b Mon Sep 17 00:00:00 2001 From: simonmar Date: Fri, 13 Jul 2001 14:59:32 +0000 Subject: [PATCH] [project @ 2001-07-13 14:59:32 by simonmar] check TMPDIR (got lost somewhere in the conversion to SysTools) --- ghc/compiler/main/SysTools.lhs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ghc/compiler/main/SysTools.lhs b/ghc/compiler/main/SysTools.lhs index 71e0e8e..1887038 100644 --- a/ghc/compiler/main/SysTools.lhs +++ b/ghc/compiler/main/SysTools.lhs @@ -53,7 +53,7 @@ import IO import Directory ( doesFileExist, removeFile ) import IOExts ( IORef, readIORef, writeIORef ) import Monad ( when, unless ) -import System ( system, ExitCode(..), exitWith ) +import System ( system, ExitCode(..), exitWith, getEnv ) #include "../includes/config.h" @@ -214,6 +214,14 @@ initSysTools minusB_args | am_installed = installed_bin cGHC_MANGLER | otherwise = inplace cGHC_MANGLER_DIR cGHC_MANGLER +#ifndef mingw32_TARGET_OS + -- check whether TMPDIR is set in the environment + ; IO.try (do dir <- getEnv "TMPDIR" -- fails if not set + setTmpDir dir + return () + ) +#endif + -- Check that the package config exists ; config_exists <- doesFileExist pkgconfig_path ; when (not config_exists) $ -- 1.7.10.4