[GHC] #2305: GHC does not care __RENAME macro

GHC trac at galois.com
Thu Jun 5 04:46:45 EDT 2008


#2305: GHC does not care __RENAME macro
-----------------------------+----------------------------------------------
 Reporter:  iquiw            |          Owner:         
     Type:  feature request  |         Status:  closed 
 Priority:  normal           |      Milestone:         
Component:  Compiler (FFI)   |        Version:  6.8.2  
 Severity:  normal           |     Resolution:  invalid
 Keywords:                   |     Difficulty:  Unknown
 Testcase:                   |   Architecture:  Unknown
       Os:  NetBSD           |  
-----------------------------+----------------------------------------------
Changes (by simonmar):

  * status:  new => closed
  * difficulty:  => Unknown
  * resolution:  => invalid

Comment:

 This is not a bug, as such - or rather, it's a bug in the via-C backend
 that it actually works when compiling with -fvia-C (we fixed this recently
 in HEAD).  The FFI is defined to interface to the C ABI rather than the C
 API; it doesn't take account of CPP magic.

 To work around this you typically need to call a C wrapper via the FFI
 rather than calling the C function directly.  The C wrapper lives in a .c
 file and gets compiled by the C compiler.  We have lots of these scattered
 about the libraries already.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2305#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the Glasgow-haskell-bugs mailing list