From: "Laurent Bercot" <ska-dietlibc@skarnet.org>
To: musl@lists.openwall.com
Subject: Re: [PATCH] scanf: handle the L modifier for integers
Date: Thu, 31 May 2018 14:20:19 +0000 [thread overview]
Message-ID: <em0161a10d-2175-4b96-9d2d-d14cd675eef9@elzian> (raw)
In-Reply-To: <20180531064719.6805-1-avagin@virtuozzo.com>
>Without this patch, ret will be 1 and mask will be 0. It is obviously
>incorrect. According to the man page, L should work like ll:
>
>L Indicates that the conversion will be either e, f, or g and the
> next pointer is a pointer to long double or the conversion will
> be d, i, o, u, or x and the next pointer is a pointer to long
> long.
This is a GNU extension. POSIX states that L is only valid before
a floating-point conversion specifier:
L
Specifies that a following a, A, e, E, f, F, g, or G conversion
specifier
applies to an argument with type pointer to long double.
from
http://pubs.opengroup.org/onlinepubs/9699919799/functions/scanf.html
So, it is valid for musl not to accept %Lx.
Now, the argument that it's a good idea to align musl's behaviour to
glibc's whenever possible is a sensible one. But it's a decision for
the musl authors to make, and the pros and cons need to be carefully
balanced; musl's current behaviour is not _incorrect_.
--
Laurent
next prev parent reply other threads:[~2018-05-31 14:20 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-31 6:47 Andrei Vagin
2018-05-31 14:20 ` Laurent Bercot [this message]
2018-05-31 19:00 ` Andrei Vagin
2018-05-31 20:44 ` Natanael Copa
2018-05-31 21:21 ` Andrei Vagin
2018-05-31 23:44 ` Rich Felker
2018-06-01 0:30 ` Szabolcs Nagy
2018-06-01 0:59 ` Rich Felker
2018-06-01 7:36 ` Andrei Vagin
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=em0161a10d-2175-4b96-9d2d-d14cd675eef9@elzian \
--to=ska-dietlibc@skarnet.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).