Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!usc!snorkelwacker.mit.edu!bloom-beacon!deccrl!news.crl.dec.com!shlump.nac.dec.com!tkou02.enet.dec.com!jit345!diamond From: diamond@jit345.swstokyo.dec.com (Norman Diamond) Newsgroups: comp.unix.ultrix Subject: Re: Why has Digital $ in their headerfiles in ultrix? Message-ID: <1991Jan23.032441.734@tkou02.enet.dec.com> Date: 23 Jan 91 03:24:41 GMT References: <1991Jan21.152619.2771@lth.se> Sender: news@tkou02.enet.dec.com (USENET News System) Reply-To: diamond@jit345.enet@tkou02.enet.dec.com (Norman Diamond) Organization: Digital Equipment Corporation Japan , Tokyo Lines: 34 In article <1991Jan21.152619.2771@lth.se> jh@efd.lth.se (Joergen Haegg) writes: >Ultrix 4.0.1, vaxstation 2000: >In /usr/include/math.h I found this line: >#if defined(GFLOAT) || CC$gfloat > ^^^^^^^^^ >And this is not the only one. Why can't Digital leave $ in VMS >where it belongs? If you find out, please tell me ;-) >Gcc complains. And if I look in the C book it says that an identifier >can only be [a-zA-Z_][a-zA-Z_0-9]. The header file is not designed for gcc. A vendor is allowed to organize its standard headers in any manner for use with its compier, as long as it compiles conforming programs correctly -- the headers don't even have to exist as files. Furthermore, a compiler that does not claim ANSI conformance does not have to do anything at all, though it does more than it has to. (This is not the company's opinion.) >Is there a fix for gcc, or is there another way to fix this? gcc has a "fixincludes" script, but if you intend to continue using the supplied cc as well, then you don't want to change the headers in /usr/include. (This is not the company's opinion.) My suggestion: You might create another directory, /usr/gcc_include or something, and always instruct gcc to search the other directory first. (I once did this at another employer. It was not that company's opinion either.) -- Norman Diamond diamond@tkov50.enet.dec.com If this were the company's opinion, I wouldn't be allowed to post it.