C Style [check cpp symbol to decide file inclusion]

Paul Lew lew at gsg.UUCP
Fri Jan 13 12:37:48 AEST 1989


In article <2688 at ficc.uu.net> peter at ficc.uu.net (Peter da Silva) writes:
>graphics.h:
>	#ifndef GRAPHICS_H
>	#define GRAPHICS_H
>	...
>	#endif

This is a typical C hack.

Sometimes ago when we were porting X11R2 to MSDOS environment, we found out
that it took a LONG time to compile every file.  One reason was because there
were lots of this kind of mechanism in X11R2 include files.  This will make
programmers' life easier but really slow down the compilation time.  For
complicated software system like X, many include files will be read and
then ignored for every cc.

My personal opinion: I will try not to use it if possible and hope that
sometime someone will give us a better solution.
-- 
Paul Lew			{oliveb,harvard,decvax}!gsg!lew	(UUCP)
General Systems Group, 5 Manor Parkway, Salem, NH 03079	(603) 893-1000



More information about the Comp.lang.c mailing list