diff options
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | string.h | 16 |
2 files changed, 17 insertions, 1 deletions
@@ -57,7 +57,7 @@ monitor.o: $(MONITOR) $(CC) $(CPPFLAGS) -c -o $@ $< %.o: %.c - $(CC) $(CPPFLAGS) -O2 -ffreestanding -Ilibfdt -c -o $@ $< + $(CC) $(CPPFLAGS) -O2 -ffreestanding -I. -Ilibfdt -c -o $@ $< model.lds: $(LD_SCRIPT) Makefile $(CC) $(CPPFLAGS) -E -P -C -o $@ $< diff --git a/string.h b/string.h new file mode 100644 index 0000000..f1aebdf --- /dev/null +++ b/string.h @@ -0,0 +1,16 @@ +#ifndef STRING_H +#define STRING_H + +#include <stddef.h> + +extern void *(memcpy)(void *__dest, __const void *__src, size_t __n); +extern void *(memmove)(void *__dest, __const void *__src, size_t __n); +extern void *(memchr)(void const *s, int c, size_t n); +extern size_t (strlen)(const char *s); +extern void *(memset)(void *s, int c, size_t count); +extern int (memcmp)(void const *p1, void const *p2, size_t n); +extern int (strcmp)(char const *s1, char const *s2); +extern int (strncmp)(char const *s1, char const *s2, size_t n); +extern char *(strchr)(char const *s, int c); + +#endif |