diff options
author | bde <bde@FreeBSD.org> | 1998-08-16 01:21:52 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1998-08-16 01:21:52 +0000 |
commit | 9e27b29fba08158ea646560dc2c0f671e17923cf (patch) | |
tree | ca50bac0920c7e526393546681e1b22c87541004 /sys/i386/ibcs2 | |
parent | e14b44bbf30df0b2ba5a4750b2c2806bcae489eb (diff) | |
download | FreeBSD-src-9e27b29fba08158ea646560dc2c0f671e17923cf.zip FreeBSD-src-9e27b29fba08158ea646560dc2c0f671e17923cf.tar.gz |
Use [u]intptr_t instead of [u_]long for casts between pointers and
integers. Don't forget to cast to (void *) as well.
Diffstat (limited to 'sys/i386/ibcs2')
-rw-r--r-- | sys/i386/ibcs2/ibcs2_xenix.c | 5 | ||||
-rw-r--r-- | sys/i386/ibcs2/imgact_coff.c | 16 |
2 files changed, 12 insertions, 9 deletions
diff --git a/sys/i386/ibcs2/ibcs2_xenix.c b/sys/i386/ibcs2/ibcs2_xenix.c index 8694e2a..0677ede 100644 --- a/sys/i386/ibcs2/ibcs2_xenix.c +++ b/sys/i386/ibcs2/ibcs2_xenix.c @@ -27,7 +27,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: ibcs2_xenix.c,v 1.14 1997/11/06 19:28:46 phk Exp $ + * $Id: ibcs2_xenix.c,v 1.15 1998/06/02 05:39:07 dyson Exp $ */ #include <sys/param.h> @@ -168,7 +168,8 @@ xenix_utsname(struct proc *p, struct xenix_utsname_args *uap) ibcs2_sco_uname.sysorigin = 0xFFFF; ibcs2_sco_uname.sysoem = 0xFFFF; ibcs2_sco_uname.numcpu = 1; - return copyout((caddr_t)&ibcs2_sco_uname, (caddr_t)uap->addr, + return copyout((caddr_t)&ibcs2_sco_uname, + (caddr_t)(void *)(intptr_t)uap->addr, sizeof(struct ibcs2_sco_utsname)); } diff --git a/sys/i386/ibcs2/imgact_coff.c b/sys/i386/ibcs2/imgact_coff.c index d38c7b6..9308e9d 100644 --- a/sys/i386/ibcs2/imgact_coff.c +++ b/sys/i386/ibcs2/imgact_coff.c @@ -26,7 +26,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: imgact_coff.c,v 1.29 1998/02/09 06:08:20 eivind Exp $ + * $Id: imgact_coff.c,v 1.30 1998/02/11 01:46:47 eivind Exp $ */ #include <sys/param.h> @@ -257,13 +257,13 @@ coff_load_file(struct proc *p, char *name) } if (error = load_coff_section(vmspace, vp, text_offset, - (caddr_t)text_address, + (caddr_t)(void *)(uintptr_t)text_address, text_size, text_size, VM_PROT_READ | VM_PROT_EXECUTE)) { goto dealloc_and_fail; } if (error = load_coff_section(vmspace, vp, data_offset, - (caddr_t)data_address, + (caddr_t)(void *)(uintptr_t)data_address, data_size + bss_size, data_size, VM_PROT_ALL)) { goto dealloc_and_fail; @@ -417,7 +417,8 @@ exec_coff_imgact(imgp) __FILE__, __LINE__, text_offset, text_address, text_size, text_size, VM_PROT_READ | VM_PROT_EXECUTE)); if (error = load_coff_section(vmspace, imgp->vp, - text_offset, (caddr_t)text_address, + text_offset, + (caddr_t)(void *)(uintptr_t)text_address, text_size, text_size, VM_PROT_READ | VM_PROT_EXECUTE)) { DPRINTF(("%s(%d): error = %d\n", __FILE__, __LINE__, error)); @@ -433,7 +434,8 @@ exec_coff_imgact(imgp) __FILE__, __LINE__, data_offset, data_address, data_size + bss_size, data_size, VM_PROT_ALL)); if (error = load_coff_section(vmspace, imgp->vp, - data_offset, (caddr_t)data_address, + data_offset, + (caddr_t)(void *)(uintptr_t)data_address, data_size + bss_size, data_size, VM_PROT_ALL)) { @@ -446,8 +448,8 @@ exec_coff_imgact(imgp) vmspace->vm_tsize = round_page(text_size) >> PAGE_SHIFT; vmspace->vm_dsize = round_page(data_size + bss_size) >> PAGE_SHIFT; - vmspace->vm_taddr = (caddr_t)text_address; - vmspace->vm_daddr = (caddr_t)data_address; + vmspace->vm_taddr = (caddr_t)(void *)(uintptr_t)text_address; + vmspace->vm_daddr = (caddr_t)(void *)(uintptr_t)data_address; hole = (caddr_t)trunc_page(vmspace->vm_daddr) + ctob(vmspace->vm_dsize); |