#48: Interpreted an int64_t typedef as CInt
--------------------+-------------------------------------------------------
Reporter: guest | Type: defect
Status: new | Priority: blocker
Milestone: | Component: general
Version: 0.16.2 | Keywords:
--------------------+-------------------------------------------------------
Comment(by guest):
I managed to track down the problem. Turns out that the header in
question indirectly includes <sys/types.h> before it includes <stdint.h>,
and <sys/types.h> defines int64_t in a way that c2hs doesn't know how to
handle:
{{{
$ cpp /usr/include/stdint.h | grep -w int64_t
typedef long int int64_t;
$ cpp /usr/include/sys/types.h | grep -w int64_t
typedef int int64_t __attribute__ ((__mode__ (__DI__)));
}}}
I'd guess that c2hs ignores the GCC-specific __attribute__ that
overrides the size, and just sees "int".
--
Ticket URL: <http://hackage.haskell.org/trac/c2hs/ticket/48#comment:1>
c2hs <http://www.cse.unsw.edu.au/~chak/haskell/c2hs/>
C->Haskell, An Interface Generator for Haskell
_______________________________________________
C2hs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/c2hs