From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9028 invoked by alias); 11 Jul 2017 09:06:07 -0000 Mailing-List: contact newlib-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: newlib-owner@sourceware.org Received: (qmail 9007 invoked by uid 89); 11 Jul 2017 09:06:06 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 11 Jul 2017 09:06:04 +0000 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8198C3D95F for ; Tue, 11 Jul 2017 09:06:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 8198C3D95F Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=vinschen@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 8198C3D95F Received: from calimero.vinschen.de (ovpn-116-16.ams2.redhat.com [10.36.116.16]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2707460BE5 for ; Tue, 11 Jul 2017 09:06:03 +0000 (UTC) Received: by calimero.vinschen.de (Postfix, from userid 500) id DB18BA805DC; Tue, 11 Jul 2017 11:06:01 +0200 (CEST) Date: Tue, 11 Jul 2017 09:06:00 -0000 From: Corinna Vinschen To: newlib@sourceware.org Subject: Re: Importing inttypes methods from FreeBSD Message-ID: <20170711090601.GD30071@calimero.vinschen.de> Reply-To: newlib@sourceware.org Mail-Followup-To: newlib@sourceware.org References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="7DO5AaGCk89r4vaK" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.8.0 (2017-02-23) X-SW-Source: 2017/txt/msg00584.txt.bz2 --7DO5AaGCk89r4vaK Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 3447 On Jul 11 08:58, Aditya Upadhyay wrote: > Hello Developers, >=20 > I have ported these inttypes methods from FreeBSD. I am requesting you > to please review the same and suggest me changes. Nope, sorry, patch 3 is no-go. Adding the infrastructure from xlocale_private.h is not the right thing to do. You're adding a completely new way of doing stuff, which is differently implemented in newlib already. The thread-local stuff is in the reent struct, which also points to thread local locale info. States for multibyte/wide char conversion are already kept in reent. Use those. If something's missing, add it there. > diff --git a/newlib/libc/stdlib/Makefile.am b/newlib/libc/stdlib/Makefile= .am > index ebae00a..bf44953 100644 > --- a/newlib/libc/stdlib/Makefile.am > +++ b/newlib/libc/stdlib/Makefile.am > @@ -33,6 +33,7 @@ GENERAL_SOURCES =3D \ > getenv.c \ > getenv_r.c \ > itoa.c \ > + imaxabs.c \ tab, not spaces > labs.c \ > ldiv.c \ > ldtoa.c \ > [...] > From: Aditya Upadhyay > Date: Mon, 10 Jul 2017 18:41:38 +0530 > Subject: [PATCH 2/4] Importing imaxdiv inttypes method from FreeBSD. >=20 > --- > newlib/libc/stdlib/Makefile.am | 1 + > newlib/libc/stdlib/imaxdiv.c | 44 ++++++++++++++++++++++++++++++++++++= ++++++ > 2 files changed, 45 insertions(+) > create mode 100644 newlib/libc/stdlib/imaxdiv.c >=20 > diff --git a/newlib/libc/stdlib/Makefile.am b/newlib/libc/stdlib/Makefile= .am > index bf44953..5a50c3a 100644 > --- a/newlib/libc/stdlib/Makefile.am > +++ b/newlib/libc/stdlib/Makefile.am > @@ -34,6 +34,7 @@ GENERAL_SOURCES =3D \ > getenv_r.c \ > itoa.c \ > imaxabs.c \ > + imaxdiv.c \ Same here > labs.c \ > ldiv.c \ > ldtoa.c \ > From 1e914a2098de912d3d0e8c2fb350dd4f9f9b5435 Mon Sep 17 00:00:00 2001 > From: Aditya Upadhyay > Date: Tue, 11 Jul 2017 08:32:42 +0530 > Subject: [PATCH 4/4] Importing strtoimax inttypes methods from FreeBSD. >=20 > --- > newlib/libc/locale/Makefile.am | 2 +- > newlib/libc/stdlib/Makefile.am | 1 + > newlib/libc/stdlib/strtoimax.c | 0 > 3 files changed, 2 insertions(+), 1 deletion(-) > create mode 100644 newlib/libc/stdlib/strtoimax.c >=20 > diff --git a/newlib/libc/locale/Makefile.am b/newlib/libc/locale/Makefile= .am > index 7312654..5f00d72 100644 > --- a/newlib/libc/locale/Makefile.am > +++ b/newlib/libc/locale/Makefile.am > @@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS =3D cygnus >=20=20 > INCLUDES =3D $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS) >=20=20 > -GENERAL_SOURCES =3D setlocale.h locale.c localeconv.c > +GENERAL_SOURCES =3D setlocale.h locale.c localeconv.c xlocale_private.h >=20=20 > ## The following interfaces are EL/IX level 2 > if ELIX_LEVEL_1 > diff --git a/newlib/libc/stdlib/Makefile.am b/newlib/libc/stdlib/Makefile= .am > index 5a50c3a..0f05154 100644 > --- a/newlib/libc/stdlib/Makefile.am > +++ b/newlib/libc/stdlib/Makefile.am > @@ -59,6 +59,7 @@ GENERAL_SOURCES =3D \ > sb_charsets.c \ > strtod.c \ > strtodg.c \ > + strtoimax.c \ Same here > strtol.c \ > strtorx.c \ > strtoul.c \ > diff --git a/newlib/libc/stdlib/strtoimax.c b/newlib/libc/stdlib/strtoima= x.c > new file mode 100644 > index 0000000..e69de29 The function is missing. If it uses the new code from xlocale_private.h, you'll have to reevaluate. Corinna --=20 Corinna Vinschen Cygwin Maintainer Red Hat --7DO5AaGCk89r4vaK Content-Type: application/pgp-signature; name="signature.asc" Content-length: 819 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJZZJT5AAoJEPU2Bp2uRE+gB0YP/jVW/61bAH6lwk73R2bwb+57 GDtVj7jfwf7AbPhovSq6qq5AbJ0PPcCJ6VfGJkNUl4SFtpuv5C/zomlFkKcEiKug /6FuVreXtUfBdk+fHCCBo+wS++6xT1zebcy6GShYd+C2GrKQKZo8RTKppIaMPgre WZzWB7noXp85pdpA9TVitifv27n8TYun/LLhonj60ik/7mNyiwVtqNELSkbhy3Ez 37dAxMlYlYoNsdV6XKqh5ILJ61BCvf7/0MucPpESsg5OXplWciTHMma3NDheEGhH PFlH5UfheaMqNi0XuQxj8JTqMZLtl9+8se/TB6nN0uwcsIO034YhZd7KFRyLR4Tj fdm0lps1e30t9v68CmVcyqM5EIQnLDurNLs9v6QDC8A3llvuTCbrbzVsXVVRir39 Y8jFEJLRmC9ysLRP55ts5rbJSh1iA2x7EkVRCikxp/FlalTYi49+XdZS7MTjWaKT JtzwmTqvOi5OM6OErWKMXZDV3qDcpxRsmwF4TMS8NAhi4sflPFizwVo7lfF4LXQl AxC96D0Of1QD2bo3afMbCT1znFlwnxZVJeWQXe0xspE5/PW1DMtIztnKXv1Z43Ui wrKbg8yKj5BortLNvLvcL5BZ1lOHI3do4OFEdxUeKvk+cutpt4nJkpl8D4RxJvRk YRvuhKscfj48044vYlaA =m1Qh -----END PGP SIGNATURE----- --7DO5AaGCk89r4vaK--