From: CJ van den Berg <[email protected]>

This is required to successfully load terminfo into GHCi in current
versions of Fedora. The INPUT command is use by libncursesw.so in
Fedora.
---
 rts/Linker.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/rts/Linker.c b/rts/Linker.c
index c840857..f39112f 100644
--- a/rts/Linker.c
+++ b/rts/Linker.c
@@ -1190,7 +1190,7 @@ initLinker( void )
            REG_EXTENDED);
     ASSERT( compileResult == 0 );
     compileResult = regcomp(&re_realso,
-           "GROUP *\\( *(([^ )])+)",
+           "(GROUP|INPUT) *\\( *(([^ )])+)",
            REG_EXTENDED);
     ASSERT( compileResult == 0 );
 #   endif
@@ -1361,8 +1361,8 @@ addDLL( char *dll_name )
          if (regexec(&re_realso, line, (size_t) NMATCH, match, 0) == 0) {
             // success -- try to dlopen the first named file
             IF_DEBUG(linker, debugBelch("match%s\n",""));
-            line[match[1].rm_eo] = '\0';
-            errmsg = internal_dlopen(line+match[1].rm_so);
+            line[match[2].rm_eo] = '\0';
+            errmsg = internal_dlopen(line+match[2].rm_so);
             break;
          }
          // if control reaches here, no GROUP ( ... ) directive was found
-- 
1.7.4.4


_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to