diff options
| author | Jeff Epler <jepler@unpythonic.net> | 2025-10-13 11:26:54 -0500 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2025-10-23 15:17:37 +1100 |
| commit | 2af0c52a91769077908e24e18d2d9df87aa2eca8 (patch) | |
| tree | 6b147bb59dacc69f0d9e7a2b4754602869e9740d /lib | |
| parent | 007f127a61ea058ca010b85883072bdefe0234c0 (diff) | |
lib/libm_dbl: Allow building when DBL_EPSILON is defined in <float.h>.
This is the case in arm-none-eabi-gcc 14.2.1 (debian trixie).
This fixes a diagnostic like:
../../lib/libm_dbl/libm.h:92:9: error:
"DBL_EPSILON" redefined [-Werror]
/usr/lib/gcc/arm-none-eabi/14.2.1/include/float.h:114:9: note:
this is the location of the previous definition
when building MPS2_AN500 (qemu port).
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/libm_dbl/libm.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libm_dbl/libm.h b/lib/libm_dbl/libm.h index cbae69166..fa49ad1cd 100644 --- a/lib/libm_dbl/libm.h +++ b/lib/libm_dbl/libm.h @@ -89,7 +89,9 @@ do { \ (d) = __u.f; \ } while (0) +#if !defined(DBL_EPSILON) #define DBL_EPSILON 2.22044604925031308085e-16 +#endif int __rem_pio2(double, double*); int __rem_pio2_large(double*, double*, int, int, int); |
