fenv.h

Corinna Vinschen vinschen@redhat.com
Wed Oct 21 01:39:00 GMT 2015


On Oct 20 10:54, Joel Sherrill wrote:
> 
> 
> On 10/20/2015 10:43 AM, Corinna Vinschen wrote:
> >On Oct 20 17:21, Corinna Vinschen wrote:
> >>On Oct 20 08:53, Joel Sherrill wrote:
> >>>
> >>>
> >>>On 10/19/2015 8:34 AM, Corinna Vinschen wrote:
> >>>>On Oct  7 18:49, Stefan Heinzmann wrote:
> >>>>>Hi all,
> >>>>>
> >>>>>I have seen a couple of discussions about fenv.h in the past on this list,
> >>>>>and there seems to be support for fenv.h in newlib for the spu target, but
> >>>>>for no other. As fenv.h belongs to C99, I wonder why that is so. Is fenv.h
> >>>>>support meant to be the responsibility of the C library or of the compiler
> >>>>>support library? What about implementations for the more mainstream
> >>>>>architectures, such as X86 or ARM?
> >>>>
> >>>>I guess the answer is simply that nobody provided them yet, so SPU
> >>>>and Cygwin are the only ones so far.
> >>>
> >>>Is the Cygwin implementation general enough for x86?
> >>
> >>I think so.  It includes two Cygwin-specific headers winsup.h and
> >>wincap.h but both includes are apparently unnecessary.
> >>
> >>Would you like to give it a whirl?  Just take the files
> >>
> >>   winsup/cygwin/fenv.cc
> >>   winsup/cygwin/include/fenv.h
> >>
> >>and in fenv.cc change
> >>
> >>   #include "winsup.h"
> >>   #include "fenv.h"
> >>   #include "errno.h"
> >>   #include "wincap.h"
> >>   #include <string.h>
> >>
> >>to
> >>
> >>   #include "fenv.h"
> >>   #include <errno.h>
> >>   #include <string.h>
> >
> >There's no reason to stick to C++ either, so renaming to fenv.c should
> >be fine with minor style tweaks at worst.
> >
> >If you think this is fine for x86 and x86_64 in general, there's no
> >problem in moving the file to newlib and relicensing to BSD 2-clause.
> >
> 
> Stefan asked about arm and other targets. FreeBSD appears to have
> a lot of targets covered.
> 
> https://github.com/freebsd/freebsd/tree/master/lib/msun
> 
> I will look at the Cygwin version when I get a chance but FreeBSD
> may be a deeper bucket to pull from.

Ideally the x86 and x86_64 versions are compatible with the Cygwin
implementation since we need to stick to this for backward compat and I
wouldn't be too unhappy to move the fenv stuff to newlib, rather than
having two different versions for the same target(s).

As for other targets, we're completely free there to use whatever is
available and tested, of course.


Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/newlib/attachments/20151021/efe2b344/attachment.sig>


More information about the Newlib mailing list