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]> |
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 > 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. Thanks, Corinna -- Corinna Vinschen Cygwin Maintainer Red Hat
signature.asc
(application/pgp-signature, 833 B)
-----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-----