Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!bu.edu!mirror!ima!haddock!karl From: karl@haddock.ima.isc.com (Karl Heuer) Newsgroups: comp.lang.c Subject: Re: shared memory Message-ID: <18184@haddock.ima.isc.com> Date: 25 Sep 90 03:47:33 GMT References: <1990Sep21.183326.13116@DRD.Com> <13991@hydra.gatech.EDU> <1990Sep24.135530.405@DRD.Com> Reply-To: karl@kelp.ima.isc.com (Karl Heuer) Distribution: na Organization: Interactive Systems, Cambridge, MA 02138-5302 Lines: 11 In article <1990Sep24.135530.405@DRD.Com> mark@DRD.Com (Mark Lawrence) writes: >[In response to a complaint about code using `strerror()'] >The following thanks to Chris Torek: >const char *strerror(int err) { ... } The prototype is wrong: strerror() returns an unqualified `char *' according to the ANS. The characters are *not* constant: out-of-range error values are stored in a buffer that gets overwritten by subsequent calls. (Acceptable behavior, but incompatible with the declaration.) Karl W. Z. Heuer (karl@kelp.ima.isc.com or ima!kelp!karl), The Walking Lint