From: Pietro Gagliardi <pietro10@mac.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu>
Subject: Re: [9fans] A probably stupid question on portability
Date: Tue, 23 Oct 2007 16:12:23 -0400 [thread overview]
Message-ID: <AF130445-F147-47C0-8BAB-8D938B43FF9E@mac.com> (raw)
In-Reply-To: <e549296ffa1c11d7aee1113a2c431228@terzarima.net>
The following
#if defined(_INCLUDED_GASNET_INTERNAL_H) && !defined
(_IN_GASNET_INTERNAL_H)
is equivalent to
#ifdef _INCLUDED_GASNET_INTERNAL_H
#ifndef _IN_GASNET_INTERNAL_H
for the standard C compilers in Plan 9. A goal of the Plan 9 kernel
was to drop #if/#ifdef code and have a single C source code base that
did not use this construct. The compilers were adapted to fit this
requirement, so they allow #ifdef, but disallow #if. That is why a
Standard C preprocessor, cpp(1), is provided
On Oct 23, 2007, at 4:03 PM, Charles Forsyth wrote:
> #if and the defined stuff are in even the older c standards, but it's
> not defined to be part of the compiler (in plan 9, it's still in a
> separate cpp,
> and usually that's not used, except with pcc, but see the -p option
> in 2c(1))
>
> early on, cpp was fairly simple minded, part of the cc command(!), and
> a c file had to have # at the start to be macro-processed.
>
> the rot really set in with reiser
> This new version [of the preprocessor] was written by John F.
> Reiser and is from 5 to 12
> times faster than the old.
> (but the input language was considerably more elaborate, and didn't
> people use it!)
>
> From: "ron minnich" <rminnich@gmail.com>
> Date: October 23, 2007 3:10:31 PM EDT
> To: "Fans of the OS Plan 9 from Bell Labs" <9fans@cse.psu.edu>
> Subject: [9fans] A probably stupid question on portability
> Reply-To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu>
>
>
> Is this construct portable at this point? c99 or whatever? Or is it
> gcc-centric?
>
> #if defined(_INCLUDED_GASNET_INTERNAL_H) && !defined
> (_IN_GASNET_INTERNAL_H)
>
>
> ron
>
next prev parent reply other threads:[~2007-10-23 20:12 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-23 19:10 ron minnich
2007-10-23 19:14 ` Pietro Gagliardi
2007-10-23 20:03 ` Charles Forsyth
2007-10-23 20:12 ` Pietro Gagliardi [this message]
2007-10-24 8:58 ` Douglas A. Gwyn
2007-10-24 9:21 ` Charles Forsyth
2007-10-23 22:27 ` David Leimbach
2007-10-23 22:41 ` Pietro Gagliardi
2007-10-24 8:58 ` Douglas A. Gwyn
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=AF130445-F147-47C0-8BAB-8D938B43FF9E@mac.com \
--to=pietro10@mac.com \
--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).