Hi,
I have a problem when processing "vte/vte.h" (from
vte-0.11.10) with c2hs-0.12.0 and glibc-2.3.3:
LANG=C c2hs --cppopts="-I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/X11R6/include -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include" vte.h Vte.chs
c2hs: Generic fatal error.
/usr/include/sys/sysmacros.h:43: (column 1) [FATAL]
>>> Syntax error!
The symbol `{' does not fit here.
It seems sys/sysmacros.h changed from glibc-2.3.2. Here is
the context:
# if defined __GNUC__ && __GNUC__ >= 2
__extension__ extern __inline unsigned int
gnu_dev_major (unsigned long long int __dev) __THROW
{
return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff);
}
Jens
ps glibc-2.3.3 will be in Fedora Core 2, which is being released
on Tuesday.
pps I just uploaded c2hs-0.12.0 rpms built with glibc-2.3.3
to <http://haskell.org/~petersen/rpms/c2hs/>. I applied the
following patch to build it with ghc-6.2.1:
--- c2hs-0.12.0/c2hs/c/CAttrs.hs~ 2004-05-16 09:46:07.000000000 +0900
+++ c2hs-0.12.0/c2hs/c/CAttrs.hs 2004-05-16 09:46:07.000000000 +0900
@@ -144,7 +144,7 @@
--
leaveObjRangeC :: AttrC -> AttrC
leaveObjRangeC ac = ac {
- defObjsAC = fst . leaveRange . defObjsAC $ ac,
+ defObjsAC = fst . leaveRange . defObjsAC $ ac
}
-- add another definitions to the object name space (EXPORTED)
On the C->Haskell web site
http://www.cse.unsw.edu.au/~chak/haskell/c2hs/
you can now find source release 0.13.1. It features the following:
* The issue with 'sys/sysmacros.h' in new version of glibc that Jens
Petersen reported is fixed.
* The space leak identified by Duncan Couts has been fixed.
* The generated code conforms to the H98 Addendum 1.0 (also in its
treatment of `ForeignPtr's).
Manuel