On Fri, Mar 16, 2007 at 09:12:37PM -0400, erik quanstrom wrote:
porting kenc to linux is doable, doesn't seem very useful, as
kenc doesn't do many of the stupid c compile tricks found
in linux heder files such as

Actually, it's more doable than you'd imagine. I've managed to get kencc to compile objects against the FreeBSD C headers (I can't run them, because I've no way to link them) by pushing something like this into the preprocessor stream:
#define __extension__(foo)
#define __attribute__(foo)
#define __inline
#define __func__ "foo"
#define __va_list=va_list
typedef char* va_list

and feeding it through this:
grep -v '^[     ]*typedef.*va_list' | 9 sed 's/return \(\);/return;/g'

However, I think that a much better solution is to try to avoid using system headers in most ported code. The Plan9Port headers have no such gcc garbage, except inside a few ifdefs, and only, to my knowledge, for the AUTOLIB() hack.

--
Kris Maglione

This space for rent.

Attachment: pgpFvZ2WJgfLa.pgp
Description: PGP signature

Reply via email to