[Haskell-cafe] c2hs and pthreadtypes.h

David Brown haskell2 at davidb.org
Tue Mar 13 19:07:23 EDT 2007


Magnus Therning wrote:

> I'm trying to use c2hs but get stuck when including sys/types.h (though
> the problem really resides in pthreadtypes.h):
>
>  /usr/include/bits/pthreadtypes.h:69: (column 6) [FATAL]
>    >>> Syntax error!
>    The symbol `;' does not fit here.

>  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;

This is an unnamed union.  It seems that most compilers these days
support these, but it isn't officially allowed by the C language.
Another post mentioned that development on c2hs might support this
kind of construct.

Dave



More information about the Haskell-Cafe mailing list