Xref: utzoo comp.unix.questions:13380 comp.std.c:1171 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!decwrl!ucbvax!mtxinu!ed From: ed@mtxinu.COM (Ed Gould) Newsgroups: comp.unix.questions,comp.std.c Subject: Re: How can I find out cc or cpp symbols? Keywords: cpp, cc, macros Message-ID: <849@mtxinu.UUCP> Date: 8 May 89 19:02:13 GMT References: <1954@trantor.harris-atd.com> <10084@smoke.BRL.MIL> <1339@ncr-sd.SanDiego.NCR.COM> <10214@smoke.BRL.MIL> Reply-To: ed@mtxinu.COM (Ed Gould) Organization: mt Xinu, Berkeley Lines: 41 Greg Noel: >>I've wondered why the ANSI committee didn't simply mandate that there >>be a header file, say , that was implicitly #included, and >>that contained all the machine-specific, system-specific, and >>vendor-specific names. Doug Gwyn: >[It was not suggested] in that form, that I recall, but there were a >variety of suggestions for ways to "standardize" such parameterization >of the environment. Basically the use of macros for denoting specific >operating systems and hardware doesn't seem to be fine-grained enough. I think Doug missed the point of the question. Remember that the original discussion was about how to determine what names are defined in the local environment. The question is not what to define, but where to define it. As I understand the suggestion, the file would contain all of the names defined in the local environment that weren't absolutely required by the standard. Thus, for example on a Vax Unix system (using pre-ANS names), it might contain, among other things, #define unix 1 #define vax 1 (By "absolutely required" I mean those names that are specifically required and that the name and value of which are stated in the standard. There may be none other than _STDC_ [or however that one is spelled]). By examining the user could determine exactly what would be predefined. It might be that there would need to be special handling of this file, so that -U would be meaningful: might need to be read before parsing command-line arguments. But that's no different than having the symbols hard-coded into the compiler (or pre-processor, in this case). -- Ed Gould mt Xinu, 2560 Ninth St., Berkeley, CA 94710 USA ed@mtxinu.COM +1 415 644 0146 "I'll fight them as a woman, not a lady. I'll fight them as an engineer."