summaryrefslogtreecommitdiff
path: root/include/fenv.h
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2018-12-27 14:28:23 +0000
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2018-12-27 14:28:23 +0000
commitdc3064332cec5ca6edc9a44f5f6111e506eb037b (patch)
tree79686327822b075f3970aec7ef73372142760047 /include/fenv.h
parent86af500777f45066aa6a6817d4b695cf4b626c38 (diff)
parent963c37d5c0eb62b38f8764b23931c0dcdd497a13 (diff)
Merge commit 'refs/top-bases/cvs/exc2signal-template' into cvs/exc2signal-template
Diffstat (limited to 'include/fenv.h')
-rw-r--r--include/fenv.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/fenv.h b/include/fenv.h
index de4d46f8b7..76679e1e18 100644
--- a/include/fenv.h
+++ b/include/fenv.h
@@ -42,6 +42,21 @@ struct rm_ctx
fenv_t env;
bool updated_status;
};
+
+/* Track whether rounding mode macros were defined, since
+ get-rounding-mode.h may define default versions if they weren't.
+ FE_TONEAREST must always be defined (even if no changes of rounding
+ mode are supported, glibc requires it to be defined to represent
+ the default rounding mode). */
+# ifndef FE_TONEAREST
+# error "FE_TONEAREST not defined"
+# endif
+# if defined FE_DOWNWARD || defined FE_TOWARDZERO || defined FE_UPWARD
+# define FE_HAVE_ROUNDING_MODES 1
+# else
+# define FE_HAVE_ROUNDING_MODES 0
+# endif
+
#endif
#endif