summaryrefslogtreecommitdiff
path: root/i386/include
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2012-03-18 20:45:17 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2012-03-18 20:45:17 +0100
commitea5d3cf263142034d2edbcbf6655d55b215a9edc (patch)
tree8bce1cb0bfb76b6be4de4d16ae2c88f594d8084b /i386/include
parent9c923006bddc1bcbeadec99aa92a0214f6d6dcfd (diff)
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.
Diffstat (limited to 'i386/include')
-rw-r--r--i386/include/mach/i386/vm_param.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/i386/include/mach/i386/vm_param.h b/i386/include/mach/i386/vm_param.h
index 6d7c5f3..8f708f0 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.