From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 119610 invoked by alias); 8 Aug 2019 15:39:00 -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 119602 invoked by uid 89); 8 Aug 2019 15:39:00 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-8.5 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=backward, Red 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:38:59 +0000 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0A7D830BA070; Thu, 8 Aug 2019 15:38:58 +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 C8A335C205; Thu, 8 Aug 2019 15:38:57 +0000 (UTC) Received: by calimero.vinschen.de (Postfix, from userid 500) id 740BCA80704; Thu, 8 Aug 2019 17:38:56 +0200 (CEST) Date: Thu, 08 Aug 2019 15:39: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: <20190808153856.GK11632@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> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="gkEBo/XPSfx+3zOU" Content-Disposition: inline In-Reply-To: <1565277057-20621-1-git-send-email-joel@rtems.org> User-Agent: Mutt/1.11.3 (2019-02-01) X-SW-Source: 2019/txt/msg00437.txt.bz2 --gkEBo/XPSfx+3zOU Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 1654 Hi Joel, I just noticed another problem in terms of using this (partially) with Cygwin: 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; 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 ... > +#define FE_DFL_ENV fe_dfl_env_p If you change the name here, Cygwin will not be able to use > diff --git a/newlib/libm/fenv/fe_dfl_env.c b/newlib/libm/fenv/fe_dfl_env.c > [...] this file as storage for the default environment so as not to break backward compatibility with existing executables. > + * This is a non-functional implementation that should be overridden > + * by an architecture specific implementation in newlib/libm/machine/ARC= H. > + * > + * 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; 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. Thanks, Corinna --=20 Corinna Vinschen Cygwin Maintainer Red Hat --gkEBo/XPSfx+3zOU Content-Type: application/pgp-signature; name="signature.asc" Content-length: 833 -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEoVYPmneWZnwT6kwF9TYGna5ET6AFAl1MQhAACgkQ9TYGna5E T6A8gw/5Abed6miBtccpbiocVIfY7Ei4gXBy50IiNQc4ZDdheGzf+0JgrWJhgcQT 94VqiBsNb4qS4SJPIN8JFK7ORz7MlgbtnBt4gvtKGFQBqE0dcIXhEllxPAyYnGcS dmhElzp3qi3uC03Rblg5aPir+/Ev2VYjNDqqYfolGSMUvomdhJg3sZR2pt0qgUWk SLp2gguf6YTfOAI7lVnlJ5XO2UjuPH/0zx0G4xmGC7443ij2BgewqG3m/ChYcqVc nQ/NBHqOVZXu5B5pjwke+wnCVNxrEwIBvXhmmOyYFM18bTpPoJ/j5USu1uHiwSom O3iVfJxWTzgvLF4jTKvzXguGlYyZ7mkWg3Y49bawwj/qTqNd8cjIUAejIWX1bQ9P WaWsj6hqEEaKvNB+gxswwe+sVGK7sQ5kitaQAoCToJgTz1xgrDcYGS+1XrCxHbT5 68RkndPE+VBlWFw5ekcTuihJRQK6nrFb4zK341fO+KdF+sg2UWLSFhO3eo55BPPM 50QVrESpE8uD5aOGg/54GeZw5DT5yFdSwprB1NRlNjQQ5Fk833LhBb1LyEf7Pj8d YrjkBXsa9UQfmBfDvJTiWXHRNQbluAwii9J/d3OnKJ2DCA7BRur+9wjynAWMtrNa DrGH5LxZRvYdzB+Uh7JpLEOWE4rmudLnSnUEcJDavaCEdYf5N9I= =BdCG -----END PGP SIGNATURE----- --gkEBo/XPSfx+3zOU--