29 lines
1.5 KiB
Diff
29 lines
1.5 KiB
Diff
See https://gitlab.com/embeddable-common-lisp/ecl/-/commit/75877dd8f0d534552284ba4380ba65baa74f028f
|
|
|
|
--- src/h/impl/math_fenv.h.orig 2020-04-24 04:54:52.000000000 -0600
|
|
+++ src/h/impl/math_fenv.h 2020-07-06 21:21:09.317821552 -0600
|
|
@@ -72,15 +72,14 @@
|
|
|
|
#if defined(HAVE_FENV_H) && !defined(ECL_AVOID_FPE_H)
|
|
# if defined(HAVE_FEENABLEEXCEPT)
|
|
-# define ECL_WITH_LISP_FPE_BEGIN do { \
|
|
- fenv_t __fenv; \
|
|
- fegetenv(&__fenv); \
|
|
- cl_env_ptr __the_env = ecl_process_env_unsafe(); \
|
|
- if (__the_env) { \
|
|
- int bits = __the_env->trap_fpe_bits; \
|
|
- fedisableexcept(FE_ALL_EXCEPT & ~bits); \
|
|
- feenableexcept(FE_ALL_EXCEPT & bits); \
|
|
- } \
|
|
+# define ECL_WITH_LISP_FPE_BEGIN do { \
|
|
+ fenv_t __fenv; \
|
|
+ fegetenv(&__fenv); \
|
|
+ if (ecl_get_option(ECL_OPT_BOOTED) > 0) { \
|
|
+ int bits = ecl_process_env()->trap_fpe_bits; \
|
|
+ fedisableexcept(FE_ALL_EXCEPT & ~bits); \
|
|
+ feenableexcept(FE_ALL_EXCEPT & bits); \
|
|
+ } \
|
|
feclearexcept(FE_ALL_EXCEPT);
|
|
# else
|
|
# define ECL_WITH_LISP_FPE_BEGIN do { \
|