From c5a7fe90801eb0c3fb8d5dd7ab07f0c6bd408f74 Mon Sep 17 00:00:00 2001 From: Ryan Pavlik Date: Mon, 24 Sep 2012 11:16:01 -0500 Subject: [PATCH] Add an AVR platform config file to Boost. Signed-off-by: Ryan Pavlik --- boost/config/platform/avr.hpp | 22 ++++++++++++++++++++++ boost/config/select_platform_config.hpp | 4 ++++ 2 files changed, 26 insertions(+) create mode 100644 boost/config/platform/avr.hpp diff --git a/boost/config/platform/avr.hpp b/boost/config/platform/avr.hpp new file mode 100644 index 000000000..8287ec088 --- /dev/null +++ b/boost/config/platform/avr.hpp @@ -0,0 +1,22 @@ +// (C) Copyright Ryan Pavlik 2012 +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// AVR (embedded, with avr-libc) config options: +// (Requires a C++ standard library like STLport - https://github.com/vancegroup/stlport-avr/wiki ) + +#define BOOST_PLATFORM "avr" + +// No wchar_t in avr-libc +#define BOOST_NO_INTRINSIC_WCHAR_T + +// Asserts don't make sense (or work right) in embedded +#define BOOST_DISABLE_ASSERTS + +// Defined by arduino/wiring WString.h +#ifdef F + #undef F +#endif diff --git a/boost/config/select_platform_config.hpp b/boost/config/select_platform_config.hpp index d450c92e5..aeda32828 100644 --- a/boost/config/select_platform_config.hpp +++ b/boost/config/select_platform_config.hpp @@ -76,6 +76,10 @@ #elif defined(__VMS) // VMS: # define BOOST_PLATFORM_CONFIG "boost/config/platform/vms.hpp" + +#elif defined(__AVR__) +// AVR embedded: +# define BOOST_PLATFORM_CONFIG "boost/config/platform/avr.hpp" #else # if defined(unix) \