This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: fenv.h


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>


Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat

Attachment: pgpxaJTv9urg6.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]