Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site sftri.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxb!mhuxm!sftig!sftri!boris From: boris@sftri.UUCP (B.Altman) Newsgroups: net.lang.c Subject: Re: Can #define `token-string' be empty? Message-ID: <363@sftri.UUCP> Date: Sun, 24-Feb-85 20:13:45 EST Article-I.D.: sftri.363 Posted: Sun Feb 24 20:13:45 1985 Date-Received: Wed, 27-Feb-85 06:59:22 EST References: <151@cci-bdc.UUCP> <282@cmu-cs-k.ARPA> Organization: AT&T Bell Laboratories, Summit N.J. Lines: 22 > > #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