Import ghc-6.8.3 as wip/ghc.
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 commit is contained in:
parent
fe7f294756
commit
586edb96bf
7 changed files with 124 additions and 0 deletions
27
ghc/patches/patch-ak
Normal file
27
ghc/patches/patch-ak
Normal file
|
@ -0,0 +1,27 @@
|
|||
$NetBSD: patch-ak,v 1.1.1.1 2008/07/17 14:38:01 phonohawk Exp $
|
||||
|
||||
--- libraries/base/include/HsBase.h.orig 2007-12-10 19:16:54.000000000 +0100
|
||||
+++ libraries/base/include/HsBase.h 2008-07-07 13:18:57.000000000 +0200
|
||||
@@ -254,6 +254,11 @@
|
||||
INLINE int
|
||||
__hscore_sigismember( sigset_t * set, int s )
|
||||
{ return sigismember(set,s); }
|
||||
+
|
||||
+INLINE int
|
||||
+__hscore_sigprocmask( int how, const sigset_t * set, sigset_t * oset )
|
||||
+{ return sigprocmask(how,set,oset); }
|
||||
+
|
||||
#endif
|
||||
|
||||
INLINE void *
|
||||
@@ -648,6 +653,10 @@
|
||||
#endif
|
||||
}
|
||||
|
||||
+INLINE DIR* __hscore_opendir (const char *filename) {
|
||||
+ return opendir(filename);
|
||||
+}
|
||||
+
|
||||
// These are wrapped because on some OSs (eg. Linux) they are
|
||||
// macros which redirect to the 64-bit-off_t versions when large file
|
||||
// support is enabled.
|
22
ghc/patches/patch-al
Normal file
22
ghc/patches/patch-al
Normal file
|
@ -0,0 +1,22 @@
|
|||
$NetBSD: patch-al,v 1.1.1.1 2008/07/17 14:38:01 phonohawk Exp $
|
||||
|
||||
--- libraries/base/System/Posix/Internals.hs.orig 2007-12-10 19:16:54.000000000 +0100
|
||||
+++ libraries/base/System/Posix/Internals.hs 2008-07-07 13:11:44.000000000 +0200
|
||||
@@ -354,7 +354,7 @@
|
||||
foreign import ccall unsafe "HsBase.h __hscore_open"
|
||||
c_open :: CString -> CInt -> CMode -> IO CInt
|
||||
|
||||
-foreign import ccall unsafe "HsBase.h opendir"
|
||||
+foreign import ccall unsafe "HsBase.h __hscore_opendir"
|
||||
c_opendir :: CString -> IO (Ptr CDir)
|
||||
|
||||
foreign import ccall unsafe "HsBase.h __hscore_mkdir"
|
||||
@@ -418,7 +418,7 @@
|
||||
foreign import ccall unsafe "HsBase.h __hscore_sigaddset"
|
||||
c_sigaddset :: Ptr CSigset -> CInt -> IO CInt
|
||||
|
||||
-foreign import ccall unsafe "HsBase.h sigprocmask"
|
||||
+foreign import ccall unsafe "HsBase.h __hscore_sigprocmask"
|
||||
c_sigprocmask :: CInt -> Ptr CSigset -> Ptr CSigset -> IO CInt
|
||||
|
||||
foreign import ccall unsafe "HsBase.h tcgetattr"
|
23
ghc/patches/patch-am
Normal file
23
ghc/patches/patch-am
Normal file
|
@ -0,0 +1,23 @@
|
|||
$NetBSD: patch-am,v 1.1.1.1 2008/07/17 14:38:01 phonohawk Exp $
|
||||
|
||||
--- libraries/unix/include/HsUnix.h.orig 2007-12-11 03:20:47.000000000 +0900
|
||||
+++ libraries/unix/include/HsUnix.h
|
||||
@@ -140,6 +140,18 @@ INLINE int __hsunix_mknod(const char *pa
|
||||
return mknod(pathname,mode,dev);
|
||||
}
|
||||
|
||||
+#ifdef HAVE_UNSETENV
|
||||
+INLINE void __hsunix_unsetenv(const char *name)
|
||||
+{
|
||||
+ unsetenv(name);
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
+INLINE clock_t __hsunix_times(struct tms *tp)
|
||||
+{
|
||||
+ return times(tp);
|
||||
+}
|
||||
+
|
||||
#ifdef HAVE_PTSNAME
|
||||
// I cannot figure out how to make the definitions of the following
|
||||
// functions visible in <stdlib.h> on Linux. But these definitions
|
13
ghc/patches/patch-an
Normal file
13
ghc/patches/patch-an
Normal file
|
@ -0,0 +1,13 @@
|
|||
$NetBSD: patch-an,v 1.1.1.1 2008/07/17 14:38:01 phonohawk Exp $
|
||||
|
||||
--- libraries/unix/System/Posix/Env.hsc.orig 2008-03-24 17:09:39.000000000 +0100
|
||||
+++ libraries/unix/System/Posix/Env.hsc 2008-03-24 17:10:41.000000000 +0100
|
||||
@@ -81,7 +81,7 @@
|
||||
|
||||
unsetEnv name = withCString name c_unsetenv
|
||||
|
||||
-foreign import ccall unsafe "unsetenv"
|
||||
+foreign import ccall unsafe "__hsunix_unsetenv"
|
||||
c_unsetenv :: CString -> IO ()
|
||||
#else
|
||||
unsetEnv name = putEnv (name ++ "=")
|
13
ghc/patches/patch-ao
Normal file
13
ghc/patches/patch-ao
Normal file
|
@ -0,0 +1,13 @@
|
|||
$NetBSD: patch-ao,v 1.1.1.1 2008/07/17 14:38:01 phonohawk Exp $
|
||||
|
||||
--- libraries/unix/System/Posix/Process.hsc.orig 2008-03-24 17:10:54.000000000 +0100
|
||||
+++ libraries/unix/System/Posix/Process.hsc 2008-03-24 17:11:30.000000000 +0100
|
||||
@@ -177,7 +177,7 @@
|
||||
|
||||
type CTms = ()
|
||||
|
||||
-foreign import ccall unsafe "times"
|
||||
+foreign import ccall unsafe "__hsunix_times"
|
||||
c_times :: Ptr CTms -> IO CClock
|
||||
|
||||
-- -----------------------------------------------------------------------------
|
13
ghc/patches/patch-ap
Normal file
13
ghc/patches/patch-ap
Normal file
|
@ -0,0 +1,13 @@
|
|||
$NetBSD: patch-ap,v 1.1.1.1 2008/07/17 14:38:01 phonohawk Exp $
|
||||
|
||||
--- libraries/network/include/HsNet.h.orig 2007-12-11 03:25:19.000000000 +0900
|
||||
+++ libraries/network/include/HsNet.h 2008-03-31 12:36:50.000000000 +0900
|
||||
@@ -139,3 +139,8 @@
|
||||
}
|
||||
|
||||
#endif
|
||||
+
|
||||
+INLINE int __hsnet_socket(int domain, int type, int protocol)
|
||||
+{
|
||||
+ return socket(domain, type, protocol);
|
||||
+}
|
13
ghc/patches/patch-aq
Normal file
13
ghc/patches/patch-aq
Normal file
|
@ -0,0 +1,13 @@
|
|||
$NetBSD: patch-aq,v 1.1.1.1 2008/07/17 14:38:01 phonohawk Exp $
|
||||
|
||||
--- libraries/network/Network/Socket.hsc.orig 2008-03-31 12:40:13.000000000 +0900
|
||||
+++ libraries/network/Network/Socket.hsc 2008-03-31 12:40:41.000000000 +0900
|
||||
@@ -2499,7 +2499,7 @@
|
||||
c_close :: CInt -> IO CInt
|
||||
#endif
|
||||
|
||||
-foreign import CALLCONV unsafe "socket"
|
||||
+foreign import CALLCONV unsafe "__hsnet_socket"
|
||||
c_socket :: CInt -> CInt -> CInt -> IO CInt
|
||||
foreign import CALLCONV unsafe "bind"
|
||||
c_bind :: CInt -> Ptr SockAddr -> CInt{-CSockLen???-} -> IO CInt
|
Loading…
Reference in a new issue