1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-19 03:23:49 +01:00
RIOT/pkg/mpaland-printf/patches/0003-RIOT-integration-Select-features-based-on-modules.patch
Marian Buschsieweke b9b488d6fb
sys/stdio: add printf_long_long
This adds the new `printf_long_long` module that can be used to enable
printing of `long long` and `unsigned long long`.

This has been implemented for `mpaland-printf`. In addition, this module
is a default module for 32-bit and 64-bit systems if `mpaland-printf` is
used, 64 bit support is not too expensive for them. (And on 64-bit
systems support for long long is needed for support of `%p`, which is
pretty basic.)

This is mainly useful for MSP430, where otherwise `mpaland-printf` would
require more memory than newlib's implementation.
2025-04-27 23:37:33 +02:00

42 lines
1.0 KiB
Diff

From 4d6939143a251b93022980a472f2bcd9c42b8573 Mon Sep 17 00:00:00 2001
From: Marian Buschsieweke <marian.buschsieweke@posteo.net>
Date: Sat, 11 May 2024 18:38:51 +0200
Subject: [PATCH 3/4] RIOT integration: Select features based on modules
Using module `printf_float` adds support for printing floats, using
module `printf_long_long` adds support for printing `long long` or
`unsigned long long`.
---
printf.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/printf.c b/printf.c
index d560d2b..6923fee 100644
--- a/printf.c
+++ b/printf.c
@@ -60,8 +60,8 @@
#endif
// support for the floating point type (%f)
-// default: activated
-#ifndef PRINTF_DISABLE_SUPPORT_FLOAT
+// default: deactivated
+#ifdef MODULE_PRINTF_FLOAT
#define PRINTF_SUPPORT_FLOAT
#endif
@@ -84,8 +84,8 @@
#endif
// support for the long long types (%llu or %p)
-// default: activated
-#ifndef PRINTF_DISABLE_SUPPORT_LONG_LONG
+// default: deactivated
+#ifdef MODULE_PRINTF_LONG_LONG
#define PRINTF_SUPPORT_LONG_LONG
#endif
--
2.49.0