# define FE_INEXACT FP_X_IMP
# endif
+# ifndef FE_ALL_EXCEPT
+# define FE_ALL_EXCEPT \
+ (FE_DIVBYZERO | FE_INEXACT | FE_INVALID | FE_OVERFLOW | FE_UNDERFLOW)
+# endif
+
/* FP_X_IOV? */
# ifndef HAVE_FEXCEPT_T
/* This isn't right -- it doesn't necessarily actually raise the
exception until some floating-point operation is performed. */
# define feraiseexcept(excepts) \
- ((fpsetsticky ((fpgetsticky ()) || (FE_ALL_EXCEPT & (excepts)))), 0)
+ ((fpsetsticky ((fpgetsticky ()) | (FE_ALL_EXCEPT & (excepts)))), 0)
# endif
# ifndef HAVE_FEGETEXCEPTFLAG
# ifndef HAVE_FEENABLEEXCEPT
# define HAVE_FEENABLEEXCEPT
# define feenableexcept(excepts) \
- (fpsetmask ((fpgetmask ()) || (FE_ALL_EXCEPT & (excepts))))
+ (fpsetmask ((fpgetmask ()) | (FE_ALL_EXCEPT & (excepts))))
# endif
# ifndef HAVE_FEDISABLEEXCEPT