From 72c89a1e0fc5ecd52d4e8746779d65d5a5b374bc Mon Sep 17 00:00:00 2001 From: Pavel Kirienko Date: Wed, 7 May 2014 14:04:31 +0400 Subject: [PATCH] Autodetect for UAVCAN_TOSTRING default value --- libuavcan/include/uavcan/impl_constants.hpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libuavcan/include/uavcan/impl_constants.hpp b/libuavcan/include/uavcan/impl_constants.hpp index 7be734fc16..726691a32f 100644 --- a/libuavcan/include/uavcan/impl_constants.hpp +++ b/libuavcan/include/uavcan/impl_constants.hpp @@ -76,7 +76,12 @@ * It might make sense to remove toString() methods for an embedded system */ #ifndef UAVCAN_TOSTRING -# define UAVCAN_TOSTRING 1 +// Objective is to make sure that we're NOT on a resource constrained platform +# if __linux__ || __linux || __APPLE__ || _WIN64 || _WIN32 +# define UAVCAN_TOSTRING 1 +# else +# define UAVCAN_TOSTRING 0 +# endif #endif #if UAVCAN_TOSTRING