mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@libc.org>
To: musl@lists.openwall.com
Subject: Re: Wrong wcsnrtombs return value and positive NaNs printing
Date: Fri, 19 Dec 2014 00:19:36 -0500	[thread overview]
Message-ID: <20141219051936.GY4574@brightrain.aerifal.cx> (raw)
In-Reply-To: <20141218191252.GS4574@brightrain.aerifal.cx>

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


  reply	other threads:[~2014-12-19  5:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-18 17:20 Oleg Ranevskyy
2014-12-18 19:12 ` Rich Felker
2014-12-19  5:19   ` Rich Felker [this message]
2014-12-18 19:13 ` Szabolcs Nagy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141219051936.GY4574@brightrain.aerifal.cx \
    --to=dalias@libc.org \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).