Xref: utzoo comp.lang.c:11746 comp.os.vms:7872 Path: utzoo!attcan!uunet!mcvax!enea!pvab!robert From: robert@pvab.UUCP (Robert Claeson) Newsgroups: comp.lang.c,comp.os.vms Subject: Re: cpp compatiblity Unix/VMS Keywords: cpp #include VMS Message-ID: <293@pvab.UUCP> Date: 7 Aug 88 12:16:45 GMT References: <134@iquery.UUCP> Organization: Statskonsult Programvaruhuset AB, Sweden Lines: 34 In article <134@iquery.UUCP>, matt@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 > #include > #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 ' 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@pvab.se S-171 04 Solna, Sweden Uucp: {uunet,mcvax}!enea!pvab!robert