diff options
| author | forsyth <forsyth@lavoro.terzarima.net> | 2013-06-03 21:01:14 +0000 |
|---|---|---|
| committer | forsyth <forsyth@lavoro.terzarima.net> | 2013-06-03 21:01:14 +0000 |
| commit | 45a20ab721a513710138340faff3d59a31c3e01e (patch) | |
| tree | eea29d2684c51cc73725b8992a2125bede48e118 /utils/vl/compat.c | |
| parent | cd8e99851af33e52bcdf8faf34f9d4e62fa0cbaf (diff) | |
sync compilers with Plan 9
remove 1[acl] 2[acl]
Diffstat (limited to 'utils/vl/compat.c')
| -rw-r--r-- | utils/vl/compat.c | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/utils/vl/compat.c b/utils/vl/compat.c index 5e676913..fa93a42a 100644 --- a/utils/vl/compat.c +++ b/utils/vl/compat.c @@ -4,7 +4,7 @@ * fake malloc */ void* -malloc(long n) +malloc(ulong n) { void *p; @@ -25,7 +25,7 @@ free(void *p) } void* -calloc(long m, long n) +calloc(ulong m, ulong n) { void *p; @@ -36,9 +36,9 @@ calloc(long m, long n) } void* -realloc(void *p, long n) +realloc(void*, ulong) { - fprint(2, "realloc called\n", p, n); + fprint(2, "realloc called\n"); abort(); return 0; } @@ -48,3 +48,18 @@ mysbrk(ulong size) { return sbrk(size); } + +void +setmalloctag(void *v, ulong pc) +{ + USED(v, pc); +} + +int +fileexists(char *s) +{ + uchar dirbuf[400]; + + /* it's fine if stat result doesn't fit in dirbuf, since even then the file exists */ + return stat(s, dirbuf, sizeof(dirbuf)) >= 0; +} |
