Source-Changes-HG archive

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

[src/trunk]: src/sys fix LP64 warnings.



details:   https://anonhg.NetBSD.org/src/rev/856c8fc481a7
branches:  trunk
changeset: 495398:856c8fc481a7
user:      mrg <mrg%NetBSD.org@localhost>
date:      Thu Jul 27 14:00:56 2000 +0000

description:
fix LP64 warnings.

diffstat:

 sys/compat/common/kern_ipc_10.c |  22 ++++++++++++++--------
 sys/compat/sunos/sunos_ioctl.c  |   7 ++++---
 sys/compat/svr4/svr4_fcntl.c    |   4 ++--
 sys/compat/svr4/svr4_misc.c     |   6 +++---
 sys/compat/svr4/svr4_signal.c   |   4 ++--
 sys/compat/svr4/svr4_stream.c   |   4 ++--
 sys/kern/kern_sig.c             |   6 +++---
 7 files changed, 30 insertions(+), 23 deletions(-)

diffs (208 lines):

diff -r 2a8de3312baf -r 856c8fc481a7 sys/compat/common/kern_ipc_10.c
--- a/sys/compat/common/kern_ipc_10.c   Thu Jul 27 13:59:26 2000 +0000
+++ b/sys/compat/common/kern_ipc_10.c   Thu Jul 27 14:00:56 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_ipc_10.c,v 1.11 2000/06/28 15:39:25 mrg Exp $     */
+/*     $NetBSD: kern_ipc_10.c,v 1.12 2000/07/27 14:00:56 mrg Exp $     */
 
 /*
  * Copyright (c) 1994 Adam Glass and Charles M. Hannum.  All rights reserved.
@@ -98,7 +98,8 @@
 
        case 2:                                         /* semop() */
                SCARG(&semop_args, semid) = SCARG(uap, a2);
-               SCARG(&semop_args, sops) = (struct sembuf *)SCARG(uap, a3);
+               SCARG(&semop_args, sops) =
+                   (struct sembuf *)(u_long)SCARG(uap, a3);
                SCARG(&semop_args, nsops) = SCARG(uap, a4);
                return (sys_semop(p, &semop_args, retval));
 
@@ -147,18 +148,21 @@
        switch (SCARG(uap, which)) {
        case 0:                                         /* shmat() */
                SCARG(&shmat_args, shmid) = SCARG(uap, a2);
-               SCARG(&shmat_args, shmaddr) = (void *)SCARG(uap, a3);
+               SCARG(&shmat_args, shmaddr) =
+                   (void *)(u_long)SCARG(uap, a3);
                SCARG(&shmat_args, shmflg) = SCARG(uap, a4);
                return (sys_shmat(p, &shmat_args, retval));
 
        case 1:                                         /* shmctl() */
                SCARG(&shmctl_args, shmid) = SCARG(uap, a2);
                SCARG(&shmctl_args, cmd) = SCARG(uap, a3);
-               SCARG(&shmctl_args, buf) = (struct shmid_ds14 *)SCARG(uap, a4);
+               SCARG(&shmctl_args, buf) =
+                   (struct shmid_ds14 *)(u_long)SCARG(uap, a4);
                return (compat_14_sys_shmctl(p, &shmctl_args, retval));
 
        case 2:                                         /* shmdt() */
-               SCARG(&shmdt_args, shmaddr) = (void *)SCARG(uap, a2);
+               SCARG(&shmdt_args, shmaddr) =
+                   (void *)(u_long)SCARG(uap, a2);
                return (sys_shmdt(p, &shmdt_args, retval));
 
        case 3:                                         /* shmget() */
@@ -216,7 +220,7 @@
                SCARG(&msgctl_args, msqid) = SCARG(uap, a2);
                SCARG(&msgctl_args, cmd) = SCARG(uap, a3);
                SCARG(&msgctl_args, buf) =
-                   (struct msqid_ds14 *)SCARG(uap, a4);
+                   (struct msqid_ds14 *)(u_long)SCARG(uap, a4);
                return (compat_14_sys_msgctl(p, &msgctl_args, retval));
 
        case 1:                                 /* msgget() */
@@ -226,14 +230,16 @@
 
        case 2:                                 /* msgsnd() */
                SCARG(&msgsnd_args, msqid) = SCARG(uap, a2);
-               SCARG(&msgsnd_args, msgp) = (void *)SCARG(uap, a3);
+               SCARG(&msgsnd_args, msgp) =
+                   (void *)(u_long)SCARG(uap, a3);
                SCARG(&msgsnd_args, msgsz) = SCARG(uap, a4);
                SCARG(&msgsnd_args, msgflg) = SCARG(uap, a5);
                return (sys_msgsnd(p, &msgsnd_args, retval));
 
        case 3:                                 /* msgrcv() */
                SCARG(&msgrcv_args, msqid) = SCARG(uap, a2);
-               SCARG(&msgrcv_args, msgp) = (void *)SCARG(uap, a3);
+               SCARG(&msgrcv_args, msgp) =
+                   (void *)(u_long)SCARG(uap, a3);
                SCARG(&msgrcv_args, msgsz) = SCARG(uap, a4);
                SCARG(&msgrcv_args, msgtyp) = SCARG(uap, a5);
                SCARG(&msgrcv_args, msgflg) = SCARG(uap, a6);
diff -r 2a8de3312baf -r 856c8fc481a7 sys/compat/sunos/sunos_ioctl.c
--- a/sys/compat/sunos/sunos_ioctl.c    Thu Jul 27 13:59:26 2000 +0000
+++ b/sys/compat/sunos/sunos_ioctl.c    Thu Jul 27 14:00:56 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sunos_ioctl.c,v 1.31 2000/03/30 11:27:19 augustss Exp $        */
+/*     $NetBSD: sunos_ioctl.c,v 1.32 2000/07/27 14:00:56 mrg Exp $     */
 
 /*
  * Copyright (c) 1993 Markus Wild.
@@ -804,7 +804,7 @@
        case _IO('S', 5):       /* I_FLUSH */
            {
                int tmp = 0;
-               switch ((int)SCARG(uap, data)) {
+               switch ((int)(u_long)SCARG(uap, data)) {
                case SUNOS_S_FLUSHR:    tmp = FREAD;
                case SUNOS_S_FLUSHW:    tmp = FWRITE;
                case SUNOS_S_FLUSHRW:   tmp = FREAD|FWRITE;
@@ -814,7 +814,8 @@
        case _IO('S', 9):       /* I_SETSIG */
            {
                int on = 1;
-               if (((int)SCARG(uap, data) & (SUNOS_S_HIPRI|SUNOS_S_INPUT)) ==
+               if (((int)(u_long)SCARG(uap, data) &
+                       (SUNOS_S_HIPRI|SUNOS_S_INPUT)) ==
                    SUNOS_S_HIPRI)
                        return EOPNOTSUPP;
                 return (*ctl)(fp, FIOASYNC, (caddr_t)&on, p);
diff -r 2a8de3312baf -r 856c8fc481a7 sys/compat/svr4/svr4_fcntl.c
--- a/sys/compat/svr4/svr4_fcntl.c      Thu Jul 27 13:59:26 2000 +0000
+++ b/sys/compat/svr4/svr4_fcntl.c      Thu Jul 27 14:00:56 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: svr4_fcntl.c,v 1.34 2000/03/30 11:27:19 augustss Exp $  */
+/*     $NetBSD: svr4_fcntl.c,v 1.35 2000/07/27 14:00:56 mrg Exp $       */
 
 /*-
  * Copyright (c) 1994, 1997 The NetBSD Foundation, Inc.
@@ -658,7 +658,7 @@
                                struct sys_dup2_args du;
 
                                SCARG(&du, from) = SCARG(uap, fd);
-                               SCARG(&du, to) = (int)SCARG(uap, arg);
+                               SCARG(&du, to) = (int)(u_long)SCARG(uap, arg);
                                error = sys_dup2(p, &du, retval);
                                if (error)
                                        return error;
diff -r 2a8de3312baf -r 856c8fc481a7 sys/compat/svr4/svr4_misc.c
--- a/sys/compat/svr4/svr4_misc.c       Thu Jul 27 13:59:26 2000 +0000
+++ b/sys/compat/svr4/svr4_misc.c       Thu Jul 27 14:00:56 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: svr4_misc.c,v 1.84 2000/06/28 15:39:35 mrg Exp $        */
+/*     $NetBSD: svr4_misc.c,v 1.85 2000/07/27 14:00:56 mrg Exp $        */
 
 /*-
  * Copyright (c) 1994 The NetBSD Foundation, Inc.
@@ -1586,7 +1586,7 @@
 
                        SCARG(&msa, addr) = SCARG(uap, addr);
                        SCARG(&msa, len) = SCARG(uap, len);
-                       SCARG(&msa, flags) = (int)SCARG(uap, arg);
+                       SCARG(&msa, flags) = (int)(u_long)SCARG(uap, arg);
 
                        return sys___msync13(p, &msa, retval);
                }
@@ -1596,7 +1596,7 @@
 
                        SCARG(&maa, addr) = SCARG(uap, addr);
                        SCARG(&maa, len) = SCARG(uap, len);
-                       SCARG(&maa, behav) = (int)SCARG(uap, arg);
+                       SCARG(&maa, behav) = (int)(u_long)SCARG(uap, arg);
 
                        return sys_madvise(p, &maa, retval);
                }
diff -r 2a8de3312baf -r 856c8fc481a7 sys/compat/svr4/svr4_signal.c
--- a/sys/compat/svr4/svr4_signal.c     Thu Jul 27 13:59:26 2000 +0000
+++ b/sys/compat/svr4/svr4_signal.c     Thu Jul 27 14:00:56 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: svr4_signal.c,v 1.38 2000/04/09 06:28:28 christos Exp $         */
+/*     $NetBSD: svr4_signal.c,v 1.39 2000/07/27 14:00:56 mrg Exp $      */
 
 /*-
  * Copyright (c) 1994, 1998 The NetBSD Foundation, Inc.
@@ -375,7 +375,7 @@
                error = sigaction1(p, signum, &nbsa, &obsa);
                if (error)
                        return (error);
-               *retval = (int)obsa.sa_handler;
+               *retval = (u_int)(u_long)obsa.sa_handler;
                return (0);
 
        case SVR4_SIGHOLD_MASK:
diff -r 2a8de3312baf -r 856c8fc481a7 sys/compat/svr4/svr4_stream.c
--- a/sys/compat/svr4/svr4_stream.c     Thu Jul 27 13:59:26 2000 +0000
+++ b/sys/compat/svr4/svr4_stream.c     Thu Jul 27 14:00:56 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: svr4_stream.c,v 1.38 2000/04/12 15:12:13 christos Exp $         */
+/*     $NetBSD: svr4_stream.c,v 1.39 2000/07/27 14:00:56 mrg Exp $      */
 
 /*-
  * Copyright (c) 1994 The NetBSD Foundation, Inc.
@@ -1259,7 +1259,7 @@
        /* set up SIGIO receiver if needed */
        if (dat != NULL) {
                SCARG(&fa, cmd) = F_SETOWN;
-               SCARG(&fa, arg) = (void *) p->p_pid;
+               SCARG(&fa, arg) = (void *)(u_long)p->p_pid;
                return sys_fcntl(p, &fa, &flags);
        }
        return 0;
diff -r 2a8de3312baf -r 856c8fc481a7 sys/kern/kern_sig.c
--- a/sys/kern/kern_sig.c       Thu Jul 27 13:59:26 2000 +0000
+++ b/sys/kern/kern_sig.c       Thu Jul 27 14:00:56 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_sig.c,v 1.102 2000/07/08 18:10:25 sommerfeld Exp $        */
+/*     $NetBSD: kern_sig.c,v 1.103 2000/07/27 14:01:57 mrg Exp $       */
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1991, 1993
@@ -1393,7 +1393,7 @@
                if (error)
                        goto out;
                error = vn_rdwr(UIO_WRITE, vp,
-                   (caddr_t) trunc_page(USRSTACK - ctob(vm->vm_ssize)),
+                   (caddr_t)(u_long)trunc_page(USRSTACK - ctob(vm->vm_ssize)),
                    core.c_ssize,
                    (off_t)(core.c_cpusize + core.c_dsize), UIO_USERSPACE,
                    IO_NODELOCKED|IO_UNIT, cred, NULL, p);
@@ -1471,7 +1471,7 @@
                if (error)
                        goto out;
                error = vn_rdwr(UIO_WRITE, vp,
-                   (caddr_t) trunc_page(USRSTACK - ctob(vm->vm_ssize)),
+                   (caddr_t)(u_long)trunc_page(USRSTACK - ctob(vm->vm_ssize)),
                    core.c_ssize,
                    (off_t)(core.c_cpusize + core.c_dsize), UIO_USERSPACE,
                    IO_NODELOCKED|IO_UNIT, cred, NULL, p);



Home | Main Index | Thread Index | Old Index