summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/fs/unionfs/union_subr.c4
-rw-r--r--sys/miscfs/union/union_subr.c4
-rw-r--r--sys/sys/bio.h4
-rw-r--r--sys/sys/buf.h4
-rw-r--r--sys/sys/mbuf.h9
-rw-r--r--sys/vm/vm_page.c4
6 files changed, 15 insertions, 14 deletions
diff --git a/sys/fs/unionfs/union_subr.c b/sys/fs/unionfs/union_subr.c
index 7173734..c54d86b 100644
--- a/sys/fs/unionfs/union_subr.c
+++ b/sys/fs/unionfs/union_subr.c
@@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* @(#)union_subr.c 8.20 (Berkeley) 5/20/95
- * $Id: union_subr.c,v 1.29 1998/02/26 03:23:54 kato Exp $
+ * $Id: union_subr.c,v 1.30 1998/05/07 04:58:36 msmith Exp $
*/
#include <sys/param.h>
@@ -61,7 +61,7 @@ extern int union_init __P((void));
/* unsigned int ... */
#define UNION_HASH(u, l) \
- (((((unsigned long) (u)) + ((unsigned long) l)) >> 8) & (NHASH-1))
+ (((((uintptr_t) (u)) + ((uintptr_t) l)) >> 8) & (NHASH-1))
static LIST_HEAD(unhead, union_node) unhead[NHASH];
static int unvplock[NHASH];
diff --git a/sys/miscfs/union/union_subr.c b/sys/miscfs/union/union_subr.c
index 7173734..c54d86b 100644
--- a/sys/miscfs/union/union_subr.c
+++ b/sys/miscfs/union/union_subr.c
@@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* @(#)union_subr.c 8.20 (Berkeley) 5/20/95
- * $Id: union_subr.c,v 1.29 1998/02/26 03:23:54 kato Exp $
+ * $Id: union_subr.c,v 1.30 1998/05/07 04:58:36 msmith Exp $
*/
#include <sys/param.h>
@@ -61,7 +61,7 @@ extern int union_init __P((void));
/* unsigned int ... */
#define UNION_HASH(u, l) \
- (((((unsigned long) (u)) + ((unsigned long) l)) >> 8) & (NHASH-1))
+ (((((uintptr_t) (u)) + ((uintptr_t) l)) >> 8) & (NHASH-1))
static LIST_HEAD(unhead, union_node) unhead[NHASH];
static int unvplock[NHASH];
diff --git a/sys/sys/bio.h b/sys/sys/bio.h
index 91ca187..90f082a 100644
--- a/sys/sys/bio.h
+++ b/sys/sys/bio.h
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)buf.h 8.9 (Berkeley) 3/30/95
- * $Id: buf.h,v 1.51 1998/05/06 01:44:12 gibbs Exp $
+ * $Id: buf.h,v 1.52 1998/05/13 16:03:33 gibbs Exp $
*/
#ifndef _SYS_BUF_H_
@@ -226,7 +226,7 @@ bufq_first(buf_queue_head *head)
* buffer hash table calculation, originally by David Greenman
*/
#define BUFHASH(vnp, bn) \
- (&bufhashtbl[(((unsigned long)(vnp) >> 7)+(int)(bn)) % BUFHSZ])
+ (&bufhashtbl[(((uintptr_t)(vnp) >> 7)+(int)(bn)) % BUFHSZ])
/*
* Definitions for the buffer free lists.
diff --git a/sys/sys/buf.h b/sys/sys/buf.h
index 91ca187..90f082a 100644
--- a/sys/sys/buf.h
+++ b/sys/sys/buf.h
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)buf.h 8.9 (Berkeley) 3/30/95
- * $Id: buf.h,v 1.51 1998/05/06 01:44:12 gibbs Exp $
+ * $Id: buf.h,v 1.52 1998/05/13 16:03:33 gibbs Exp $
*/
#ifndef _SYS_BUF_H_
@@ -226,7 +226,7 @@ bufq_first(buf_queue_head *head)
* buffer hash table calculation, originally by David Greenman
*/
#define BUFHASH(vnp, bn) \
- (&bufhashtbl[(((unsigned long)(vnp) >> 7)+(int)(bn)) % BUFHSZ])
+ (&bufhashtbl[(((uintptr_t)(vnp) >> 7)+(int)(bn)) % BUFHSZ])
/*
* Definitions for the buffer free lists.
diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h
index 19e41a8..773a0e9 100644
--- a/sys/sys/mbuf.h
+++ b/sys/sys/mbuf.h
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)mbuf.h 8.5 (Berkeley) 2/19/95
- * $Id: mbuf.h,v 1.25 1997/10/12 20:26:00 phk Exp $
+ * $Id: mbuf.h,v 1.26 1997/12/28 01:04:47 bde Exp $
*/
#ifndef _SYS_MBUF_H_
@@ -59,9 +59,10 @@
* cltom(x) - convert cluster # to ptr to beginning of cluster
*/
#define mtod(m,t) ((t)((m)->m_data))
-#define dtom(x) ((struct mbuf *)((long)(x) & ~(MSIZE-1)))
-#define mtocl(x) (((u_long)(x) - (u_long)mbutl) >> MCLSHIFT)
-#define cltom(x) ((caddr_t)((u_long)mbutl + ((u_long)(x) << MCLSHIFT)))
+#define dtom(x) ((struct mbuf *)((intptr_t)(x) & ~(MSIZE-1)))
+#define mtocl(x) (((uintptr_t)(x) - (uintptr_t)mbutl) >> MCLSHIFT)
+#define cltom(x) ((caddr_t)((uintptr_t)mbutl + \
+ ((uintptr_t)(x) << MCLSHIFT)))
/* header at beginning of each mbuf: */
struct m_hdr {
diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c
index bedfaf9..be0696b 100644
--- a/sys/vm/vm_page.c
+++ b/sys/vm/vm_page.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)vm_page.c 7.4 (Berkeley) 5/7/91
- * $Id: vm_page.c,v 1.102 1998/06/21 18:02:48 bde Exp $
+ * $Id: vm_page.c,v 1.103 1998/07/11 07:46:14 bde Exp $
*/
/*
@@ -358,7 +358,7 @@ vm_page_hash(object, pindex)
vm_object_t object;
vm_pindex_t pindex;
{
- return ((((unsigned long) object) >> 5) + (pindex >> 1)) & vm_page_hash_mask;
+ return ((((uintptr_t) object) >> 5) + (pindex >> 1)) & vm_page_hash_mask;
}
/*
OpenPOWER on IntegriCloud