Re: [PATCH v5 2/3] Add default implementation of fenv.h and all methods
Corinna Vinschen <[email protected]>
| Newsgroups | gmane.comp.lib.newlib |
|---|---|
| Message-ID | <[email protected]> |
On Aug 8 17:38, Corinna Vinschen wrote: > Hi Joel, > > I just noticed another problem in terms of using this (partially) > with Cygwin: > > On Aug 8 10:10, [email protected] 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 ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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_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/ARCH. > > + * > > + * The implmentation must defined FE_DFL_ENV to point to a default > > + * environment of type fenv_t. > > + */ > > +const fenv_t fe_dfl_env = { 0 }; > > +const fenv_t *fe_dfl_env_p = &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. Sorry, Corinna -- Corinna Vinschen Cygwin Maintainer Red Hat
signature.asc
(application/pgp-signature, 833 B)
-----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-----