Why has Digital $ in their headerfiles in ultrix?

Norman Diamond diamond at jit345.swstokyo.dec.com
Wed Jan 23 14:24:41 AEST 1991


In article <1991Jan21.152619.2771 at lth.se> jh at 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 at tkov50.enet.dec.com
If this were the company's opinion, I wouldn't be allowed to post it.



More information about the Comp.unix.ultrix mailing list