New cpp predefines for POSIX/ANSI C

Jim Bigelow jimb at hpfcdc.HP.COM
Thu Feb 23 04:59:40 AEST 1989


I'm looking for comments and consensus of a suggestion for POSIX and
ANSI C conforming equivalents of cpp predefines.  The table below shows
the existing redefined cpp symbols and POSIX/ANSI equivalents with any
discussion.

	Existing 	POSIX/ANSI C 		Discussion
      ------------------------------------------------------------------
	unix		__unix		I see this symbol as being
                                        used to distinguish between
                                        code for different operating
                                        systems.  As such, it would be
                                        very useful when porting if
                                        all implementations agree on a
                                        common POSIX/ANSI C equivalent.     
	mert		__mert
	ibm		__ibm
	gcos		__gcos
	tss		__tss
	etc.

	interdata	__interdata
	pdp11		__pdp11
	u370		__u370
	u3b		__u3b
	u3b5		__u3b5
	vax		__vax
	etc.

	RES		_RES
	RT		_RT
	TS		_TS
	PWB		_PWB
	etc.

Since lint(1) defines the preprocessor symbol lint when it runs cpp, I
don't think that lint should be transformed to __lint --  any comments?

Jim Bigelow
Colorado Language Lab, M.S. 96
Hewlett Packard
3404 E. Harmony Rd.
Ft. Collins, CO  80525
303-229-6251
... !hplabs!hpfcrt!jimb



More information about the Comp.std.c mailing list