From 46ff94e64da78baa9be856c7dc95b7cbf8935ef5 Mon Sep 17 00:00:00 2001 From: Henrik Stickann <4376396-Mithradir@users.noreply.gitlab.com> Date: Sun, 24 Apr 2022 13:41:53 +0200 Subject: [PATCH] Add printf implementation switch --- include/sta/printf.hpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 include/sta/printf.hpp diff --git a/include/sta/printf.hpp b/include/sta/printf.hpp new file mode 100644 index 0000000..7074460 --- /dev/null +++ b/include/sta/printf.hpp @@ -0,0 +1,22 @@ +/** + * @brief Compatibility layer for different `printf` implementations. + */ +#ifndef STA_PRINTF_HPP +#define STA_PRINTF_HPP + +#include + +#if !defined(STA_PRINTF_USE_STDLIB) && !defined(STA_PRINTF_USE_MPALAND) +# error "No printf implementation chosen!" +#endif // !STA_PRINTF_USE_STDLIB && !STA_PRINTF_USE_MPALAND + + +#ifdef STA_PRINTF_USE_STDLIB +# include +#endif // STA_PRINTF_USE_STDLIB +#ifdef STA_PRINTF_USE_MPALAND +# include +#endif // STA_PRINTF_USE_MPALAND + + +#endif // STA_PRINTF_HPP