Author Topic: fenv.h "missing"  (Read 1764 times)

Nebuleon

  • Guest
fenv.h "missing"
« on: October 29, 2013, 06:06:27 pm »
I am trying to port a piece of software written in C which uses floating-point rounding modes to the GCW Zero, and one of its headers includes fenv.h to do this. I should say "attempts to use fenv.h to do this", though, because gcc emits the following error when compiling any includer of this header:

Code: [Select]
src/fpu.h:43:20: fatal error: fenv.h: No such file or directory
   #include <fenv.h>
                    ^
compilation terminated.

Now, the toolchain does have some files called fenv.h:

Code: [Select]
[email protected] ~$ find /opt/gcw0-toolchain -name fenv.h
/opt/gcw0-toolchain/usr/mipsel-gcw0-linux-uclibc/include/c++/4.8.1/fenv.h
/opt/gcw0-toolchain/usr/mipsel-gcw0-linux-uclibc/include/c++/4.8.1/tr1/fenv.h

However they're in C++, and the header appears to be incomplete even using g++, because all the rounding modes that should be defined in it are completely absent.

Here's a reduced version of the header:

Code: [Select]
#include <math.h>

#ifdef _MSC_VER
  /* some Visual Studio stuff here */
#else
  #define INLINE static inline
  #include <fenv.h>
#endif

I am using the latest public toolchain as of this writing, released 2013-10-04.

pcercuei

  • ***
  • Posts: 1428
    • My devblog
Re: fenv.h "missing"
« Reply #1 on: October 29, 2013, 08:08:39 pm »
Problem solved. Yeah, we're that fast!
The fix will come in the next toolchain release.

Nebuleon

  • Guest
Re: fenv.h "missing"
« Reply #2 on: October 29, 2013, 09:19:58 pm »
Problem solved. Yeah, we're that fast!
The fix will come in the next toolchain release.
AWWYEA

 

Post a new topic