*** empty log message ***
[oota-llvm.git] / runtime / GCCLibraries / libc / string.c
index f697dd4d19ade2010546a6ac02a3bef08c796611..5c9625dc637eba473436b1dd05fd5b5e4586165a 100644 (file)
@@ -5,17 +5,17 @@
 //===----------------------------------------------------------------------===//
 
 #include <stdlib.h>
-void *malloc(unsigned);
+void *malloc(size_t);
 void free(void *);
 
-unsigned strlen(const char *Str) {
-  int Count = 0;
+size_t strlen(const char *Str) {
+  size_t Count = 0;
   while (*Str) { ++Count; ++Str; }
   return Count;
 }
 
 char *strdup(const char *str) {
-  int Len = strlen(str);
+  long Len = strlen(str);
   char *Result = (char*)malloc((Len+1)*sizeof(char));
   memcpy(Result, str, Len+1);
   return Result;
@@ -26,6 +26,11 @@ char *strcpy(char *s1, const char *s2) {
   return s1;
 }
 
+char *strcat(char *s1, const char *s2) {
+  strcpy(s1+strlen(s1), s2);
+  return s1;
+}
+
 
 /* Compare S1 and S2, returning less than, equal to or
    greater than zero if S1 is lexicographically less than,