diff options
author | Vincent Dagonneau <v@vda.io> | 2023-03-04 15:26:03 +0100 |
---|---|---|
committer | Paul E. McKenney <paulmck@kernel.org> | 2023-03-20 08:45:21 -0700 |
commit | c34da317e0466815d7f43cbd81b3380a11a45b52 (patch) | |
tree | 5239cbd881998dd60786699498bc0b09e39e59e1 /tools/include/nolibc/stdint.h | |
parent | d548e9ae07162e2904b72345a60a9e3e7df4709e (diff) |
tools/nolibc: add stdint.h
Nolibc works fine for small and limited program however most program
expect integer types to be defined in stdint.h rather than std.h.
This is a quick fix that moves the existing integer definitions in std.h
to stdint.h.
Signed-off-by: Vincent Dagonneau <v@vda.io>
Reviewed-by: Thomas Weißschuh <linux@weissschuh.net>
Signed-off-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'tools/include/nolibc/stdint.h')
-rw-r--r-- | tools/include/nolibc/stdint.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tools/include/nolibc/stdint.h b/tools/include/nolibc/stdint.h new file mode 100644 index 000000000000..4ba264031df9 --- /dev/null +++ b/tools/include/nolibc/stdint.h @@ -0,0 +1,24 @@ +/* SPDX-License-Identifier: LGPL-2.1 OR MIT */ +/* + * Standard definitions and types for NOLIBC + * Copyright (C) 2023 Vincent Dagonneau <v@vda.io> + */ + +#ifndef _NOLIBC_STDINT_H +#define _NOLIBC_STDINT_H + +typedef unsigned char uint8_t; +typedef signed char int8_t; +typedef unsigned short uint16_t; +typedef signed short int16_t; +typedef unsigned int uint32_t; +typedef signed int int32_t; +typedef unsigned long long uint64_t; +typedef signed long long int64_t; +typedef unsigned long size_t; +typedef signed long ssize_t; +typedef unsigned long uintptr_t; +typedef signed long intptr_t; +typedef signed long ptrdiff_t; + +#endif /* _NOLIBC_STDINT_H */ |