From: Debian Haskell Group Date: Sun, 15 Sep 2024 21:17:25 +0000 (+0300) Subject: hurd-getExecutablePath X-Git-Tag: archive/raspbian/9.6.6-2+rpi1~2^2~8 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=0c946cd23d9c37ada769c0dde23631d2b26b7117;p=ghc.git hurd-getExecutablePath Also applies in 9.6.x Can be dropped with 9.8.1 Debian-Bug: https://bugs.debian.org/1056305 Gbp-Pq: Name hurd-getExecutablePath --- diff --git a/libraries/ghc-boot/GHC/BaseDir.hs b/libraries/ghc-boot/GHC/BaseDir.hs index 0001837f..fca6f09b 100644 --- a/libraries/ghc-boot/GHC/BaseDir.hs +++ b/libraries/ghc-boot/GHC/BaseDir.hs @@ -24,7 +24,7 @@ import System.FilePath #if defined(mingw32_HOST_OS) import System.Environment (getExecutablePath) -- POSIX -#elif defined(darwin_HOST_OS) || defined(linux_HOST_OS) || defined(freebsd_HOST_OS) || defined(openbsd_HOST_OS) || defined(netbsd_HOST_OS) +#elif defined(darwin_HOST_OS) || defined(linux_HOST_OS) || defined(freebsd_HOST_OS) || defined(openbsd_HOST_OS) || defined(netbsd_HOST_OS) || defined(hurd_HOST_OS) import System.Environment (getExecutablePath) #endif @@ -53,7 +53,7 @@ getBaseDir = Just . (\p -> p "lib") . rootDir <$> getExecutablePath -- that is running this function. rootDir :: FilePath -> FilePath rootDir = takeDirectory . takeDirectory . normalise -#elif defined(darwin_HOST_OS) || defined(linux_HOST_OS) || defined(freebsd_HOST_OS) || defined(openbsd_HOST_OS) || defined(netbsd_HOST_OS) +#elif defined(darwin_HOST_OS) || defined(linux_HOST_OS) || defined(freebsd_HOST_OS) || defined(openbsd_HOST_OS) || defined(netbsd_HOST_OS) || defined(hurd_HOST_OS) -- on unix, this is a bit more confusing. -- The layout right now is something like --