Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!mit-eddie!uw-beaver!teknowledge-vaxc!sri-unix!amdahl!oliveb!sun!gorodish!guy From: guy@gorodish.Sun.COM (Guy Harris) Newsgroups: comp.lang.c Subject: Re: Preprocessor Portability Message-ID: <33130@sun.uucp> Date: Thu, 5-Nov-87 19:08:16 EST Article-I.D.: sun.33130 Posted: Thu Nov 5 19:08:16 1987 Date-Received: Sun, 8-Nov-87 11:06:58 EST References: <1986@killer.UUCP> Sender: news@sun.uucp Lines: 19 > A question on cpp: how portable are "#elif" and "defined()"? Although > they aren't in K&R, I don't recall working on a system which doesn't > have them. Most C compilers using the Reiser "cpp", prior to the System V Release 3 C compiler, do not have "#elif"; this means V7, System III, System V "Release 1" and Release 2, and 4.[123]BSD. Doug Gwyn has posted patches to put "#elif" into older "cpp"s, but I suspect most systems out there do *not* have "#elif". Most, if not all, C compilers with using the Reiser "cpp" have "defined()"; this means most UNIX C compilers will have it. I can't speak for compilers not using the Reiser "cpp". The current ANSI C draft specifies both, so all ANSI C-conformant C compilers will have them unless they disappear in a future draft. Guy Harris {ihnp4, decvax, seismo, decwrl, ...}!sun!guy guy@sun.com