1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-21 04:23:50 +01:00
Marian Buschsieweke 54f4cd7cd1
sys/matstat: fix compilation with newlib
newlib (nano) does not support 64 bit types (neither in stdio nor with
corresponding `PRI*64` macros). With GCC 13.2.1 (as shipped in Ubuntu
24.04.1 LTS), this triggers the following compilation error (even with
`ENABLE_DEBUG == 0`):

    sys/matstat/matstat.c:57:21: error: expected ')' before 'PRIu64'
       57 |     DEBUG("Var: (%" PRIu64 " / (%" PRId32 " - 1)) = %" PRIu64 "\n",
          |                     ^~~~~~

This fixes the issue by falling back to printing 32 bit values when
the `PRIu64` macro is not defined. A `!trunc` is appended when the
64 bit exceeds the range of [0:UINT32_MAX].
2024-10-09 22:23:40 +02:00
..
2024-06-11 18:26:14 +02:00
2024-10-09 13:03:52 +02:00
2024-10-02 22:17:08 +02:00
2024-02-09 15:24:22 +01:00
2024-05-15 11:20:38 +02:00
2023-08-31 14:38:49 +02:00