Re: Source file structure for fenv.h support
Corinna Vinschen <[email protected]>
| Newsgroups | gmane.comp.lib.newlib |
|---|---|
| Message-ID | <[email protected]> |
On Jul 29 13:48, Joel Sherrill wrote: > Hi > > Vaibhav is looking at porting *BSD fenv support for a few more > architectures. Right now, it looks like there is only SPU and RISC-V > support with this structure: > > - libc/machine/ARCH/include/fenv.h - portable POSIX interface, includes > sys/fenv.h > - libc/machine/ARCH/include/sys/fenv.h - architecture specific details. > > I think (but have not confirmed) that the RISC-V version is correct per > POSIX. The SPU version clearly is not as it does not have the right > signature for most of the methods as they all are supposed to return int > and not void. > > My proposal is to verify the RISC-V include/fenv.h is POSIX correct and > then move it to libc/include/fenv.h.For completeness, we may need a > minimal, non-functional sys/fenv.h which defines dummy fexcept_t and fenv_t > structures. But it becomes the responsibility of a port to provide > <sys/fenv.h> and implementations. > > In the event a port provides the entire implementation as inlines, it can > override fenv.h. > > Does this make sense? Is it a good approach? I want to avoid duplicating a > pure POSIX version of fenv.h like RISC-V has. Sounds good to me, but please don't forget the Cygwin version of fenv.h. It's sys parts are basically the x86/x86_64 variation of the same, and it's pretty complete, including glibc-only and BSD-only functions. Corinna -- Corinna Vinschen Cygwin Maintainer Red Hat
signature.asc
(application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEoVYPmneWZnwT6kwF9TYGna5ET6AFAl0/86gACgkQ9TYGna5E T6ChExAAphXVn+T6uunPQnFul9XkF7c5h/TcY8oj8mKYaTU/VvRgUV4GZbDRtXnP kQUqMhYfMjGOLNfgzBRk9Gak5rMTBMIJzvwi1luLpokYZK9xaAbHp9S7mJPcwqMS oQq09xe4ik+OTuCOQ20tl7kErN4VHVQ5UOHnpIxgSEEaKeYIPhaZw57w5iHFkz7X 7fJPDhP/vqO1sX5R4UbO0RqUHNyfStPUSAk6CKMYazKLoLanaj8iDidy0IFT5otr JG80/Dm0nqwSWebjGOFlW0aWZOZT0m8OBP9jhC9Uvu7wY299RryZKK0y9Oseu2uP SnJk1xOW++admlP0TtuyEcuLTwuGfw5qLaFTWvc5Gzis2873/rH4yutjqXsoAPfu XkCfUEU5SVRYmi7YjC2O1Kc2REm36FpBOn/oq0igg/KIpXZhsfKYbP0nGMgDQ09o Kw2huLUzWiW2KQZGih/3VdkOQNTT7PMCF7HgtkEPvzrtbT4monzUVFMd0s8MfoSt K5iaycGuBG3Qh8Chuaoy35zO375Dr/notLBdbz4Vefi6eiUWpmxyfAHtE5QSj+/9 cWwW0UPehM6kYqqfsdx3vmK4zh4K73Kbzds+NX0rP9/tcRY93j/r06BIJ5twbuja J7kyUq6HwGDMK36OgMeTYP0mmfmkc/qfkhfekHaTHSGs1eWUmBo= =0Me0 -----END PGP SIGNATURE-----