Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!bu-cs!purdue!haven!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn ) Newsgroups: comp.std.c Subject: Re: What is the domain of strerror()? Message-ID: <9997@smoke.BRL.MIL> Date: 6 Apr 89 22:10:56 GMT References: <1249@microsoft.UUCP> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 13 In article <1249@microsoft.UUCP> w-colinp@microsoft.uucp (Colin Plumb) writes: >It says that strerror() maps the error number passed to it to an error >string, but I can't find any description of what a valid error number is. That's easy; anything the standard says is an error number is allowed, and anything else is up to the implementation. I.e. the non-zero value of errno, as set by some functions according to the standard, is an acceptable "error number" for strerror(). Presumably any other non-zero value that the implementation assigns to arrno is also acceptable to strerror(). The Rationale refers you to perror(), 4.9.10.4, where this connection is clearer.