Newsgroups: comp.lang.c
Path: utzoo!utgpu!jarvis.csri.toronto.edu!champlain.dgp!flaps
From: flaps@dgp.toronto.edu (Alan J Rosenthal)
Subject: Re: Reporting errors from local libraries
Message-ID: <1989Jun14.155928.19245@jarvis.csri.toronto.edu>
Organization: Dynamic Graphics Project, University of Toronto
References: <9449@alice.UUCP> <Jun.8.14.27.29.1989.6740@math.rutgers.edu> <186@cbnewsd.ATT.COM> <25447@agate.BERKELEY.EDU>


bks@ALFA.berkeley.edu ( Brad Sherman ) writes:
>Where is the actual space for "errno" allocated?
>
>If one has N libraries ...
>and one wishes, say, to set an (extern)
>integer "Localerrno" to provide additional info on failure ...
>where exactly should the single instance
>of "int Localerrno" appear?

In its own .c file, in the one of these libraries considered lowest level
(included by all programs that include any of them).  Actually, I would guess
it would be possible to include this .c file in all N libraries, and it would
be fished out of the first one that needed it.

ajr

--
"The winners write the history books."
