From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29298 invoked by alias); 8 Aug 2019 15:42:35 -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 29289 invoked by uid 89); 8 Aug 2019 15:42:34 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-8.6 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,SPF_HELO_PASS autolearn=ham version=3.3.1 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; Thu, 08 Aug 2019 15:42:33 +0000 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C2C8380F6D; Thu, 8 Aug 2019 15:42:32 +0000 (UTC) Received: from calimero.vinschen.de (ovpn-116-213.ams2.redhat.com [10.36.116.213]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 900A3F6DA; Thu, 8 Aug 2019 15:42:32 +0000 (UTC) Received: by calimero.vinschen.de (Postfix, from userid 500) id 541B8A80704; Thu, 8 Aug 2019 17:42:31 +0200 (CEST) Date: Thu, 08 Aug 2019 15:42:00 -0000 From: Corinna Vinschen To: joel@rtems.org Cc: newlib@sourceware.org Subject: Re: [PATCH v5 2/3] Add default implementation of fenv.h and all methods Message-ID: <20190808154231.GN11632@calimero.vinschen.de> Reply-To: newlib@sourceware.org Mail-Followup-To: joel@rtems.org, newlib@sourceware.org References: <1565277057-20621-1-git-send-email-joel@rtems.org> <20190808153856.GK11632@calimero.vinschen.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="DcnznOculh5cIxbp" Content-Disposition: inline In-Reply-To: <20190808153856.GK11632@calimero.vinschen.de> User-Agent: Mutt/1.11.3 (2019-02-01) X-SW-Source: 2019/txt/msg00438.txt.bz2 --DcnznOculh5cIxbp Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 1880 On Aug 8 17:38, Corinna Vinschen wrote: > Hi Joel, >=20 > I just noticed another problem in terms of using this (partially) > with Cygwin: >=20 > On Aug 8 10:10, joel@rtems.org wrote: > > + * NOTE: The extern'ed variable fe_default_env_p is an implementation > > + * detail of this stub. FE_DFL_ENV must point to an instance of > > + * fenv_t with the default fenv_t. The format of fenv_t and where > > + * FE_DFL_ENV is are implementation specific. > > + */ > > +extern const fenv_t *fe_dfl_env_p; >=20 > Can we please rename this pointer to _fe_dfl_env, as it's already > defined in Cygwin? The reason is that this pointer is exported > into user space via ... >=20 > > +#define FE_DFL_ENV fe_dfl_env_p >=20 > If you change the name here, Cygwin will not be able to use ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Make that "If you don't use the _fe_dfl_env name here..." > > diff --git a/newlib/libm/fenv/fe_dfl_env.c b/newlib/libm/fenv/fe_dfl_en= v.c > > [...] >=20 > this file as storage for the default environment so as not to break > backward compatibility with existing executables. >=20 > > + * This is a non-functional implementation that should be overridden > > + * by an architecture specific implementation in newlib/libm/machine/A= RCH. > > + * > > + * The implmentation must defined FE_DFL_ENV to point to a default > > + * environment of type fenv_t. > > + */ > > +const fenv_t fe_dfl_env =3D { 0 }; > > +const fenv_t *fe_dfl_env_p =3D &fe_dfl_env; >=20 > The funny thing here is, that this file could be used by all targets, > regardless of the definition of fenv_t, without the need to redefine it > per target. Only Cygwin couldn't. It would have to provide it's own, > even if the Cygwin code itself gets moved to i386 and x86_64, unless > fe_dfl_env_p is renamed to _fe_dfl_env. Sorry, Corinna --=20 Corinna Vinschen Cygwin Maintainer Red Hat --DcnznOculh5cIxbp Content-Type: application/pgp-signature; name="signature.asc" Content-length: 833 -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEoVYPmneWZnwT6kwF9TYGna5ET6AFAl1MQucACgkQ9TYGna5E T6DhuQ/+NDIQyhaabQ1J0sZx2UGu08e3ynyLknmJobRZOs0MoW/dKlS31eqpcdhe FTSgG3PHv+AUtcw/oT8kXeq4lK97axiDjH3c8aLOXL2imHhWc4g8rWkJkWvgupl5 rPyEOZmXIJPkUhECWhVhHosMAUfqauWx+/oakQLYgFN8WAvn66iBTEJ4Q82o1lMG t3PM1ekVeOavHRYWpprj2j2r1VeSXVAL7g5ltErwawJyNVqWQGSOGzCIjULoLD6O 74dkbmmK1rRmllo5NBNnL+mImDhF0N5rYaCoQFLoAR+AKhy66ZWAIhNg/7KpLf3M jiGTcwlamxDPldAzWHtXJpvalLBz9rsmHRoPx2DfozloI/y2turnQ/zxWNZ3CMgD bTZIPeWwsdJqrTtqG8xHFfEp2PWgf9WL1g1dLgpq517qDZI9bXBGyMOJss9vwnHA ZLystE1smHwugF3+bwuCuXdZofGE7hTDtOvs9QEAdtAVBOfz1u20zbQkObnr7CQo A2BGNugRUfIDXkKGu5cRalkLMRt6MWxmwYtFdkJ1Wxzi4j8nkfpSFnW38zJYIA0c 1eBRCMm+C56v/kSRtgVo8HjMZC6NSInSdxyHT4YM7WIqVRA5NYto0NoEUiEsXt3E JAuHiuqOMGhD6Dz+kP7bqguOWt6c/F43yVqV+BJ22tonA2MCBic= =CFjk -----END PGP SIGNATURE----- --DcnznOculh5cIxbp--