Path: utzoo!utgpu!watmath!clyde!ima!minya!jc From: jc@minya.UUCP (John Chambers) Newsgroups: comp.unix.questions Subject: Re: Telling csh about multiple, machine-dependent libraries Keywords: csh bin libraries Message-ID: <142@minya.UUCP> Date: 25 Nov 88 15:34:53 GMT Organization: (none) Lines: 41 > This uses the guaranteed feature of cpp to have the predefined symbols "sun", > "sparc", "vax", "hpux", etc. Everything else seemed to be different across > machine architectures. Which reminds me: Is it written down anywhere how one might go about finding out what symbols are pre-defined by a C pre-processor? I know that "unix" is generally pre-defined on Unix systems, and there's usually some symbol that identifies the cpu and/or model, but how do I find out what it is? I've read lots of manuals, and never seen it mentioned. I've generally attacked ccp with a "strings /lib/cpp" and looked for the table, but this is probably not the approved method. On this machine, the result includes the following: define undef include else endif ifdef ifndef if line class ident unix m68k __LINE__ __FILE__ Some of these are obvious. The "m68k" clearly means that this is a Motorola 68000. In fact, it's a 68010, though there's no way you can tell that from the above. I wonder what "class" and "ident" do? The cpp(1) page doesn't mention them. There appears to be nothing telling the make/model of the machine or compiler. What does your cpp pre-define? -- John Chambers <{adelie,ima,maynard,mit-eddie}!minya!{jc,root}> (617/484-6393) [Any errors in the above are due to failures in the logic of the keyboard, not in the fingers that did the typing.]