cpp compatiblity Unix/VMS

Tan Bronson bronson at mfci.UUCP
Fri Aug 12 06:12:54 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.
<
    try this
#ifdef VAX
#define FILE file
#else
#define FILE <fcntl.h>
#endif
#include FILE

    Most people I mentioned this to, were surprised this worked, so
maybe VMS will not allow it (It broke my makefile generator)
~
>Is there an easy workaround?
>
>matt
>-- 
>Matthew Reedy                 UUCP: {harvard!adelie,gatech!petro}!iquery!matt
>Programmed Intelligence Corp. "Lots of people without brains do alot of talking"
>400 N Loop 1604 E, Suite 330  Scarecrow - "Wizard of Oz"
>San Antonio, TX  78232        (512) 490 6684


Tan Bronson
Multiflow Computer Inc  UUCP(work): {yale,uunet}!mfci!bronson 
175 N Main St 		UUCP(home): {yale,mfci}!bronson!tan 
Branford, Ct 06405	Phone(work):(203)-488-6090 



More information about the Comp.lang.c mailing list