From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/6737 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: Wrong wcsnrtombs return value and positive NaNs printing Date: Fri, 19 Dec 2014 00:19:36 -0500 Message-ID: <20141219051936.GY4574@brightrain.aerifal.cx> References: <20141218191252.GS4574@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1418966397 5705 80.91.229.3 (19 Dec 2014 05:19:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 19 Dec 2014 05:19:57 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-6750-gllmg-musl=m.gmane.org@lists.openwall.com Fri Dec 19 06:19:51 2014 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1Y1pyg-0003n1-Rt for gllmg-musl@m.gmane.org; Fri, 19 Dec 2014 06:19:50 +0100 Original-Received: (qmail 21745 invoked by uid 550); 19 Dec 2014 05:19:49 -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 21737 invoked from network); 19 Dec 2014 05:19:48 -0000 Content-Disposition: inline In-Reply-To: <20141218191252.GS4574@brightrain.aerifal.cx> User-Agent: Mutt/1.5.21 (2010-09-15) Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:6737 Archived-At: On Thu, Dec 18, 2014 at 02:12:52PM -0500, Rich Felker wrote: > On Thu, Dec 18, 2014 at 08:20:00PM +0300, Oleg Ranevskyy wrote: > > Hello musl community, > > > > I encountered two problems with musl when running the LLVM libc++ tests > > linked against it. > > > > 1. The wcsnrtombs function returns the number of converted wide chars > > instead of the dst length in bytes. "cnt++;" at the of the function should > > actually be "cnt += l;". > > This looks like you're correct, especially considering it's cnt+=l in > the first loop. I'll recheck it and fix if I confirm. Thanks. Fixed. > > 2. If a NaN value is printed by vfprintf and the MARK_POS flag is set to > > add '+' to positive values, musl doesn't add '+'. I found the following > > statement on the musl web page: "Quiet nans are treated equally (there is > > only one logical nan value, it is printed as "nan", the library does not > > care about the sign and payload of nan)". However, Linux libc adds '+', > > boost also has special support for this. Absence of the sign breaks one of > > the LLVM libc++ tests. Is this a subject for change? > > Based on my reading of the spec I think you're right that it should be > there. I can fix this. Fixed. Rich