[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] Concerning #define SZT_F PRIuMAX
From: |
Ambroz Bizjak |
Subject: |
[lwip-devel] Concerning #define SZT_F PRIuMAX |
Date: |
Sat, 2 Jul 2016 00:59:37 +0200 |
Hi all,
With regard to commit
http://git.savannah.gnu.org/cgit/lwip.git/patch/?id=e6bc591a1e194e7b140e039190bd0468314a261b
I'm sure this is wrong generally and specifically on the many (most?)
32-bit platforms, where size_t is 32-bit but uintmax_t is uint64_t.
As far as I know, the C99 standard has %zu for printing a size_t, but
I know this is a problem to use because you cannot know easily if it
is supported.
However, I think that "#define SZT_F PRIuPTR" has a much better chance
of being right, making the assumption that uintptr_t is the same as
size_t.
Best regards,
Ambroz
- [lwip-devel] Concerning #define SZT_F PRIuMAX,
Ambroz Bizjak <=