From 1b21d0f98f4828cab04be80e8fb95e68a0ab323e Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Sat, 26 Jul 2025 11:37:29 +1000 Subject: [PATCH] AP_HAL: add sanity check people are not still defining ALLOW_DOUBLE_MATH_FUNCTIONS --- libraries/AP_HAL/AP_HAL_Macros.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libraries/AP_HAL/AP_HAL_Macros.h b/libraries/AP_HAL/AP_HAL_Macros.h index e3a112d801..79dce9a33a 100644 --- a/libraries/AP_HAL/AP_HAL_Macros.h +++ b/libraries/AP_HAL/AP_HAL_Macros.h @@ -6,6 +6,10 @@ macros to allow code to build on multiple platforms more easily */ +#ifdef ALLOW_DOUBLE_MATH_FUNCTIONS +#error ALLOW_DOUBLE_MATH_FUNCTIONS has been replaced with AP_MATH_ALLOW_DOUBLE_FUNCTIONS (which must be defined). So replace "define ALLOW_DOUBLE_MATH_FUNCTIONS" with "define AP_MATH_ALLOW_DOUBLE_FUNCTIONS 1" +#endif // ALLOW_DOUBLE_MATH_FUNCTIONS + #ifndef AP_MATH_ALLOW_DOUBLE_FUNCTIONS /* allow double maths on Linux and SITL to avoid problems with system headers