darcs patch: libffi: install 'ffitarget.h' header as ... (and 1 more)

Sergei Trofimovich slyich at gmail.com
Sat Mar 20 14:54:10 EDT 2010


2 patches for repository http://darcs.haskell.org/ghc-6.12/ghc:

Sat Mar 20 17:27:03 EET 2010  Sergei Trofimovich <slyfox at community.haskell.org>
  * libffi: install 'ffitarget.h' header as sole 'ffi.h' is unusable
  
  'ffitarget.h' is a platform specific header, defining certain
  datatypes like ffi_arg/ffi_sarg and defines.

Sat Mar 20 17:32:42 EET 2010  Sergei Trofimovich <slyfox at community.haskell.org>
  * Fix Trac #3516: ppc64: broken 'foreign import wrapper'
  
  looking at libffi/testsuite/libffi.call/cls_ushort.c(and
  other integrals) we see:
  
    *(ffi_arg*)resp = *(unsigned short *)args[0];
  
  looking at libffi/testsuite/libffi.call/cls_float.c we see:
  
    *(float *)resp = *(float *)args[0];
  
  So, libffi-0.3.8 assumes all primitive integral types to be
  stored as 'ffi_arg' type, but ghc always generates
  
      *(StgType*)resp = cret;
  
  Commit fixes such state of things.
  
  Thread about real type of 'void * resp':
  http://sourceware.org/ml/libffi-discuss/2010/msg00063.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/x-darcs-patch
Size: 68414 bytes
Desc: A darcs patch for your repository!
Url : http://www.haskell.org/pipermail/cvs-ghc/attachments/20100320/c0ce539d/attachment-0001.bin


More information about the Cvs-ghc mailing list