[PATCH] Add fenv.h and support.
Fri Sep 10 20:31:00 GMT 2010
This patch adds fenv.h and the related support routines in the Cygwin DLL.
It's an entirely unencumbered implementation that I wrote from scratch using
only the public docs for reference. We've been missing this for a while, what
with PR323 and all, and if we add it in we'll be able to switch on the new
decimal-floating-point features in the compiler. (Amongst I'm sure many other
* Makefile.in (DLL_OFILES): Add new fenv.o module.
(fenv_CFLAGS): New flags definition for fenv.o compile.
* autoload.cc (std_dll_init): Use fenv.h functions instead of direct
manipulation of x87 FPU registers.
* crt0.c (mainCRTStartup): Likewise.
* cygwin.din (feclearexcept, fegetexceptflag, feraiseexcept,
fesetexceptflag, fetestexcept, fegetround, fesetround, fegetenv,
feholdexcept, fesetenv, feupdateenv, fegetprec, fesetprec,
feenableexcept, fedisableexcept, fegetexcept, _feinitialise,
_fe_dfl_env, _fe_nomask_env): Export new functions and data items.
* fenv.cc: New file.
* posix.sgml: Update status of newly-implemented APIs.
* include/fenv.h: Likewise related header.
* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
Testing: well, I'm running the GCC testsuite against it to verify it builds
functioning decimal floating point code, and I've manually tested some of the
simple functionality like setting the exceptions on and off. That's all so
far, but I think it's close enough (and given that it's new functionality) to
check in and fix any bugs that crop up on HEAD. (I'd like to also see if I
can run some of the LSB or Posix verification testsuites against it, but I
don't know what's involved in that yet; if anyone has any experience with any
of that stuff, I'd appreciate being dropped a note off-list with a few pointers.)
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 28132 bytes
Desc: not available
More information about the Cygwin-patches