Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/compat/irix Use uintptr_t instead of uint32_t as an inte...



details:   https://anonhg.NetBSD.org/src/rev/5c9c307776ad
branches:  trunk
changeset: 747060:5c9c307776ad
user:      dholland <dholland%NetBSD.org@localhost>
date:      Mon Aug 31 05:36:23 2009 +0000

description:
Use uintptr_t instead of uint32_t as an intermediate stage when
casting from off_t to a pointer. This way it compiles in a 64-bit
world. Dunno if it'll work though with 64-bit mips kernel addresses,
which are in the negative range of 64-bit off_t.

diffstat:

 sys/compat/irix/irix_kmem.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 8851aded9497 -r 5c9c307776ad sys/compat/irix/irix_kmem.c
--- a/sys/compat/irix/irix_kmem.c       Mon Aug 31 05:34:16 2009 +0000
+++ b/sys/compat/irix/irix_kmem.c       Mon Aug 31 05:36:23 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: irix_kmem.c,v 1.9 2009/03/14 21:04:18 dsl Exp $ */
+/*     $NetBSD: irix_kmem.c,v 1.10 2009/08/31 05:36:23 dholland Exp $ */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: irix_kmem.c,v 1.9 2009/03/14 21:04:18 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: irix_kmem.c,v 1.10 2009/08/31 05:36:23 dholland Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -95,7 +95,7 @@
        printf("irix_kmemread(): addr = %p\n", uio->uio_iov->iov_base);
        printf("irix_kmemread(): len = 0x%08lx\n", (long)uio->uio_iov->iov_len);
 #endif
-       offset = (void *)(uint32_t)uio->uio_offset; /* XXX */
+       offset = (void *)(uintptr_t)uio->uio_offset; /* XXX */
        if (offset == &averunnable) { /* load average */
                struct irix_loadavg iav;
                int scale = averunnable.fscale / IRIX_LOADAVG_SCALE;



Home | Main Index | Thread Index | Old Index