Add skeleton libc definition
[bootloader-ap.git] / include / string.h
diff --git a/include/string.h b/include/string.h
new file mode 100644 (file)
index 0000000..f46b8cf
--- /dev/null
@@ -0,0 +1,57 @@
+/*
+  libc string and memory functions
+  Copyright (c) 2010 TJ <linux@tjworld.net>
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program (See the COPYRIGHT file the base directory).
+    If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef __STRING_H
+#define __STRING_H
+
+#include <stddef.h> // for size_t
+
+char    *strcpy(char *s1, const char *s2);
+size_t   strlen(const char *s1);
+int      strcmp(const char *s1, const char *s2);
+char    *strcat(char *s1, const char *s2);
+int      strncmp(const char *s1, const char *s2, size_t n);
+char    *strchr(const char *str, int c);
+int      __strcmp(const char *s1, const char *s2);
+void    *memset(void *p, int c, size_t n);
+void    *memcpy(void *p1, const void *p2, size_t n);
+void    *memmove(void *p1, const void *p2, size_t n);
+int      memcmp(const void *p1, const void *p2, size_t n);
+
+/*
+  These functions are unused and not defined
+
+void    *memccpy(void *, const void *, int, size_t);
+void    *memchr(const void *, int, size_t);
+int      strcoll(const char *, const char *);
+size_t   strcspn(const char *, const char *);
+char    *strdup(const char *);
+char    *strerror(int);
+char    *strncat(char *, const char *, size_t);
+char    *strncpy(char *, const char *, size_t);
+char    *strpbrk(const char *, const char *);
+char    *strrchr(const char *, int);
+size_t   strspn(const char *, const char *);
+char    *strstr(const char *, const char *);
+char    *strtok(char *, const char *);
+char    *strtok_r(char *, const char *, char **);
+size_t   strxfrm(char *, const char *, size_t);
+*/
+
+#endif