From ea5d3cf263142034d2edbcbf6655d55b215a9edc Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sun, 18 Mar 2012 20:45:17 +0100 Subject: Use unsigned long types for addresses * i386/include/mach/i386/vm_param.h (i386_btop, i386_ptob, i386_round_page, i386_trunc_page): Cast to unsigned long. --- i386/include/mach/i386/vm_param.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/i386/include/mach/i386/vm_param.h b/i386/include/mach/i386/vm_param.h index 6d7c5f3c..8f708f0f 100644 --- a/i386/include/mach/i386/vm_param.h +++ b/i386/include/mach/i386/vm_param.h @@ -52,8 +52,8 @@ * No rounding is used. */ -#define i386_btop(x) (((unsigned)(x)) >> I386_PGSHIFT) -#define i386_ptob(x) (((unsigned)(x)) << I386_PGSHIFT) +#define i386_btop(x) (((unsigned long)(x)) >> I386_PGSHIFT) +#define i386_ptob(x) (((unsigned long)(x)) << I386_PGSHIFT) /* * Round off or truncate to the nearest page. These will work @@ -61,9 +61,9 @@ * bytes.) */ -#define i386_round_page(x) ((((unsigned)(x)) + I386_PGBYTES - 1) & \ +#define i386_round_page(x) ((((unsigned long)(x)) + I386_PGBYTES - 1) & \ ~(I386_PGBYTES-1)) -#define i386_trunc_page(x) (((unsigned)(x)) & ~(I386_PGBYTES-1)) +#define i386_trunc_page(x) (((unsigned long)(x)) & ~(I386_PGBYTES-1)) /* User address spaces are 3GB each, starting at virtual and linear address 0. -- cgit v1.2.3