9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Kris Maglione <bsdaemon@comcast.net>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] Summer of Code: Call for mentors and students
Date: Fri, 16 Mar 2007 21:29:39 -0400	[thread overview]
Message-ID: <20070317012939.GF33600@kris.home> (raw)
In-Reply-To: <32138c088eb79573e98a961f9967127a@coraid.com>

[-- Attachment #1: Type: text/plain, Size: 1002 bytes --]

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 #2: Type: application/pgp-signature, Size: 194 bytes --]

  reply	other threads:[~2007-03-17  1:29 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-15 18:08 Kris Maglione
2007-03-15 18:40 ` Skip Tavakkolian
2007-03-15 18:47   ` Devon H. O'Dell
2007-03-15 19:16   ` Kris Maglione
2007-03-15 19:30     ` andrey mirtchovski
2007-03-15 19:43       ` Kris Maglione
2007-03-15 22:39         ` andrey mirtchovski
2007-03-15 22:40           ` andrey mirtchovski
2007-03-17  0:50             ` Fernan Bolando
2007-03-17  1:11               ` Kris Maglione
2007-03-17  1:12               ` erik quanstrom
2007-03-17  1:29                 ` Kris Maglione [this message]
2007-03-17  1:56                   ` erik quanstrom
2007-03-17  2:14                     ` Kris Maglione
2007-03-15 19:47       ` Skip Tavakkolian
2007-03-15 19:49         ` Kris Maglione

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070317012939.GF33600@kris.home \
    --to=bsdaemon@comcast.net \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).