[C2hs] problem with sys/sysmacros.h
Jens Petersen
petersen at haskell.org
Sun May 16 11:24:00 EDT 2004
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)
More information about the C2hs
mailing list