lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20251102132128.27221-1-w@1wt.eu>
Date: Sun,  2 Nov 2025 14:21:28 +0100
From: Willy Tarreau <w@....eu>
To: linux@...ssschuh.net
Cc: shuah@...nel.org, linux-kernel@...r.kernel.org, Willy Tarreau <w@....eu>
Subject: [PATCH v3] tools/nolibc: add the more portable inttypes.h

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 nolibc.h to better support these
programs.

Signed-off-by: Willy Tarreau <w@....eu>
---
v3:
- include nolibc.h instead of stdint.h from inttypes.h so that everything
  is known at once. Just like with limits.h, this file is nothing more
  than a convenience for users to port applications and doesn't provide
  anything, so there's no point including it from nolibc.h

 tools/include/nolibc/Makefile   | 1 +
 tools/include/nolibc/inttypes.h | 2 ++
 2 files changed, 3 insertions(+)
 create mode 100644 tools/include/nolibc/inttypes.h

diff --git a/tools/include/nolibc/Makefile b/tools/include/nolibc/Makefile
index 585937c7d346..ff0e646acda9 100644
--- a/tools/include/nolibc/Makefile
+++ b/tools/include/nolibc/Makefile
@@ -33,6 +33,7 @@ all_files := \
 		errno.h \
 		fcntl.h \
 		getopt.h \
+		inttypes.h \
 		limits.h \
 		math.h \
 		nolibc.h \
diff --git a/tools/include/nolibc/inttypes.h b/tools/include/nolibc/inttypes.h
new file mode 100644
index 000000000000..8db9c2542b44
--- /dev/null
+++ b/tools/include/nolibc/inttypes.h
@@ -0,0 +1,2 @@
+/* SPDX-License-Identifier: LGPL-2.1 OR MIT */
+#include "nolibc.h"
-- 
2.17.5


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ