cpp compatiblity Unix/VMS

Robert Claeson robert at pvab.UUCP
Sun Aug 7 22:16:45 AEST 1988


In article <134 at iquery.UUCP>, matt at iquery.UUCP (Matt Reedy) writes:

> The problem is the following:  I want the same source to compile on both
> SysV and VMS, so I use this style:

> #ifdef VAX
> #include file
> #include stdio
> #else
> #include <fcntl.h>
> #include <stdio.h>
> #endif

> On the VAX, the '#include file' and '#include stdio' syntax is valid and
> references members of a text library.  However, my 3B2 cpp chokes on these
> lines with 'bad include syntax' even though the symbol VAX is NOT DEFINED.

The VAX/VMS C Compiler uses '#include module' to read header files out of
a text library, where they are stored in compressed form and thus takes 
less disk space. It can also use the normal '#include <file>' and
'#include "file"' directives to include files. This does not work in older
versions of the VMS C Compiler, but if you have a maintenace contract, you
would be able to upgrade fairly easy.

The solution I used and my former place of employment, was to simply extract
the header files from the text library and place them in a directory, as
described in the manual.

Good luck.
_______________________________________________________________________________
Robert Claeson                          Tel:   +46 8-7300300
PVAB                                    Fax:   +46 8-7301567
P.O. Box 4040                           Eunet: robert at pvab.se
S-171 04 Solna, Sweden                  Uucp:  {uunet,mcvax}!enea!pvab!robert



More information about the Comp.lang.c mailing list