summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/dev/de/if_de.c4
-rw-r--r--sys/fs/nullfs/null_subr.c4
-rw-r--r--sys/fs/procfs/procfs_mem.c4
-rw-r--r--sys/fs/specfs/spec_vnops.c4
-rw-r--r--sys/kern/kern_intr.c10
-rw-r--r--sys/kern/kern_sig.c4
-rw-r--r--sys/kern/kern_subr.c8
-rw-r--r--sys/kern/kern_synch.c4
-rw-r--r--sys/kern/link_aout.c8
-rw-r--r--sys/kern/subr_clist.c26
-rw-r--r--sys/kern/subr_prf.c4
-rw-r--r--sys/kern/tty_subr.c26
-rw-r--r--sys/kern/uipc_usrreq.c4
-rw-r--r--sys/kern/vfs_extattr.c4
-rw-r--r--sys/kern/vfs_syscalls.c4
-rw-r--r--sys/miscfs/nullfs/null_subr.c4
-rw-r--r--sys/miscfs/procfs/procfs_mem.c4
-rw-r--r--sys/miscfs/specfs/spec_vnops.c4
-rw-r--r--sys/net/if_sl.c4
-rw-r--r--sys/net/slcompress.c8
-rw-r--r--sys/nfs/nfs_socket.c6
-rw-r--r--sys/nfsclient/nfs_socket.c6
-rw-r--r--sys/nfsserver/nfs_srvsock.c6
-rw-r--r--sys/pci/ide_pci.c4
-rw-r--r--sys/pci/if_de.c4
-rw-r--r--sys/sys/sem.h4
-rw-r--r--sys/ufs/ufs/ufs_quota.c4
-rw-r--r--sys/vm/device_pager.c6
-rw-r--r--sys/vm/vm_mmap.c4
29 files changed, 93 insertions, 93 deletions
diff --git a/sys/dev/de/if_de.c b/sys/dev/de/if_de.c
index e0a128e..054fc20 100644
--- a/sys/dev/de/if_de.c
+++ b/sys/dev/de/if_de.c
@@ -1,5 +1,5 @@
/* $NetBSD: if_de.c,v 1.72 1998/07/05 06:49:14 jonathan Exp $ */
-/* $Id: if_de.c,v 1.83 1998/06/13 17:19:59 peter Exp $ */
+/* $Id: if_de.c,v 1.84 1998/07/08 01:24:37 peter Exp $ */
/*-
* Copyright (c) 1994-1997 Matt Thomas (matt@3am-software.com)
@@ -4342,7 +4342,7 @@ tulip_txput(
do {
int len = m0->m_len;
caddr_t addr = mtod(m0, caddr_t);
- unsigned clsize = CLBYTES - (((u_long) addr) & (CLBYTES-1));
+ unsigned clsize = CLBYTES - (((uintptr_t) addr) & (CLBYTES-1));
while (len > 0) {
unsigned slen = min(len, clsize);
diff --git a/sys/fs/nullfs/null_subr.c b/sys/fs/nullfs/null_subr.c
index 7244d05..e4d49b6 100644
--- a/sys/fs/nullfs/null_subr.c
+++ b/sys/fs/nullfs/null_subr.c
@@ -35,7 +35,7 @@
*
* @(#)null_subr.c 8.7 (Berkeley) 5/14/95
*
- * $Id: null_subr.c,v 1.16 1998/02/06 12:13:36 eivind Exp $
+ * $Id: null_subr.c,v 1.17 1998/02/09 06:09:45 eivind Exp $
*/
#include "opt_debug_nullfs.h"
@@ -60,7 +60,7 @@
*/
#define NULL_NHASH(vp) \
- (&null_node_hashtbl[(((u_long)vp)>>LOG2_SIZEVNODE) & null_node_hash])
+ (&null_node_hashtbl[(((uintptr_t)vp)>>LOG2_SIZEVNODE) & null_node_hash])
static LIST_HEAD(null_node_hashhead, null_node) *null_node_hashtbl;
static u_long null_node_hash;
diff --git a/sys/fs/procfs/procfs_mem.c b/sys/fs/procfs/procfs_mem.c
index 27cb4f5..c1012f1 100644
--- a/sys/fs/procfs/procfs_mem.c
+++ b/sys/fs/procfs/procfs_mem.c
@@ -37,7 +37,7 @@
*
* @(#)procfs_mem.c 8.5 (Berkeley) 6/15/94
*
- * $Id: procfs_mem.c,v 1.32 1998/05/19 00:00:14 tegge Exp $
+ * $Id: procfs_mem.c,v 1.33 1998/06/07 17:11:57 dfr Exp $
*/
/*
@@ -159,7 +159,7 @@ procfs_rwmem(curp, p, uio)
fill_eproc (p, &p->p_addr->u_kproc.kp_eproc);
/* locate the in-core address */
- tkva = (u_long)p->p_addr + uva - VM_MAXUSER_ADDRESS;
+ tkva = (uintptr_t)p->p_addr + uva - VM_MAXUSER_ADDRESS;
/* transfer it */
error = uiomove((caddr_t)tkva, len, uio);
diff --git a/sys/fs/specfs/spec_vnops.c b/sys/fs/specfs/spec_vnops.c
index cb9a120..7f05eb2 100644
--- a/sys/fs/specfs/spec_vnops.c
+++ b/sys/fs/specfs/spec_vnops.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)spec_vnops.c 8.14 (Berkeley) 5/21/95
- * $Id: spec_vnops.c,v 1.65 1998/07/04 22:30:23 julian Exp $
+ * $Id: spec_vnops.c,v 1.66 1998/07/11 07:45:48 bde Exp $
*/
#include <sys/param.h>
@@ -430,7 +430,7 @@ spec_ioctl(ap)
ap->a_fflag, ap->a_p));
case VBLK:
- if (ap->a_command == 0 && (long)ap->a_data == B_TAPE)
+ if (ap->a_command == 0 && (intptr_t)ap->a_data == B_TAPE)
if ((bdevsw[major(dev)]->d_flags & D_TYPEMASK) ==
D_TAPE)
return (0);
diff --git a/sys/kern/kern_intr.c b/sys/kern/kern_intr.c
index 4d2ffc7..f55a0da 100644
--- a/sys/kern/kern_intr.c
+++ b/sys/kern/kern_intr.c
@@ -23,7 +23,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: kern_intr.c,v 1.16 1998/06/11 07:23:59 dfr Exp $
+ * $Id: kern_intr.c,v 1.17 1998/06/18 15:32:08 bde Exp $
*
*/
@@ -195,7 +195,7 @@ add_intrdesc(intrec *idesc)
idesc->maskptr, idesc->flags) != 0)
return (-1);
- update_intrname(irq, (long)idesc->devdata);
+ update_intrname(irq, (intptr_t)idesc->devdata);
/* keep reference */
intreclist_head[irq] = idesc;
} else {
@@ -324,7 +324,7 @@ intr_disconnect(intrec *idesc)
head->argument,
head->maskptr, head->flags);
if (errcode == 0)
- update_intrname(irq, (long)head->devdata);
+ update_intrname(irq, (intptr_t)head->devdata);
}
}
splx(oldspl);
@@ -416,8 +416,8 @@ register_intr(int intr, int device_id, u_int flags,
intrec *idesc;
flags |= INTR_EXCL;
- idesc = intr_create((void *)(long)device_id, intr, handler,
- (void*)(long)unit, maskptr, flags);
+ idesc = intr_create((void *)(intptr_t)device_id, intr, handler,
+ (void*)(intptr_t)unit, maskptr, flags);
return (intr_connect(idesc));
}
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c
index 147717e..403b45e 100644
--- a/sys/kern/kern_sig.c
+++ b/sys/kern/kern_sig.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)kern_sig.c 8.7 (Berkeley) 4/18/94
- * $Id: kern_sig.c,v 1.42 1998/06/28 08:37:45 dg Exp $
+ * $Id: kern_sig.c,v 1.43 1998/07/08 06:38:39 sef Exp $
*/
#include "opt_compat.h"
@@ -1035,7 +1035,7 @@ issignal(p)
* Return the signal's number, or fall through
* to clear it from the pending mask.
*/
- switch ((int)(long)p->p_sigacts->ps_sigact[signum]) {
+ switch ((int)(intptr_t)p->p_sigacts->ps_sigact[signum]) {
case (int)SIG_DFL:
/*
diff --git a/sys/kern/kern_subr.c b/sys/kern/kern_subr.c
index a225192..3ab216a 100644
--- a/sys/kern/kern_subr.c
+++ b/sys/kern/kern_subr.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)kern_subr.c 8.3 (Berkeley) 1/21/94
- * $Id: kern_subr.c,v 1.19 1998/02/06 12:13:25 eivind Exp $
+ * $Id: kern_subr.c,v 1.20 1998/06/07 17:11:36 dfr Exp $
*/
#include <sys/param.h>
@@ -143,9 +143,9 @@ uiomoveco(cp, n, uio, obj)
case UIO_USERISPACE:
if (uio->uio_rw == UIO_READ) {
if (vfs_ioopt && ((cnt & PAGE_MASK) == 0) &&
- ((((long) iov->iov_base) & PAGE_MASK) == 0) &&
+ ((((intptr_t) iov->iov_base) & PAGE_MASK) == 0) &&
((uio->uio_offset & PAGE_MASK) == 0) &&
- ((((long) cp) & PAGE_MASK) == 0)) {
+ ((((intptr_t) cp) & PAGE_MASK) == 0)) {
error = vm_uiomove(&curproc->p_vmspace->vm_map, obj,
uio->uio_offset, cnt,
(vm_offset_t) iov->iov_base, NULL);
@@ -208,7 +208,7 @@ uioread(n, uio, obj, nread)
cnt = n;
if ((uio->uio_segflg == UIO_USERSPACE) &&
- ((((long) iov->iov_base) & PAGE_MASK) == 0) &&
+ ((((intptr_t) iov->iov_base) & PAGE_MASK) == 0) &&
((uio->uio_offset & PAGE_MASK) == 0) ) {
if (cnt < PAGE_SIZE)
diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c
index 6fa55d4..749595a 100644
--- a/sys/kern/kern_synch.c
+++ b/sys/kern/kern_synch.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)kern_synch.c 8.9 (Berkeley) 5/19/95
- * $Id: kern_synch.c,v 1.59 1998/06/30 21:25:54 phk Exp $
+ * $Id: kern_synch.c,v 1.60 1998/07/11 13:06:41 bde Exp $
*/
#include "opt_ktrace.h"
@@ -332,7 +332,7 @@ updatepri(p)
*/
#define TABLESIZE 128
static TAILQ_HEAD(slpquehead, proc) slpque[TABLESIZE];
-#define LOOKUP(x) (((long)(x) >> 8) & (TABLESIZE - 1))
+#define LOOKUP(x) (((intptr_t)(x) >> 8) & (TABLESIZE - 1))
/*
* During autoconfiguration or after a panic, a sleep will simply
diff --git a/sys/kern/link_aout.c b/sys/kern/link_aout.c
index 3bbd072..4126ae1 100644
--- a/sys/kern/link_aout.c
+++ b/sys/kern/link_aout.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: link_aout.c,v 1.6 1998/06/07 17:11:36 dfr Exp $
+ * $Id: link_aout.c,v 1.7 1998/07/07 04:31:27 bde Exp $
*/
#include <sys/param.h>
@@ -325,7 +325,7 @@ relocate_file(linker_file_t lf)
printf("link_aout: bad symbol name %s\n", sym);
relocation = 0;
} else
- relocation = (long)
+ relocation = (intptr_t)
linker_file_lookup_symbol(lf, sym + 1,
np->nz_type != (N_SETV+N_EXT));
if (!relocation) {
@@ -341,7 +341,7 @@ relocate_file(linker_file_t lf)
}
if (r->r_pcrel)
- relocation -= (long) af->address;
+ relocation -= (intptr_t) af->address;
if (r->r_copy) {
printf("link_aout: can't cope with copy relocations\n");
@@ -351,7 +351,7 @@ relocate_file(linker_file_t lf)
write_relocation(r, addr, relocation);
} else {
write_relocation(r, addr,
- (long)(read_relocation(r, addr) + af->address));
+ (intptr_t)(read_relocation(r, addr) + af->address));
}
}
diff --git a/sys/kern/subr_clist.c b/sys/kern/subr_clist.c
index d990a12..593d00c 100644
--- a/sys/kern/subr_clist.c
+++ b/sys/kern/subr_clist.c
@@ -24,7 +24,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: tty_subr.c,v 1.28 1997/10/12 20:24:09 phk Exp $
+ * $Id: tty_subr.c,v 1.29 1998/04/15 17:46:27 bde Exp $
*/
/*
@@ -223,7 +223,7 @@ getc(clistp)
/* If there are characters in the list, get one */
if (clistp->c_cc) {
- cblockp = (struct cblock *)((long)clistp->c_cf & ~CROUND);
+ cblockp = (struct cblock *)((intptr_t)clistp->c_cf & ~CROUND);
chr = (u_char)*clistp->c_cf;
/*
@@ -280,7 +280,7 @@ q_to_b(clistp, dest, amount)
s = spltty();
while (clistp && amount && (clistp->c_cc > 0)) {
- cblockp = (struct cblock *)((long)clistp->c_cf & ~CROUND);
+ cblockp = (struct cblock *)((intptr_t)clistp->c_cf & ~CROUND);
cblockn = cblockp + 1; /* pointer arithmetic! */
numc = min(amount, (char *)cblockn - clistp->c_cf);
numc = min(numc, clistp->c_cc);
@@ -327,7 +327,7 @@ ndflush(clistp, amount)
s = spltty();
while (amount && (clistp->c_cc > 0)) {
- cblockp = (struct cblock *)((long)clistp->c_cf & ~CROUND);
+ cblockp = (struct cblock *)((intptr_t)clistp->c_cf & ~CROUND);
cblockn = cblockp + 1; /* pointer arithmetic! */
numc = min(amount, (char *)cblockn - clistp->c_cf);
numc = min(numc, clistp->c_cc);
@@ -380,8 +380,8 @@ putc(chr, clistp)
clistp->c_cf = clistp->c_cl = cblockp->c_info;
clistp->c_cc = 0;
} else {
- cblockp = (struct cblock *)((long)clistp->c_cl & ~CROUND);
- if (((long)clistp->c_cl & CROUND) == 0) {
+ cblockp = (struct cblock *)((intptr_t)clistp->c_cl & ~CROUND);
+ if (((intptr_t)clistp->c_cl & CROUND) == 0) {
struct cblock *prev = (cblockp - 1);
if (clistp->c_cbcount >= clistp->c_cbreserved) {
@@ -459,14 +459,14 @@ b_to_q(src, amount, clistp)
clistp->c_cf = clistp->c_cl = cblockp->c_info;
clistp->c_cc = 0;
} else {
- cblockp = (struct cblock *)((long)clistp->c_cl & ~CROUND);
+ cblockp = (struct cblock *)((intptr_t)clistp->c_cl & ~CROUND);
}
while (amount) {
/*
* Get another cblock if needed.
*/
- if (((long)clistp->c_cl & CROUND) == 0) {
+ if (((intptr_t)clistp->c_cl & CROUND) == 0) {
struct cblock *prev = cblockp - 1;
if (clistp->c_cbcount >= clistp->c_cbreserved) {
@@ -568,9 +568,9 @@ nextc(clistp, cp, dst)
* If the next character is beyond the end of this
* cblock, advance to the next cblock.
*/
- if (((long)cp & CROUND) == 0)
+ if (((intptr_t)cp & CROUND) == 0)
cp = ((struct cblock *)cp - 1)->c_next->c_info;
- cblockp = (struct cblock *)((long)cp & ~CROUND);
+ cblockp = (struct cblock *)((intptr_t)cp & ~CROUND);
/*
* Get the character. Set the quote flag if this character
@@ -604,7 +604,7 @@ unputc(clistp)
chr = (u_char)*clistp->c_cl;
- cblockp = (struct cblock *)((long)clistp->c_cl & ~CROUND);
+ cblockp = (struct cblock *)((intptr_t)clistp->c_cl & ~CROUND);
/*
* Set quote flag if this character was quoted.
@@ -618,7 +618,7 @@ unputc(clistp)
* one.
*/
if (clistp->c_cc && (clistp->c_cl <= (char *)cblockp->c_info)) {
- cbp = (struct cblock *)((long)clistp->c_cf & ~CROUND);
+ cbp = (struct cblock *)((intptr_t)clistp->c_cf & ~CROUND);
while (cbp->c_next != cblockp)
cbp = cbp->c_next;
@@ -640,7 +640,7 @@ unputc(clistp)
* free the last cblock.
*/
if ((clistp->c_cc == 0) && clistp->c_cl) {
- cblockp = (struct cblock *)((long)clistp->c_cl & ~CROUND);
+ cblockp = (struct cblock *)((intptr_t)clistp->c_cl & ~CROUND);
cblock_free(cblockp);
if (--clistp->c_cbcount >= clistp->c_cbreserved)
++cslushcount;
diff --git a/sys/kern/subr_prf.c b/sys/kern/subr_prf.c
index 9474a66..b2715e5 100644
--- a/sys/kern/subr_prf.c
+++ b/sys/kern/subr_prf.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)subr_prf.c 8.3 (Berkeley) 1/21/94
- * $Id: subr_prf.c,v 1.46 1998/05/28 09:30:20 phk Exp $
+ * $Id: subr_prf.c,v 1.47 1998/07/08 10:41:32 bde Exp $
*/
#include <sys/param.h>
@@ -495,7 +495,7 @@ reswitch: switch (ch = (u_char)*fmt++) {
base = 8;
goto nosign;
case 'p':
- ul = (u_long)va_arg(ap, void *);
+ ul = (uintptr_t)va_arg(ap, void *);
base = 16;
sharpflag = 1;
goto nosign;
diff --git a/sys/kern/tty_subr.c b/sys/kern/tty_subr.c
index d990a12..593d00c 100644
--- a/sys/kern/tty_subr.c
+++ b/sys/kern/tty_subr.c
@@ -24,7 +24,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: tty_subr.c,v 1.28 1997/10/12 20:24:09 phk Exp $
+ * $Id: tty_subr.c,v 1.29 1998/04/15 17:46:27 bde Exp $
*/
/*
@@ -223,7 +223,7 @@ getc(clistp)
/* If there are characters in the list, get one */
if (clistp->c_cc) {
- cblockp = (struct cblock *)((long)clistp->c_cf & ~CROUND);
+ cblockp = (struct cblock *)((intptr_t)clistp->c_cf & ~CROUND);
chr = (u_char)*clistp->c_cf;
/*
@@ -280,7 +280,7 @@ q_to_b(clistp, dest, amount)
s = spltty();
while (clistp && amount && (clistp->c_cc > 0)) {
- cblockp = (struct cblock *)((long)clistp->c_cf & ~CROUND);
+ cblockp = (struct cblock *)((intptr_t)clistp->c_cf & ~CROUND);
cblockn = cblockp + 1; /* pointer arithmetic! */
numc = min(amount, (char *)cblockn - clistp->c_cf);
numc = min(numc, clistp->c_cc);
@@ -327,7 +327,7 @@ ndflush(clistp, amount)
s = spltty();
while (amount && (clistp->c_cc > 0)) {
- cblockp = (struct cblock *)((long)clistp->c_cf & ~CROUND);
+ cblockp = (struct cblock *)((intptr_t)clistp->c_cf & ~CROUND);
cblockn = cblockp + 1; /* pointer arithmetic! */
numc = min(amount, (char *)cblockn - clistp->c_cf);
numc = min(numc, clistp->c_cc);
@@ -380,8 +380,8 @@ putc(chr, clistp)
clistp->c_cf = clistp->c_cl = cblockp->c_info;
clistp->c_cc = 0;
} else {
- cblockp = (struct cblock *)((long)clistp->c_cl & ~CROUND);
- if (((long)clistp->c_cl & CROUND) == 0) {
+ cblockp = (struct cblock *)((intptr_t)clistp->c_cl & ~CROUND);
+ if (((intptr_t)clistp->c_cl & CROUND) == 0) {
struct cblock *prev = (cblockp - 1);
if (clistp->c_cbcount >= clistp->c_cbreserved) {
@@ -459,14 +459,14 @@ b_to_q(src, amount, clistp)
clistp->c_cf = clistp->c_cl = cblockp->c_info;
clistp->c_cc = 0;
} else {
- cblockp = (struct cblock *)((long)clistp->c_cl & ~CROUND);
+ cblockp = (struct cblock *)((intptr_t)clistp->c_cl & ~CROUND);
}
while (amount) {
/*
* Get another cblock if needed.
*/
- if (((long)clistp->c_cl & CROUND) == 0) {
+ if (((intptr_t)clistp->c_cl & CROUND) == 0) {
struct cblock *prev = cblockp - 1;
if (clistp->c_cbcount >= clistp->c_cbreserved) {
@@ -568,9 +568,9 @@ nextc(clistp, cp, dst)
* If the next character is beyond the end of this
* cblock, advance to the next cblock.
*/
- if (((long)cp & CROUND) == 0)
+ if (((intptr_t)cp & CROUND) == 0)
cp = ((struct cblock *)cp - 1)->c_next->c_info;
- cblockp = (struct cblock *)((long)cp & ~CROUND);
+ cblockp = (struct cblock *)((intptr_t)cp & ~CROUND);
/*
* Get the character. Set the quote flag if this character
@@ -604,7 +604,7 @@ unputc(clistp)
chr = (u_char)*clistp->c_cl;
- cblockp = (struct cblock *)((long)clistp->c_cl & ~CROUND);
+ cblockp = (struct cblock *)((intptr_t)clistp->c_cl & ~CROUND);
/*
* Set quote flag if this character was quoted.
@@ -618,7 +618,7 @@ unputc(clistp)
* one.
*/
if (clistp->c_cc && (clistp->c_cl <= (char *)cblockp->c_info)) {
- cbp = (struct cblock *)((long)clistp->c_cf & ~CROUND);
+ cbp = (struct cblock *)((intptr_t)clistp->c_cf & ~CROUND);
while (cbp->c_next != cblockp)
cbp = cbp->c_next;
@@ -640,7 +640,7 @@ unputc(clistp)
* free the last cblock.
*/
if ((clistp->c_cc == 0) && clistp->c_cl) {
- cblockp = (struct cblock *)((long)clistp->c_cl & ~CROUND);
+ cblockp = (struct cblock *)((intptr_t)clistp->c_cl & ~CROUND);
cblock_free(cblockp);
if (--clistp->c_cbcount >= clistp->c_cbreserved)
++cslushcount;
diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c
index 3921513..0799791 100644
--- a/sys/kern/uipc_usrreq.c
+++ b/sys/kern/uipc_usrreq.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* From: @(#)uipc_usrreq.c 8.3 (Berkeley) 1/4/94
- * $Id: uipc_usrreq.c,v 1.34 1998/05/07 04:58:21 msmith Exp $
+ * $Id: uipc_usrreq.c,v 1.35 1998/05/15 20:11:31 wollman Exp $
*/
#include <sys/param.h>
@@ -715,7 +715,7 @@ unp_pcblist SYSCTL_HANDLER_ARGS
struct xunpgen xug;
struct unp_head *head;
- head = ((long)arg1 == SOCK_DGRAM ? &unp_dhead : &unp_shead);
+ head = ((intptr_t)arg1 == SOCK_DGRAM ? &unp_dhead : &unp_shead);
/*
* The process of preparing the PCB list is too time-consuming and
diff --git a/sys/kern/vfs_extattr.c b/sys/kern/vfs_extattr.c
index 4d7dff3..805afb9 100644
--- a/sys/kern/vfs_extattr.c
+++ b/sys/kern/vfs_extattr.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)vfs_syscalls.c 8.13 (Berkeley) 4/15/94
- * $Id: vfs_syscalls.c,v 1.103 1998/06/08 18:18:28 dyson Exp $
+ * $Id: vfs_syscalls.c,v 1.104 1998/07/03 03:47:24 dg Exp $
*/
/* For 4.3 integer FS ID compatibility */
@@ -213,7 +213,7 @@ mount(p, uap)
* get an integer for the filesystem type instead of a string, we
* check to see if it matches one of the historic filesystem types.
*/
- fstypenum = (u_long)SCARG(uap, type);
+ fstypenum = (uintptr_t)SCARG(uap, type);
if (fstypenum < maxvfsconf) {
for (vfsp = vfsconf; vfsp; vfsp = vfsp->vfc_next)
if (vfsp->vfc_typenum == fstypenum)
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c
index 4d7dff3..805afb9 100644
--- a/sys/kern/vfs_syscalls.c
+++ b/sys/kern/vfs_syscalls.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)vfs_syscalls.c 8.13 (Berkeley) 4/15/94
- * $Id: vfs_syscalls.c,v 1.103 1998/06/08 18:18:28 dyson Exp $
+ * $Id: vfs_syscalls.c,v 1.104 1998/07/03 03:47:24 dg Exp $
*/
/* For 4.3 integer FS ID compatibility */
@@ -213,7 +213,7 @@ mount(p, uap)
* get an integer for the filesystem type instead of a string, we
* check to see if it matches one of the historic filesystem types.
*/
- fstypenum = (u_long)SCARG(uap, type);
+ fstypenum = (uintptr_t)SCARG(uap, type);
if (fstypenum < maxvfsconf) {
for (vfsp = vfsconf; vfsp; vfsp = vfsp->vfc_next)
if (vfsp->vfc_typenum == fstypenum)
diff --git a/sys/miscfs/nullfs/null_subr.c b/sys/miscfs/nullfs/null_subr.c
index 7244d05..e4d49b6 100644
--- a/sys/miscfs/nullfs/null_subr.c
+++ b/sys/miscfs/nullfs/null_subr.c
@@ -35,7 +35,7 @@
*
* @(#)null_subr.c 8.7 (Berkeley) 5/14/95
*
- * $Id: null_subr.c,v 1.16 1998/02/06 12:13:36 eivind Exp $
+ * $Id: null_subr.c,v 1.17 1998/02/09 06:09:45 eivind Exp $
*/
#include "opt_debug_nullfs.h"
@@ -60,7 +60,7 @@
*/
#define NULL_NHASH(vp) \
- (&null_node_hashtbl[(((u_long)vp)>>LOG2_SIZEVNODE) & null_node_hash])
+ (&null_node_hashtbl[(((uintptr_t)vp)>>LOG2_SIZEVNODE) & null_node_hash])
static LIST_HEAD(null_node_hashhead, null_node) *null_node_hashtbl;
static u_long null_node_hash;
diff --git a/sys/miscfs/procfs/procfs_mem.c b/sys/miscfs/procfs/procfs_mem.c
index 27cb4f5..c1012f1 100644
--- a/sys/miscfs/procfs/procfs_mem.c
+++ b/sys/miscfs/procfs/procfs_mem.c
@@ -37,7 +37,7 @@
*
* @(#)procfs_mem.c 8.5 (Berkeley) 6/15/94
*
- * $Id: procfs_mem.c,v 1.32 1998/05/19 00:00:14 tegge Exp $
+ * $Id: procfs_mem.c,v 1.33 1998/06/07 17:11:57 dfr Exp $
*/
/*
@@ -159,7 +159,7 @@ procfs_rwmem(curp, p, uio)
fill_eproc (p, &p->p_addr->u_kproc.kp_eproc);
/* locate the in-core address */
- tkva = (u_long)p->p_addr + uva - VM_MAXUSER_ADDRESS;
+ tkva = (uintptr_t)p->p_addr + uva - VM_MAXUSER_ADDRESS;
/* transfer it */
error = uiomove((caddr_t)tkva, len, uio);
diff --git a/sys/miscfs/specfs/spec_vnops.c b/sys/miscfs/specfs/spec_vnops.c
index cb9a120..7f05eb2 100644
--- a/sys/miscfs/specfs/spec_vnops.c
+++ b/sys/miscfs/specfs/spec_vnops.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)spec_vnops.c 8.14 (Berkeley) 5/21/95
- * $Id: spec_vnops.c,v 1.65 1998/07/04 22:30:23 julian Exp $
+ * $Id: spec_vnops.c,v 1.66 1998/07/11 07:45:48 bde Exp $
*/
#include <sys/param.h>
@@ -430,7 +430,7 @@ spec_ioctl(ap)
ap->a_fflag, ap->a_p));
case VBLK:
- if (ap->a_command == 0 && (long)ap->a_data == B_TAPE)
+ if (ap->a_command == 0 && (intptr_t)ap->a_data == B_TAPE)
if ((bdevsw[major(dev)]->d_flags & D_TYPEMASK) ==
D_TAPE)
return (0);
diff --git a/sys/net/if_sl.c b/sys/net/if_sl.c
index fc83a485..99a6978 100644
--- a/sys/net/if_sl.c
+++ b/sys/net/if_sl.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)if_sl.c 8.6 (Berkeley) 2/1/94
- * $Id: if_sl.c,v 1.68 1998/03/30 09:52:00 phk Exp $
+ * $Id: if_sl.c,v 1.69 1998/06/07 17:12:05 dfr Exp $
*/
/*
@@ -747,7 +747,7 @@ sl_btom(sc, len)
}
sc->sc_ep = mtod(m, u_char *) + SLBUFSIZE;
m->m_data = (caddr_t)sc->sc_buf;
- m->m_ext.ext_buf = (caddr_t)((long)sc->sc_buf &~ MCLOFSET);
+ m->m_ext.ext_buf = (caddr_t)((intptr_t)sc->sc_buf &~ MCLOFSET);
} else
bcopy((caddr_t)sc->sc_buf, mtod(m, caddr_t), len);
diff --git a/sys/net/slcompress.c b/sys/net/slcompress.c
index 58056e8..afd6bf6 100644
--- a/sys/net/slcompress.c
+++ b/sys/net/slcompress.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)slcompress.c 8.2 (Berkeley) 4/16/94
- * $Id: slcompress.c,v 1.10 1997/06/22 02:19:53 brian Exp $
+ * $Id: slcompress.c,v 1.11 1997/08/19 14:10:47 peter Exp $
*/
/*
@@ -435,10 +435,10 @@ sl_uncompress_tcp(bufp, len, type, comp)
* header (we assume the packet we were handed has enough space to
* prepend 128 bytes of header).
*/
- if ((long)cp & 3) {
+ if ((intptr_t)cp & 3) {
if (len > 0)
- (void) ovbcopy(cp, (caddr_t)((long)cp &~ 3), len);
- cp = (u_char *)((long)cp &~ 3);
+ (void) ovbcopy(cp, (caddr_t)((intptr_t)cp &~ 3), len);
+ cp = (u_char *)((intptr_t)cp &~ 3);
}
cp -= hlen;
len += hlen;
diff --git a/sys/nfs/nfs_socket.c b/sys/nfs/nfs_socket.c
index faf6ed9..ede6386 100644
--- a/sys/nfs/nfs_socket.c
+++ b/sys/nfs/nfs_socket.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_socket.c 8.5 (Berkeley) 3/30/95
- * $Id: nfs_socket.c,v 1.40 1998/05/31 20:08:54 peter Exp $
+ * $Id: nfs_socket.c,v 1.41 1998/06/07 17:12:28 dfr Exp $
*/
/*
@@ -1594,10 +1594,10 @@ nfs_realign(m, hsiz)
* This never happens for UDP, rarely happens for TCP
* but frequently happens for iso transport.
*/
- if ((m->m_len & 0x3) || (mtod(m, long) & 0x3)) {
+ if ((m->m_len & 0x3) || (mtod(m, intptr_t) & 0x3)) {
olen = m->m_len;
fcp = mtod(m, caddr_t);
- if ((long)fcp & 0x3) {
+ if ((intptr_t)fcp & 0x3) {
m->m_flags &= ~M_PKTHDR;
if (m->m_flags & M_EXT)
m->m_data = m->m_ext.ext_buf +
diff --git a/sys/nfsclient/nfs_socket.c b/sys/nfsclient/nfs_socket.c
index faf6ed9..ede6386 100644
--- a/sys/nfsclient/nfs_socket.c
+++ b/sys/nfsclient/nfs_socket.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_socket.c 8.5 (Berkeley) 3/30/95
- * $Id: nfs_socket.c,v 1.40 1998/05/31 20:08:54 peter Exp $
+ * $Id: nfs_socket.c,v 1.41 1998/06/07 17:12:28 dfr Exp $
*/
/*
@@ -1594,10 +1594,10 @@ nfs_realign(m, hsiz)
* This never happens for UDP, rarely happens for TCP
* but frequently happens for iso transport.
*/
- if ((m->m_len & 0x3) || (mtod(m, long) & 0x3)) {
+ if ((m->m_len & 0x3) || (mtod(m, intptr_t) & 0x3)) {
olen = m->m_len;
fcp = mtod(m, caddr_t);
- if ((long)fcp & 0x3) {
+ if ((intptr_t)fcp & 0x3) {
m->m_flags &= ~M_PKTHDR;
if (m->m_flags & M_EXT)
m->m_data = m->m_ext.ext_buf +
diff --git a/sys/nfsserver/nfs_srvsock.c b/sys/nfsserver/nfs_srvsock.c
index faf6ed9..ede6386 100644
--- a/sys/nfsserver/nfs_srvsock.c
+++ b/sys/nfsserver/nfs_srvsock.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_socket.c 8.5 (Berkeley) 3/30/95
- * $Id: nfs_socket.c,v 1.40 1998/05/31 20:08:54 peter Exp $
+ * $Id: nfs_socket.c,v 1.41 1998/06/07 17:12:28 dfr Exp $
*/
/*
@@ -1594,10 +1594,10 @@ nfs_realign(m, hsiz)
* This never happens for UDP, rarely happens for TCP
* but frequently happens for iso transport.
*/
- if ((m->m_len & 0x3) || (mtod(m, long) & 0x3)) {
+ if ((m->m_len & 0x3) || (mtod(m, intptr_t) & 0x3)) {
olen = m->m_len;
fcp = mtod(m, caddr_t);
- if ((long)fcp & 0x3) {
+ if ((intptr_t)fcp & 0x3) {
m->m_flags &= ~M_PKTHDR;
if (m->m_flags & M_EXT)
m->m_data = m->m_ext.ext_buf +
diff --git a/sys/pci/ide_pci.c b/sys/pci/ide_pci.c
index d358d9a..68df969 100644
--- a/sys/pci/ide_pci.c
+++ b/sys/pci/ide_pci.c
@@ -26,7 +26,7 @@
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: ide_pci.c,v 1.12 1998/06/17 14:58:03 bde Exp $
+ * $Id: ide_pci.c,v 1.13 1998/07/11 07:45:52 bde Exp $
*/
#include "pci.h"
@@ -1283,7 +1283,7 @@ ide_pci_dmasetup(void *xcp, char *vaddr, u_long vcount, int dir)
/* Generate first PRD entry, which may be non-aligned. */
- firstpage = PAGE_SIZE - ((u_long)vaddr & PAGE_MASK);
+ firstpage = PAGE_SIZE - ((uintptr_t)vaddr & PAGE_MASK);
prd_base = vtophys(vaddr);
prd_count = MIN(count, firstpage);
diff --git a/sys/pci/if_de.c b/sys/pci/if_de.c
index e0a128e..054fc20 100644
--- a/sys/pci/if_de.c
+++ b/sys/pci/if_de.c
@@ -1,5 +1,5 @@
/* $NetBSD: if_de.c,v 1.72 1998/07/05 06:49:14 jonathan Exp $ */
-/* $Id: if_de.c,v 1.83 1998/06/13 17:19:59 peter Exp $ */
+/* $Id: if_de.c,v 1.84 1998/07/08 01:24:37 peter Exp $ */
/*-
* Copyright (c) 1994-1997 Matt Thomas (matt@3am-software.com)
@@ -4342,7 +4342,7 @@ tulip_txput(
do {
int len = m0->m_len;
caddr_t addr = mtod(m0, caddr_t);
- unsigned clsize = CLBYTES - (((u_long) addr) & (CLBYTES-1));
+ unsigned clsize = CLBYTES - (((uintptr_t) addr) & (CLBYTES-1));
while (len > 0) {
unsigned slen = min(len, clsize);
diff --git a/sys/sys/sem.h b/sys/sys/sem.h
index debd599..a57e9b8 100644
--- a/sys/sys/sem.h
+++ b/sys/sys/sem.h
@@ -1,4 +1,4 @@
-/* $Id: sem.h,v 1.13 1997/09/07 05:27:21 bde Exp $ */
+/* $Id: sem.h,v 1.14 1998/05/31 04:09:09 steve Exp $ */
/* $NetBSD: sem.h,v 1.5 1994/06/29 06:45:15 cgd Exp $ */
/*
@@ -150,7 +150,7 @@ extern int *semu; /* undo structure pool */
/*
* Macro to find a particular sem_undo vector
*/
-#define SEMU(ix) ((struct sem_undo *)(((long)semu)+ix * SEMUSZ))
+#define SEMU(ix) ((struct sem_undo *)(((intptr_t)semu)+ix * SEMUSZ))
/*
* Process sem_undo vectors at proc exit.
diff --git a/sys/ufs/ufs/ufs_quota.c b/sys/ufs/ufs/ufs_quota.c
index b899ebe..c833cdf 100644
--- a/sys/ufs/ufs/ufs_quota.c
+++ b/sys/ufs/ufs/ufs_quota.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)ufs_quota.c 8.5 (Berkeley) 5/20/95
- * $Id: ufs_quota.c,v 1.22 1998/06/04 17:03:16 dfr Exp $
+ * $Id: ufs_quota.c,v 1.23 1998/06/21 14:53:40 bde Exp $
*/
#include <sys/param.h>
@@ -687,7 +687,7 @@ again:
* Code pertaining to management of the in-core dquot data structures.
*/
#define DQHASH(dqvp, id) \
- (&dqhashtbl[((((long)(dqvp)) >> 8) + id) & dqhash])
+ (&dqhashtbl[((((intptr_t)(dqvp)) >> 8) + id) & dqhash])
static LIST_HEAD(dqhash, dquot) *dqhashtbl;
static u_long dqhash;
diff --git a/sys/vm/device_pager.c b/sys/vm/device_pager.c
index 348ace0..6bf0955 100644
--- a/sys/vm/device_pager.c
+++ b/sys/vm/device_pager.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)device_pager.c 8.1 (Berkeley) 6/11/93
- * $Id: device_pager.c,v 1.29 1998/02/04 22:33:40 eivind Exp $
+ * $Id: device_pager.c,v 1.30 1998/02/06 12:14:20 eivind Exp $
*/
#include <sys/param.h>
@@ -100,7 +100,7 @@ dev_pager_alloc(void *handle, vm_size_t size, vm_prot_t prot, vm_ooffset_t foff)
/*
* Make sure this device can be mapped.
*/
- dev = (dev_t) (u_long) handle;
+ dev = (dev_t) (uintptr_t) handle;
mapfunc = cdevsw[major(dev)]->d_mmap;
if (mapfunc == NULL || mapfunc == (d_mmap_t *)nullop) {
printf("obsolete map function %p\n", (void *)mapfunc);
@@ -194,7 +194,7 @@ dev_pager_getpages(object, m, count, reqpage)
d_mmap_t *mapfunc;
int prot;
- dev = (dev_t) (u_long) object->handle;
+ dev = (dev_t) (uintptr_t) object->handle;
offset = m[reqpage]->pindex + OFF_TO_IDX(object->paging_offset);
prot = PROT_READ; /* XXX should pass in? */
mapfunc = cdevsw[major(dev)]->d_mmap;
diff --git a/sys/vm/vm_mmap.c b/sys/vm/vm_mmap.c
index 026f4c2..b66d5c7 100644
--- a/sys/vm/vm_mmap.c
+++ b/sys/vm/vm_mmap.c
@@ -38,7 +38,7 @@
* from: Utah $Hdr: vm_mmap.c 1.6 91/10/21$
*
* @(#)vm_mmap.c 8.4 (Berkeley) 1/12/94
- * $Id: vm_mmap.c,v 1.79 1998/06/21 18:02:47 bde Exp $
+ * $Id: vm_mmap.c,v 1.80 1998/07/05 11:56:52 dfr Exp $
*/
/*
@@ -970,7 +970,7 @@ vm_mmap(vm_map_t map, vm_offset_t *addr, vm_size_t size, vm_prot_t prot,
vp = (struct vnode *) handle;
if (vp->v_type == VCHR) {
type = OBJT_DEVICE;
- handle = (void *)(long)vp->v_rdev;
+ handle = (void *)(intptr_t)vp->v_rdev;
} else {
struct vattr vat;
int error;
OpenPOWER on IntegriCloud