summaryrefslogtreecommitdiff
path: root/src/string/strcpy.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/string/strcpy.c')
-rw-r--r--src/string/strcpy.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/string/strcpy.c b/src/string/strcpy.c
new file mode 100644
index 00000000..7675e9ce
--- /dev/null
+++ b/src/string/strcpy.c
@@ -0,0 +1,16 @@
+#include <string.h>
+
+char *__stpcpy(char *, const char *);
+
+char *strcpy(char *dest, const char *src)
+{
+#if 1
+ __stpcpy(dest, src);
+ return dest;
+#else
+ const unsigned char *s = src;
+ unsigned char *d = dest;
+ while ((*d++ = *s++));
+ return dest;
+#endif
+}