From mboxrd@z Thu Jan 1 00:00:00 1970 Mime-Version: 1.0 (Apple Message framework v752.2) In-Reply-To: References: Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Kim Shrier Subject: Re: [9fans] trouble with include order using c compiler with ansi preprocessor Date: Sun, 10 Jun 2007 14:44:18 -0600 To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu> Topicbox-Message-UUID: 7ce1b5de-ead2-11e9-9d60-3106f5b1d025 On Jun 10, 2007, at 1:26 PM, erik quanstrom wrote: > doing includes like you are is not quite the plan 9 style, but the > point > of pcc is to accomidate. What I am experimenting with is porting a program, which I didn't write, from UNIX to Plan 9. The source is already littered with #if's and #ifdef's for various environments. Because there are #if's, I wanted to use the ANSI preprocessor. In order to avoid adding to the conditional compile nightmare, I thought I would make Plan 9 versions of the appropriate header files and set up the include path to find the Plan 9 versions instead of the UNIX ones. As has been mentioned in several emails, this is not the Plan 9 style. Since one of the main goals of my experimentation is to learn the Plan 9 way of doing things, I would like to hear any recommendations regarding this. One recommendation mentioned in another email was to use bind to alias the old include file to the Plan 9 version. Is this the preferred way? Are there other, more desirable ways to accomplish this? Thanks, Kim