cpp compatiblity Unix/VMS
James Kingdon
jkingdon at chinet.chi.il.us
Sat Aug 6 12:28:52 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.
Well, one way around is
#ifdef VAX
#include <vaxstuff.h>
#else
#include <fcntl.h>
#include <stdio.h>
#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).
More information about the Comp.lang.c
mailing list