Fixes to be LP64 correct
authorChris Lattner <sabre@nondot.org>
Thu, 18 Jul 2002 00:15:29 +0000 (00:15 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 18 Jul 2002 00:15:29 +0000 (00:15 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2950 91177308-0d34-0410-b5e6-96231b3b80d8

runtime/GCCLibraries/libc/memory.c
runtime/GCCLibraries/libc/string.c

index 404c81a86393c314b59ac268765997bb3b1b93b5..560c6dae1da7c4d2af54a6ca7456a2257a3b6ae6 100644 (file)
@@ -6,9 +6,9 @@
 
 #include <stdlib.h>
 
-void *malloc(unsigned);
+void *malloc(size_t);
 void free(void *);
-void *memset(void *, int, unsigned);
+void *memset(void *, int, size_t);
 
 void *calloc(size_t nelem, size_t elsize) {
   void *Result = malloc(nelem*elsize);
index ac00ed40c33a24e8db1350ba81a388f0f550b646..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;