amd64 fixes

This commit is contained in:
Russ Cox
2006-05-21 16:32:29 +00:00
parent af11a9e129
commit 5797fdc0c0
28 changed files with 116 additions and 66 deletions

View File

@ -15,7 +15,7 @@ lfdchan(int fd)
c = newchan();
c->type = devno('L', 0);
c->aux = (void*)fd;
c->aux = (void*)(uintptr)fd;
c->name = newcname("fd");
c->mode = ORDWR;
c->qid.type = 0;
@ -76,14 +76,14 @@ lfdopen(Chan *c, int omode)
static void
lfdclose(Chan *c)
{
close((int)c->aux);
close((int)(uintptr)c->aux);
}
static long
lfdread(Chan *c, void *buf, long n, vlong off)
{
USED(off); /* can't pread on pipes */
n = read((int)c->aux, buf, n);
n = read((int)(uintptr)c->aux, buf, n);
if(n < 0){
iprint("error %d\n", errno);
oserror();
@ -96,7 +96,7 @@ lfdwrite(Chan *c, void *buf, long n, vlong off)
{
USED(off); /* can't pread on pipes */
n = write((int)c->aux, buf, n);
n = write((int)(uintptr)c->aux, buf, n);
if(n < 0){
iprint("error %d\n", errno);
oserror();