summaryrefslogtreecommitdiff
path: root/lib/mlibc/options/posix/include/strings.h
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2024-03-07 17:28:00 -0500
committerIan Moffett <ian@osmora.org>2024-03-07 17:28:32 -0500
commitbd5969fc876a10b18613302db7087ef3c40f18e1 (patch)
tree7c2b8619afe902abf99570df2873fbdf40a4d1a1 /lib/mlibc/options/posix/include/strings.h
parenta95b38b1b92b172e6cc4e8e56a88a30cc65907b0 (diff)
lib: Add mlibc
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'lib/mlibc/options/posix/include/strings.h')
-rw-r--r--lib/mlibc/options/posix/include/strings.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/lib/mlibc/options/posix/include/strings.h b/lib/mlibc/options/posix/include/strings.h
new file mode 100644
index 0000000..a21c3d7
--- /dev/null
+++ b/lib/mlibc/options/posix/include/strings.h
@@ -0,0 +1,32 @@
+
+#ifndef _STRINGS_H
+#define _STRINGS_H
+
+#include <bits/size_t.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef __MLIBC_ABI_ONLY
+
+char *index (const char *s, int c);
+char *rindex(const char *s, int c);
+
+int ffs(int word);
+int strcasecmp(const char *a, const char *b);
+int strncasecmp(const char *a, const char *b, size_t size);
+
+/* Marked as obsolete in posix 2008 but used by at least tracker */
+int bcmp(const void *s1, const void *s2, size_t n);
+void bcopy(const void *s1, void *s2, size_t n);
+void bzero(void *s, size_t n);
+
+#endif /* !__MLIBC_ABI_ONLY */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // _STRINGS_H
+