From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/146 Path: news.gmane.org!not-for-mail From: =?UTF-8?B?THVrYSBNYXLEjWV0acSH?= Newsgroups: gmane.linux.lib.musl.general Subject: Re: cluts: Incorrect test expectations in buf module (errno) Date: Wed, 13 Jul 2011 19:01:29 +0200 Message-ID: <4E1DCF69.4020102@gmail.com> References: <20110713135124.GC16618@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1310576603 13391 80.91.229.12 (13 Jul 2011 17:03:23 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 13 Jul 2011 17:03:23 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-230-gllmg-musl=m.gmane.org@lists.openwall.com Wed Jul 13 19:03:20 2011 Return-path: Envelope-to: gllmg-musl@lo.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by lo.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1Qh2qG-00026R-06 for gllmg-musl@lo.gmane.org; Wed, 13 Jul 2011 19:03:20 +0200 Original-Received: (qmail 26202 invoked by uid 550); 13 Jul 2011 17:03:19 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 26176 invoked from network); 13 Jul 2011 17:03:07 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=0FV+H8anY5rhPAh+qBf8Eg8mdF+7KVVTbCK7GnSLGxc=; b=rTM4gjomKiEdtIK0+TKmo26lGwms9e1e/wN+rwk7g+4J/xGWY328/Nnuvszg/1S1g7 vWB0ANAwdMzZTk8kqMpeOq6kHs/QE4guVotARqYREXYIxhgEmBUNUMN/2tP61OL9xO37 RS0nx2dRX41geteUp10+8/FaSx7ccBt1SzofM= User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110626 Icedove/3.1.11 In-Reply-To: <20110713135124.GC16618@brightrain.aerifal.cx> Xref: news.gmane.org gmane.linux.lib.musl.general:146 Archived-At: On 07/13/2011 03:51 PM, Rich Felker wrote: > Hi, > It seems cluts' buf module is surprised that strerror_r and ttyname_r > did not set errno to ERANGE. However these functions are not specified > to report anything in errno. Instead they return the error code > directly. This is an unfortunate inconsistency created in the early > days of "reentrant" (_r) functions due to confusion over whether errno > could be safely used in multithreaded programs. Note that some other > functions which return error codes directly are: > > posix_* (posix_memalign etc.) > pthread_* > > Rich Thanks, fixed (will push changes when I hear about SA_NODEFER). I guess when you write your own implementation of those, you get to know them intimately ;-) Luka.