[PATCH] Add fenv.h and support.

Christopher Faylor cgf-use-the-mailinglist-please@cygwin.com
Fri Sep 10 21:44:00 GMT 2010

On Fri, Sep 10, 2010 at 09:53:28PM +0100, Dave Korn wrote:
>    Hi folks,
>  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.)

Looks nice to me with one HUGE caveat:  Please maintain the pseudo-sorted
order in cygwin.din.  Sorry to have to impose this burden on you.

Other than that, please check in and thanks for the patch.  It was obviously
a lot of work.


More information about the Cygwin-patches mailing list