summaryrefslogtreecommitdiff
path: root/include/string.h
diff options
context:
space:
mode:
authorstefan <stefan@s00.xyz>2023-04-21 19:53:04 -0400
committerstefan <stefan@s00.xyz>2023-04-21 19:53:04 -0400
commiteff82c45c589b42061344039d5f2efc8ad7c52df (patch)
tree4c5d89eea3fa74caba5d3dbfb8567643f3747e6d /include/string.h
parent821706a3fea34c18a6171cf5169d5d6d852966de (diff)
downloadsv-eff82c45c589b42061344039d5f2efc8ad7c52df.tar.gz
libfdt port and the required libc functions
Diffstat (limited to 'include/string.h')
-rw-r--r--include/string.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/include/string.h b/include/string.h
index a8edd63..5e06af7 100644
--- a/include/string.h
+++ b/include/string.h
@@ -2,7 +2,18 @@
#define _STRING_H
#include <stddef.h>
+#define NULL ((void*)0)
-void *memset(void *s, int c, size_t n);
+extern void *memcpy(void *__restrict, const void *__restrict, size_t);
+void *memmove(void *, const void *, size_t);
+void *memset(void *, int, size_t);
+int memcmp(const void *, const void *, size_t);
+void *memchr(const void *, int, size_t);
+char *strchr(const char *, int);
+char *strrchr(const char*, int);
+
+//size_t strlen(const char *);
+#define strlen(s) __builtin_strlen(s)
+#define strnlen(s, n) __builtin_strnlen(s, n)
#endif /* _STRING_H */