From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 31315 invoked from network); 13 Oct 2021 14:29:01 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 13 Oct 2021 14:29:01 -0000 Received: (qmail 17932 invoked by uid 550); 13 Oct 2021 14:28:59 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 17899 invoked from network); 13 Oct 2021 14:28:58 -0000 IronPort-HdrOrdr: =?us-ascii?q?A9a23=3ATpw9E6yEmFCAgy+Uh+0VKrPwK71zdoMgy1kn?= =?us-ascii?q?xilNoNJuHvBw9vre+8jzuiWetN98YhsdcJW7WZVoIkmskaKdg7N+AV5zZniEhI?= =?us-ascii?q?LAFugL0WKh+V3d8kbFmdK1u50MT4FOTPL5B1QSt7ee3ODBKadD/OW6?= X-IronPort-AV: E=Sophos;i="5.84,326,1620684000"; d="scan'208";a="395796939" Date: Wed, 13 Oct 2021 16:28:45 +0200 From: =?UTF-8?B?SuKCkeKCmeKCmw==?= Gustedt To: "(GalaxyMaster)" Cc: musl@lists.openwall.com Message-ID: <20211013162845.6597e45f@inria.fr> In-Reply-To: <0100017c79f9d219-86b8d3e7-358a-473c-9736-befc0678d7c7-000000@email.amazonses.com> References: <0100017c79f9d219-86b8d3e7-358a-473c-9736-befc0678d7c7-000000@email.amazonses.com> Organization: inria.fr X-Mailer: Claws Mail 3.17.5git22 (GTK+ 2.24.32; x86_64-pc-linux-gnu) X-Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAAXNSR0IArs4c6QAAACRQTFRFERslNjAsLTE9Ok9wUk9TaUs8iWhSrYZkj42Rz6aD3sGZ MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/vZQjNd4e97SWIpNH+im/MWk"; protocol="application/pgp-signature"; micalg=pgp-sha1 Subject: Re: [musl] strtoll() incompatibility --Sig_/vZQjNd4e97SWIpNH+im/MWk Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hello, on Wed, 13 Oct 2021 14:06:27 +0000 you ("(GalaxyMaster)" ) wrote: > Hello, >=20 > I am not a true developer, so I don't have the POSIX standard handy, > hence could not quickly find whether the observed behaviour is > correct or not. I have two systems, one is musl-based and the other > is Glibc-based, so every time I stumble upon something I check > against Glibc. I know that Glibc developers did quite a few bespoke > things, but this particular one made me wonder whether it is a bug in > musl. >=20 > Longs story short, it seems that musl's strto*() set errno when it is > unable to find a legitimate number at the begining of the string: > ... This function is actually in C, but the possible `errno` specification comes seemingly from POSIX: The implementation may also set errno to EINVAL in case no conversion was performed (no digits seen, and 0 returned). J=E2=82=91=E2=82=99=E2=82=9B --=20 :: INRIA Nancy Grand Est ::: Camus ::::::: ICube/ICPS ::: :: ::::::::::::::: office Strasbourg : +33 368854536 :: :: :::::::::::::::::::::: gsm France : +33 651400183 :: :: ::::::::::::::: gsm international : +49 15737185122 :: :: http://icube-icps.unistra.fr/index.php/Jens_Gustedt :: --Sig_/vZQjNd4e97SWIpNH+im/MWk Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQSN9stI2OFN1pLljN0P0+hp2tU34gUCYWbtHgAKCRAP0+hp2tU3 4lOzAJ4/KP/jRuyTdaFVPPIctdMdNbTYFwCePtQicKLvosyxorHgyJ9tq9uXP6U= =IbjE -----END PGP SIGNATURE----- --Sig_/vZQjNd4e97SWIpNH+im/MWk--