
magnus:
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.)
/M
Does it help to use the darcs version of c2hs? I've heard rumours that it can parse the linux kernel now.. -- Don