3B2 cpp #ifdef + #include

Matt Reedy matt at iquery.UUCP
Sun Apr 3 01:30:31 AEST 1988


>   #ifdef vms
>   #ifdef foo$bar /* a valid name, in VMS */
>   #endif
>   #endif
> on non-VMS systems is inappropriate, though I haven't yet determined what the
> latest dpANS says about this.
> 
This is exactly the problem which prompted my first posting.  I have some
code which I want to be portable across many systems - VMS being one of them.
So, the code looks like this:

	#ifdef VMS
	#include file
	#endif

where '#include file' is valid Vax-C syntax ('file' is the name of a module
in a standard text library).  The problem is that the 3B2 chokes on that
line, even though VMS is NOT defined.  Oh well...


-- 
Matthew Reedy				harvard!adelie!iquery!matt
Programmed Intelligence Corp.		(512) 822 8703
830 NE Loop 410, Suite 412		"just ONE MORE compile...."
San Antonio, TX  78209-1209



More information about the Comp.lang.c mailing list