ANSI C -- site identification

Martin Minow minow at decvax.UUCP
Wed Dec 17 10:25:57 AEST 1986


Commenting on my suggestion for some mechanism for site identification,
Doug Gwyn (@ brl.smoke.arpa) notes problems with
	int	sun;
(when sun was #defined).  One hackish solution would be to define the site as
	#define	sun	sun
Infinite expansion is prevented by the restriction in page 79, line 33ff.

My off the wall suggestion to extend preprocessing to allow strings
(assuming it's workable), solves the problem by defining __PROCESSOR__
(etc.) symbols that have implmentation-defined *string* content.
Thus, there is no registry that assigns numbers to implementors.
Since implementors generally trademark their names, there's no
real risk of spoofing.

Again, sorry about the length.

Martin Minow
decvax!minow



More information about the Comp.lang.c mailing list