From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,a649e59da0d335b6 X-Google-Attributes: gidfee84,public From: Dan.Pop@mail.cern.ch (Dan Pop) Subject: Re: How do I find machine & OS names in /lib/cpp?! Date: 1995/07/06 Message-ID: #1/1 X-Deja-AN: 105732236 sender: news@news.cern.ch (USENET News System) x-nntp-posting-host: ues5.cern.ch references: <3tb6f2$m4a@news.ox.ac.uk> <3th62b$oqn@eccdb1.pms.ford.com> organization: CERN European Lab for Particle Physics newsgroups: comp.unix.osf.osf1 In <3th62b$oqn@eccdb1.pms.ford.com> charette@ultoe.det.dec.com (Mark Charette) writes: >Dan Pop (Dan.Pop@mail.cern.ch) wrote: > >: You can use this trick on any Unix system to find out which system > ^^^ ? >: specific macros are defined when the preprocessor is invoked. > >Assuming that -v is supported on every Unix system, something I'm not >really sure is a fact. I don't remember any ANSI/ISO committee (or >even any de-facto industry committee) defining what should be supported >as switches on C compilers, never mind whether or not they're even >called cc. Surprising comment from you, Dan ;^) This is not comp.lang.c and we're talking about Unix compilers (actually compiler drivers) not about the C language, so the ANSI/ISO committee has little to do with our subject. I've used about a dozen of Unix C compilers and, for some of them, -v was the only way to obtain the complete list of macros defined when the preprocessor is invoked (neither the cc nor the cpp man page did help). But if you have a better and more portable method, please share it with us. BTW, there are a number of Unix standards requiring the C compiler to be called cc. So, you'll have a hard time finding a Unix C compiler without a cc driver, even if the vendor will recommend using a different driver. Dan -- Dan Pop CERN, CN Division Email: Dan.Pop@mail.cern.ch Mail: CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland