From 5db066eb5184cc45e7634838b5b0b8c67cb2ae25 Mon Sep 17 00:00:00 2001 From: Danny Holman Date: Wed, 5 Jun 2024 13:47:01 -0500 Subject: libc: create a skeleton libc and build targets Create build targets for a skeleton libc that only includes enough functionality to get a cross compiler running. Signed-off-by: Danny Holman --- include/stdint.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 include/stdint.h (limited to 'include/stdint.h') diff --git a/include/stdint.h b/include/stdint.h new file mode 100644 index 0000000..4f6e71d --- /dev/null +++ b/include/stdint.h @@ -0,0 +1,32 @@ +#ifndef STDINT_H +#define STDINT_H + +#include + +#define INT8_MIN (-1-0x7F) +#define INT16_MIN (-1-0x7FFF) +#define INT32_MIN (-1-0x7FFFFFFF) +#define INT64_MIN (-1-0x7FFFFFFFFFFFFFFF) + +#define INT8_MAX (0x7F) +#define INT16_MAX (0x7FFF) +#define INT32_MAX (0x7FFFFFFF) +#define INT64_MAX (0x7FFFFFFFFFFFFFFF) + +#define UINT8_MAX (0xFF) +#define UINT16_MAX (0xFFFF) +#define UINT32_MAX (0xFFFFFFFF) +#define UINT64_MAX (0xFFFFFFFFFFFFFFFF) + +#define INT_FAST8_MIN INT8_MIN +#define INT_FAST64_MIN INT64_MIN + +#define INT_FAST8_MAX INT8_MAX +#define INT_FAST64_MAX INT64_MAX + +#define INT_LEAST8_MIN INT8_MIN +#define INT_LEAST16_MIN INT16_MIN +#define INT_LEAST32_MIN INT32_MIN +#define INT_LEAST64_MIN INT64_MIN + +#endif -- cgit v1.2.3