diff options
author | Chris Lattner <sabre@nondot.org> | 2002-07-18 00:15:29 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-07-18 00:15:29 +0000 |
commit | 4f6a098c8411314b555d0cc899762b68744f2253 (patch) | |
tree | a534489437bb2bb8f2aee9080b25a7b0e6b6ecab /llvm/runtime/GCCLibraries/libc/string.c | |
parent | d9f4ac6680c5a46f331d75457056a970a2f22395 (diff) | |
download | bcm5719-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.c | 8 |
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; |