X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f From: Message-Id: <200311050038.hA50cEoS001039@speedy.ludd.luth.se> Subject: Re: C99 Functions Under Development and Checkout In-Reply-To: <3FA80338.C83BB2BD@phekda.freeserve.co.uk> "from Richard Dawe at Nov 4, 2003 07:51:20 pm" To: djgpp-workers AT delorie DOT com Date: Wed, 5 Nov 2003 01:38:14 +0100 (CET) X-Mailer: ELM [version 2.4ME+ PL78 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-MailScanner: Found to be clean Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk According to Richard Dawe: > An "identifier with external linkage" in this case would be a global variable. > > I guess the two options you have are: > > (1) In a new source module define a library internal function to return the > error-handling status. E.g.: > > #include > > static const int __math_errhandling = MATH_ERRNO|MATH_ERREXCEPT; > > int __get_math_errhandling (void) > { > return __math_errhandling; > } > > Then in define the macro to call the function: > > extern int __get_math_errhandling(void); > #define math_errhandling (__get_math_errhandling()); > > (2) Just define the macro: > > #define math_errhandling (MATH_ERRNO|MATH_ERREXCEPT) (3) just define the variable: : extern int math_errhandling; /* Perhaps with const too. */ some/path/math_err.c: int math_errhandling = SOME_VALUE; ? Right, MartinS