Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 13208 invoked from network); 17 May 2004 10:54:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 17 May 2004 10:54:57 -0000 Received: (qmail 932 invoked by uid 500); 17 May 2004 10:54:55 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 864 invoked by uid 500); 17 May 2004 10:54:55 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 847 invoked by uid 98); 17 May 2004 10:54:54 -0000 X-Qmail-Scanner-Mail-From: rbb@rkbloom.net via hermes.apache.org X-Qmail-Scanner: 1.20 (Clear:RC:0(24.211.145.52):. Processed in 0.106355 secs) Date: Mon, 17 May 2004 06:36:27 -0400 (EDT) From: To: Cliff Woolley cc: Stas Bekman , APR Development Subject: Re: rc and errno in apr api In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Rating: hermes.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N On Sun, 16 May 2004, Cliff Woolley wrote: > On Sun, 16 May 2004, Stas Bekman wrote: > > > What I'm after is having APR API specify which apr functions have errno set, > > so one can rely on that and not do guessing which can change in the future. > > My gut reaction is that if we actually /need/ errno to be set to glean > useful information about what happened, we did something wrong in choosing > which apr_status_t's could be returned from that function. Cliff is correct, but I would go one step further. Any APR api that is setting errno is doing so by chance. It would be perfectly valid (although stupid) for us to add errno=0 at the end of every APR function. Also, for portability reasons, you really can't rely on errno at all. Windows only uses it sporatically, and for every function in APR (including apr_file_open) there are some paths that will set errno and others that won't. Ryan