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" <[EMAIL PROTECTED]>
Date: October 23, 2007 3:10:31 PM EDT
To: "Fans of the OS Plan 9 from Bell Labs" <[email protected]>
Subject: [9fans] A probably stupid question on portability
Reply-To: Fans of the OS Plan 9 from Bell Labs <[email protected]>
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