pkgsrc/lang/ghc80/patches/patch-libraries_base_System_Environment.hs
pho 4b3aed4acc Import GHC 8.0.2
GHC: The Glasgow Haskell Compiler.

The Glasgow Haskell Compiler is a robust, fully-featured, optimising
compiler for the functional programming language Haskell 98
(http://www.haskell.org). GHC compiles Haskell to either native code
or C. It implements numerous experimental language extensions to
Haskell, including concurrency, a foreign language interface, several
type-system extensions, exceptions, and so on. GHC comes with a
generational garbage collector, a space and time profiler, and a
comprehensive set of libraries.

This package provides the 8.0.x release series, which is the last
version that can bootstrap with 7.10.3. It will probably be removed
once we make a separate package for GHC 8.4.x and get enough bootstrap
kits for it.
2020-01-03 15:24:08 +00:00

23 lines
820 B
Haskell

$NetBSD: patch-libraries_base_System_Environment.hs,v 1.1 2020/01/03 15:24:08 pho Exp $
Suppress linker warnings about compatibility syscall wrappers by using
"capi" instead of "ccall".
--- libraries/base/System/Environment.hs.orig 2017-01-03 15:59:18.000000000 +0000
+++ libraries/base/System/Environment.hs
@@ -1,5 +1,6 @@
{-# LANGUAGE Safe #-}
{-# LANGUAGE CPP #-}
+{-# LANGUAGE CApiFFI #-}
-----------------------------------------------------------------------------
-- |
@@ -304,7 +305,7 @@ putEnv keyvalue = do
-- environment.
throwErrnoIf_ (/= 0) "putenv" (c_putenv s)
-foreign import ccall unsafe "putenv" c_putenv :: CString -> IO CInt
+foreign import capi unsafe "stdlib.h putenv" c_putenv :: CString -> IO CInt
#endif
-- | @unSet name@ removes the specified environment variable from the