Re: [PATCH v6 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 11:27, [email protected] wrote:
> +/*
> + * 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.
> + */
> +static const fenv_t fe_dfl_env = { 0 };
> +const fenv_t *_fe_dfl_env = &fe_dfl_env;

Bummer.  This doesn't work.  The problem is that Cygwin needs to
initialize fe_dfl_env, like this:

  fegetenv (&fe_dfl_env);

However, even if I drop `const' as in Cygwin, if fe_dfl_env is static
I can't access it from the _feinitialise() function at DLL init time.

I'm not quite sure how to fix this.  Any ideas?  Do I have to drop
the idea to reuse this file and we need our own target-specific one?


Corinna


P.S.: Apart from this problem we can use this now.  We should just add
the GNU specific FE_NOMASK_ENV soon, too.

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEoVYPmneWZnwT6kwF9TYGna5ET6AFAl1McnMACgkQ9TYGna5E
T6B2zg//WUGUUriogG9/sB/LCEkg3m03dusZ28QHX7IUz8AOPOP3rsZI6CacNg4M
BnxSYJ6tyjn448UUoiCWGHojCwyajKccHKDSkyLUV5mVbyJBpAzyL1WMNBQqZkms
Z/g52RRPMW/8Q3z04gXC68rKrrkcTh31mhhZ9k1OELyKVVl9ySXj0cpSkx/3ssre
iIwRfL+f7whcpwgGfTAaFgZxSWNHZR8V3vJi+fs/wJToOvh+TEdATmTy1F+OrqGv
ZPsv3LXhe050e5YKRem4FNiGyps5YE5f6xX7BDS0fygkkqitjwq+J6Zrnp5yjl2T
U1DoyLUnZ/TnO/Wmud6szgwRPADO8GOVgo08uIGaCc0/mCZuJLNfXNrM1M367w/i
eXQWGXHrcaXeGhuaNHYiqDdAwVu7bdIxqWvkccD9rqhvDZ23dFaiCjx04C+eY+jK
yFlSpCvi9tr9AzxrkNk8R/9hvhpPK/t3+enozq6FVs4RQ4JPgWGHeiExXsYqPT0p
4E/isi5xqvA7olx9eFVjb1U0zqQHuA5ZQXsxXMGsHJSQrFmhGWwPm2sJIFoSohMI
KaXwwo+SMV3+txF75Opc9jorvWMaZsXojpw+b3n8KiAsV/8fLQC2mLucR4cavDga
pbTOL8kDuUn1X+BWgi60ARqxGswntZ+dIF9Zapi7fzIQxC1Vy+Q=
=7XG0
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.