Xref: utzoo comp.lang.c:11728 comp.os.vms:7845 Path: utzoo!attcan!uunet!husc6!uwvax!oddjob!gargoyle!att!chinet!jkingdon From: jkingdon@chinet.chi.il.us (James Kingdon) Newsgroups: comp.lang.c,comp.os.vms Subject: Re: cpp compatiblity Unix/VMS Summary: Here's a not-so-elegant but not too bad solution Message-ID: <6222@chinet.chi.il.us> Date: 6 Aug 88 02:28:52 GMT References: <134@iquery.UUCP> Reply-To: jkingdon@chinet.chi.il.us (James Kingdon) Organization: Chinet - Public Access Unix Lines: 31 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. Well, one way around is #ifdef VAX #include #else #include #include #endif and in vaxstuff.h #include file #include stdio A non-vax system V.2 has no problems with this. (By the way, VAX includes Ultrix, not just VMS. Not that this necessarily matters in this case).