summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/libm/libm.h5
-rw-r--r--lib/libm_dbl/libm.h5
2 files changed, 8 insertions, 2 deletions
diff --git a/lib/libm/libm.h b/lib/libm/libm.h
index f782249e5..78de4c3ee 100644
--- a/lib/libm/libm.h
+++ b/lib/libm/libm.h
@@ -19,7 +19,10 @@
#include <stdint.h>
#include <math.h>
-#define FLT_EVAL_METHOD 0
+// These lines verify that FLT_EVAL_METHOD==0, MicroPython's libm requires this.
+// If compilation fails here then check the host compiler's FLT_EVAL_METHOD.
+typedef float float_t;
+typedef double double_t;
#define FORCE_EVAL(x) do { \
if (sizeof(x) == sizeof(float)) { \
diff --git a/lib/libm_dbl/libm.h b/lib/libm_dbl/libm.h
index dc0b431a4..cbae69166 100644
--- a/lib/libm_dbl/libm.h
+++ b/lib/libm_dbl/libm.h
@@ -15,7 +15,10 @@
#include <stdint.h>
#include <math.h>
-#define FLT_EVAL_METHOD 0
+// These lines verify that FLT_EVAL_METHOD==0, MicroPython's libm requires this.
+// If compilation fails here then check the host compiler's FLT_EVAL_METHOD.
+typedef float float_t;
+typedef double double_t;
#define FORCE_EVAL(x) do { \
if (sizeof(x) == sizeof(float)) { \