C Compiler under Unix System VR4

Steve Friedl friedl at mtndew.Tustin.CA.US
Wed Oct 10 00:54:32 AEST 1990


In article <125 at alfrat.uucp>, roy at alfrat.uucp (Roy Phillips) writes:
> The standard header files supplied with AT&T's UNIX System V Release 4.2
> contains pre-processor commands such as the following:
> 
>    #if #machine(pdp11)
> 

I think you mean the C Programming Utilities Issue 4.2 -- SVR4.2 isn't out yet.

These are assertions, and they are intended to create a new namespace (!)
for compile-time constants and things that are environment-specific.  They
are set with

	# assert foo
	# assert machine(pdp11)

and tested with

	# if #foo
	# if #machine(pdp11)

The # notation doesn't mess up any current syntaxes.  The assertions
can be turned on individually from the command line or all of the
pre-asserted ones turned of en mas.  The 3B2 ANSI compiler pre-asserts:

	#assert system(unix)
	#assert CPU(M32)
	#assert machine(u3b2)

but there is no way to turn just one of these pre-asserts off from
the command line (or at least there wasn't in the alpha version).
I hope they have fixed this by now.

     Steve

-- 
Stephen J. Friedl, KA8CMY / I speak for me only / Tustin, CA / 3B2-kind-of-guy
+1 714 544 6561  / friedl at mtndew.Tustin.CA.US  / {uunet,attmail}!mtndew!friedl

"No job is too big, no fee is too big" - Gary W. Keefe's company motto



More information about the Comp.unix.questions mailing list