Re: [PATCH v2 2/4] tools/nolibc: add the more portable inttypes.h
From: Willy Tarreau
Date: Sun Nov 02 2025 - 06:20:09 EST
On Sun, Nov 02, 2025 at 12:04:01PM +0100, Thomas Weißschuh wrote:
> On 2025-11-02 11:46:09+0100, Willy Tarreau wrote:
> > It's often recommended to only use inttypes.h instead of stdint.h for
> > portability reasons since the former is always present when the latter
> > is present, but not conversely, and the former includes the latter. Due
> > to this some simple programs fail to build when including inttypes.h.
> > Let's add one that simply includes stdint.h to better support these
> > programs.
> >
> > Signed-off-by: Willy Tarreau <w@xxxxxx>
> > ---
> > tools/include/nolibc/Makefile | 1 +
> > tools/include/nolibc/inttypes.h | 8 ++++++++
> > 2 files changed, 9 insertions(+)
> > create mode 100644 tools/include/nolibc/inttypes.h
>
> I think this should also interact with the big nolibc.h.
> Both being included from it and including it itself, to follow the
> generally used pattern.
>
You mean you'd prefer "include nolibc.h" from inttypes and
"include inttypes" from nolibc, that's it ?
Willy