tools/nolibc: add stdarg.h header
authorThomas Weißschuh <linux@weissschuh.net>
Wed, 30 Aug 2023 15:07:12 +0000 (17:07 +0200)
committerThomas Weißschuh <linux@weissschuh.net>
Thu, 12 Oct 2023 19:13:52 +0000 (21:13 +0200)
commitb56a9492d058ac93252e4373f8c87c69df6912ff
tree4305ff360e951745ecd7345d658e729c557a00ed
parent921992229b1f06df6b649860e4a5f3def1489866
tools/nolibc: add stdarg.h header

This allows nolic to work with `-nostdinc` avoiding any reliance on
system headers.

The implementation has been lifted from musl libc 1.2.4.
There is already an implementation of stdarg.h in include/linux/stdarg.h
but that is GPL licensed and therefore not suitable for nolibc.

The used compiler builtins have been validated to be at least available
since GCC 4.1.2 and clang 3.0.0.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Signed-off-by: Willy Tarreau <w@1wt.eu>
tools/include/nolibc/Makefile
tools/include/nolibc/nolibc.h
tools/include/nolibc/stdarg.h [new file with mode: 0644]
tools/include/nolibc/stdio.h
tools/include/nolibc/sys.h