aboutsummaryrefslogtreecommitdiffstats
path: root/runtime
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
commitd6c68c417b13e66f3205551708022ef08e43ecf6 (patch)
treeb9d8b577c3d88d515b2306497a7c70bc157a98ce /runtime
parent6183b92b2cae9e04a4d95a965a9b55b7319004fe (diff)
downloadexternal_llvm-d6c68c417b13e66f3205551708022ef08e43ecf6.zip
external_llvm-d6c68c417b13e66f3205551708022ef08e43ecf6.tar.gz
external_llvm-d6c68c417b13e66f3205551708022ef08e43ecf6.tar.bz2
Fixes to be LP64 correct
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2950 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'runtime')
-rw-r--r--runtime/GCCLibraries/libc/memory.c4
-rw-r--r--runtime/GCCLibraries/libc/string.c8
2 files changed, 6 insertions, 6 deletions
diff --git a/runtime/GCCLibraries/libc/memory.c b/runtime/GCCLibraries/libc/memory.c
index 404c81a..560c6da 100644
--- a/runtime/GCCLibraries/libc/memory.c
+++ b/runtime/GCCLibraries/libc/memory.c
@@ -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);
diff --git a/runtime/GCCLibraries/libc/string.c b/runtime/GCCLibraries/libc/string.c
index ac00ed4..5c9625d 100644
--- a/runtime/GCCLibraries/libc/string.c
+++ b/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;