Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!rbutterworth From: rbutterworth@watmath.UUCP Newsgroups: comp.lang.c Subject: Re: RMS comments to X3J11 Message-ID: <4448@watmath.UUCP> Date: Fri, 16-Jan-87 09:13:24 EST Article-I.D.: watmath.4448 Posted: Fri Jan 16 09:13:24 1987 Date-Received: Sat, 17-Jan-87 03:57:20 EST References: <2144@brl-adm.ARPA> <5497@brl-smoke.ARPA> <1258@ho95e.UUCP> <303@haddock.UUCP> Organization: U of Waterloo, Ontario Lines: 21 In article <303@haddock.UUCP>, karl@haddock.UUCP (Karl Heuer) writes: > Someone else already suggested a variant that I think is more viable: > #define _machine_ "u3b2" > could be tested by some comparison operator. Either "==" or "strcmp(,)==0" > could be used, but since the interpretation is not identical to that of C, I > will suggest a new preprocessor operator "#==". Even that extension isn't good enough. What if I want to test for "vax" in some places and "vax/780" in others? Using #ifdef is still the best solution and it doesn't require any changes to cpp. e.g. #if defined(_TS_UNIX) # if defined(_TS_UNIX_BSD) && !defined(_TS_UNIX_BSD_4_3) ... You can't do such things (assuming one really wants to do such things) using a single _operating_system_ symbol. The only "change" is that X3J11 should reserve some prefixes such as "_TS_" and "_TM_" for local defintions of the target operating system and target machine.