summaryrefslogtreecommitdiffstats
path: root/llvm/runtime/GCCLibraries/libc/string.c
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-07-18 00:15:29 +0000
committerChris Lattner <sabre@nondot.org>2002-07-18 00:15:29 +0000
commit4f6a098c8411314b555d0cc899762b68744f2253 (patch)
treea534489437bb2bb8f2aee9080b25a7b0e6b6ecab /llvm/runtime/GCCLibraries/libc/string.c
parentd9f4ac6680c5a46f331d75457056a970a2f22395 (diff)
downloadbcm5719-llvm-4f6a098c8411314b555d0cc899762b68744f2253.tar.gz
bcm5719-llvm-4f6a098c8411314b555d0cc899762b68744f2253.zip
Fixes to be LP64 correct
llvm-svn: 2950
Diffstat (limited to 'llvm/runtime/GCCLibraries/libc/string.c')
-rw-r--r--llvm/runtime/GCCLibraries/libc/string.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/runtime/GCCLibraries/libc/string.c b/llvm/runtime/GCCLibraries/libc/string.c
index ac00ed40c33..5c9625dc637 100644
--- a/llvm/runtime/GCCLibraries/libc/string.c
+++ b/llvm/runtime/GCCLibraries/libc/string.c
@@ -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;
OpenPOWER on IntegriCloud