Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

fedisableexcept()



By randomness, I found this today (in python-2.7.13):

# less Python-2.7.13/Modules/python.c
/* Minimal main program -- everything is loaded from the library */

#include "Python.h"

#ifdef __FreeBSD__
#include <fenv.h>
#endif

int
main(int argc, char **argv)
{
        /* 754 requires that FP exceptions run in "no stop" mode by default,
         * and until C vendors implement C99's ways to control FP exceptions,
         * Python requires non-stop mode.  Alas, some platforms enable FP
         * exceptions by default.  Here we disable them.
         */
#ifdef __FreeBSD__
        fedisableexcept(FE_OVERFLOW);
#endif
        return Py_Main(argc, argv);
}

The FreeBSD man page and ours like identical. So I think we might need
these ifdef for NetBSD as well. Is that correct?
 Thomas


Home | Main Index | Thread Index | Old Index