diff options
author | Alex Bennée <alex.bennee@linaro.org> | 2024-05-30 12:23:31 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2024-05-30 15:30:01 +0100 |
commit | b6867fb35c8dfc69a1fec25412b9bf1fe422d201 (patch) | |
tree | 2427e7cc8c5befbab81f26cf1bac1ca8f4f3c113 | |
parent | 0b64b4d86cf31b9cbf492a26b2a760e4fb6b2069 (diff) |
update includes for bare metal compiling
We shouldn't use <string.h> for our own implementation. Also the base
types we need live in <stdint.h> as <inttypes.h> doesn't exist for the
bare metal compilers.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20240530112332.1439238-3-alex.bennee@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r-- | semihosting.c | 4 | ||||
-rw-r--r-- | semihosting.h | 2 | ||||
-rw-r--r-- | string.c | 2 | ||||
-rw-r--r-- | usertest.c | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/semihosting.c b/semihosting.c index 7a0ee0c..27dafbe 100644 --- a/semihosting.c +++ b/semihosting.c @@ -16,8 +16,8 @@ * from this software without specific prior written permission. */ -#include <inttypes.h> -#include <string.h> +#include <stdint.h> +#include "string.h" #include "semihosting.h" int semi_open(char const *filename, int mode) diff --git a/semihosting.h b/semihosting.h index 06cda8d..68344fb 100644 --- a/semihosting.h +++ b/semihosting.h @@ -19,7 +19,7 @@ #ifndef SEMIHOSTING_H #define SEMIHOSTING_H -#include <inttypes.h> +#include <stdint.h> #define SYS_OPEN 1 #define OPEN_RDONLY 1 @@ -16,7 +16,7 @@ * from this software without specific prior written permission. */ -#include <string.h> +#include "string.h" static void *__memmove_down(void *__dest, __const void *__src, size_t __n) { @@ -20,7 +20,7 @@ * from this software without specific prior written permission. */ -#include <stdio.h> +#include "string.h" #include "semihosting.h" #include "printf/printf.h" |