[Haskell-cafe] c2hs and pthreadtypes.h

Magnus Therning magnus at therning.org
Tue Mar 13 18:55:22 EDT 2007

I'm trying to use c2hs but get stuck when including sys/types.h (though
the problem really resides in pthreadtypes.h):

 % ./Setup.hs build -v
 Preprocessing executables for kowasu-0.1...
 /usr/bin/c2hs -C -D__GLASGOW_HASKELL__=606 -C -Icsrc -o src/Kowasu/PTrace.hs src/Kowasu/PTrace.chs
 c2hs: Error in C header file.

 /usr/include/bits/pthreadtypes.h:69: (column 6) [FATAL]
   >>> Syntax error!
   The symbol `;' does not fit here.

The part of pthreadtypes.h where it chokes seems to be

 65     __extension__ union
 66     {
 67       int __spins;
 68       __pthread_slist_t __list;
 69     };
 70   } __data;
 71   char __size[__SIZEOF_PTHREAD_MUTEX_T];
 72   long int __align;
 73 } pthread_mutex_t;

Any pointers on how to solve this?  (Besides manually resolving all
defined types down to the C builtins.)


Magnus Therning                             (OpenPGP: 0xAB4DFBA4)
magnus at therning.org             Jabber: magnus.therning at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20070313/ce28af70/attachment.bin

More information about the Haskell-Cafe mailing list