Can #define `token-string' be empty?

B.Altman boris at sftri.UUCP
Mon Feb 25 11:13:45 AEST 1985


> 
> #ifndef EXTERN
> #define EXTERN extern
> #endif
> 
> Then the include file should contain declaratons of this form:
> 
> EXTERN int global_int;
> EXTERN struct marsupial *wombat;
> 
> Including the file normally causes these to be external declarations, that
> is, no space is allocated for the variables.  Then, in the source file where
> you want to actually have the variables' storage allocated, you just say
> 
> #define EXTERN
> #include "whatever.h"

This is not necessary on System V release 2 C compiler. You can omit extern
everywhere. ld will be able to handle those constructs.

			Boris Altman
			{ucbvax,ihnp4}!attunix!boris



More information about the Comp.lang.c mailing list