diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2011-04-07 15:45:19 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2011-04-07 15:45:19 +0000 |
commit | 0c04d1ff464573bd89ea1884ad71bed30df9c9c0 (patch) | |
tree | c10b2184e017cd1cb87b7608fb3cf89e433c3151 | |
parent | aa1d707b3d33489f4d03816c38e6aa3451ae4fd5 (diff) |
Make sure the ALIGN() macro uses u_long on all platforms for consistency, and
update the comment block accordingly.
-rw-r--r-- | sys/arch/arm/include/param.h | 6 | ||||
-rw-r--r-- | sys/arch/hppa/include/param.h | 4 | ||||
-rw-r--r-- | sys/arch/hppa64/include/param.h | 4 | ||||
-rw-r--r-- | sys/arch/i386/include/param.h | 6 | ||||
-rw-r--r-- | sys/arch/m68k/include/param.h | 6 | ||||
-rw-r--r-- | sys/arch/m88k/include/param.h | 6 | ||||
-rw-r--r-- | sys/arch/mips64/include/param.h | 4 | ||||
-rw-r--r-- | sys/arch/powerpc/include/param.h | 4 | ||||
-rw-r--r-- | sys/arch/sh/include/param.h | 6 | ||||
-rw-r--r-- | sys/arch/solbourne/include/param.h | 6 | ||||
-rw-r--r-- | sys/arch/sparc/include/param.h | 6 | ||||
-rw-r--r-- | sys/arch/sparc64/include/param.h | 4 | ||||
-rw-r--r-- | sys/arch/vax/include/param.h | 6 |
13 files changed, 34 insertions, 34 deletions
diff --git a/sys/arch/arm/include/param.h b/sys/arch/arm/include/param.h index c093e21ab35..15327ffeb85 100644 --- a/sys/arch/arm/include/param.h +++ b/sys/arch/arm/include/param.h @@ -1,4 +1,4 @@ -/* $OpenBSD: param.h,v 1.14 2010/11/20 20:15:28 miod Exp $ */ +/* $OpenBSD: param.h,v 1.15 2011/04/07 15:45:16 miod Exp $ */ /* $NetBSD: param.h,v 1.9 2002/03/24 03:37:23 thorpej Exp $ */ /* @@ -138,11 +138,11 @@ void delay (unsigned); * */ #define ALIGNBYTES (sizeof(int) - 1) -#define ALIGN(p) (((u_int)(p) + ALIGNBYTES) &~ ALIGNBYTES) +#define ALIGN(p) (((u_long)(p) + ALIGNBYTES) &~ ALIGNBYTES) #define ALIGNED_POINTER(p,t) ((((u_long)(p)) & (sizeof(t)-1)) == 0) /* ARM-specific macro to align a stack pointer (downwards). */ #define STACKALIGNBYTES (8 - 1) -#define STACKALIGN(p) ((u_int)(p) &~ STACKALIGNBYTES) +#define STACKALIGN(p) ((u_long)(p) &~ STACKALIGNBYTES) #define DEV_BSHIFT 9 /* log2(DEV_BSIZE) */ #define DEV_BSIZE (1 << DEV_BSHIFT) diff --git a/sys/arch/hppa/include/param.h b/sys/arch/hppa/include/param.h index 3d0c56e357e..56a137d65e2 100644 --- a/sys/arch/hppa/include/param.h +++ b/sys/arch/hppa/include/param.h @@ -1,4 +1,4 @@ -/* $OpenBSD: param.h,v 1.39 2010/10/26 17:24:34 deraadt Exp $ */ +/* $OpenBSD: param.h,v 1.40 2011/04/07 15:45:17 miod Exp $ */ /* * Copyright (c) 1988-1994, The University of Utah and @@ -38,7 +38,7 @@ /* * Round p (pointer or byte index) up to a correctly-aligned value for all - * data types (int, long, ...). The result is u_int and must be cast to + * data types (int, long, ...). The result is u_long and must be cast to * any desired pointer type. */ #define ALIGNBYTES 7 diff --git a/sys/arch/hppa64/include/param.h b/sys/arch/hppa64/include/param.h index 78ab4ca3810..0438592f875 100644 --- a/sys/arch/hppa64/include/param.h +++ b/sys/arch/hppa64/include/param.h @@ -1,4 +1,4 @@ -/* $OpenBSD: param.h,v 1.12 2010/07/01 04:20:38 jsing Exp $ */ +/* $OpenBSD: param.h,v 1.13 2011/04/07 15:45:17 miod Exp $ */ /* * Copyright (c) 1988-1994, The University of Utah and @@ -38,7 +38,7 @@ /* * Round p (pointer or byte index) up to a correctly-aligned value for all - * data types (int, long, ...). The result is u_int and must be cast to + * data types (int, long, ...). The result is u_long and must be cast to * any desired pointer type. */ #define ALIGNBYTES 7 diff --git a/sys/arch/i386/include/param.h b/sys/arch/i386/include/param.h index dc8a640568b..d243514739b 100644 --- a/sys/arch/i386/include/param.h +++ b/sys/arch/i386/include/param.h @@ -1,4 +1,4 @@ -/* $OpenBSD: param.h,v 1.42 2007/10/01 12:10:55 martin Exp $ */ +/* $OpenBSD: param.h,v 1.43 2011/04/07 15:45:17 miod Exp $ */ /* $NetBSD: param.h,v 1.29 1996/03/04 05:04:26 cgd Exp $ */ /*- @@ -55,7 +55,7 @@ /* * Round p (pointer or byte index) up to a correctly-aligned value - * for all data types (int, long, ...). The result is u_int and + * for all data types (int, long, ...). The result is u_long and * must be cast to any desired pointer type. * * ALIGNED_POINTER is a boolean macro that checks whether an address @@ -64,7 +64,7 @@ * (within reasonable limits). */ #define ALIGNBYTES (sizeof(int) - 1) -#define ALIGN(p) (((u_int)(p) + ALIGNBYTES) &~ ALIGNBYTES) +#define ALIGN(p) (((u_long)(p) + ALIGNBYTES) &~ ALIGNBYTES) #define ALIGNED_POINTER(p,t) 1 #define PGSHIFT 12 /* LOG2(NBPG) */ diff --git a/sys/arch/m68k/include/param.h b/sys/arch/m68k/include/param.h index a1ba58becea..59c8932eeff 100644 --- a/sys/arch/m68k/include/param.h +++ b/sys/arch/m68k/include/param.h @@ -1,4 +1,4 @@ -/* $OpenBSD: param.h,v 1.24 2010/06/29 20:30:32 guenther Exp $ */ +/* $OpenBSD: param.h,v 1.25 2011/04/07 15:45:17 miod Exp $ */ /* $NetBSD: param.h,v 1.2 1997/06/10 18:21:23 veego Exp $ */ /* @@ -50,7 +50,7 @@ /* * Round p (pointer or byte index) up to a correctly-aligned value for all - * data types (int, long, ...). The result is u_int and must be cast to + * data types (int, long, ...). The result is u_long and must be cast to * any desired pointer type. * * ALIGNED_POINTER is a boolean macro that checks whether an address @@ -60,7 +60,7 @@ * */ #define ALIGNBYTES (sizeof(int) - 1) -#define ALIGN(p) (((u_int)(p) + ALIGNBYTES) &~ ALIGNBYTES) +#define ALIGN(p) (((u_long)(p) + ALIGNBYTES) &~ ALIGNBYTES) #define ALIGNED_POINTER(p,t) ((((u_long)(p)) & (sizeof(t) - 1)) == 0) #define PAGE_SIZE (1 << PAGE_SHIFT) diff --git a/sys/arch/m88k/include/param.h b/sys/arch/m88k/include/param.h index 690629eb66c..a5b5a70c9ee 100644 --- a/sys/arch/m88k/include/param.h +++ b/sys/arch/m88k/include/param.h @@ -1,4 +1,4 @@ -/* $OpenBSD: param.h,v 1.12 2007/12/31 09:23:53 martin Exp $ */ +/* $OpenBSD: param.h,v 1.13 2011/04/07 15:45:17 miod Exp $ */ /* * Copyright (c) 1999 Steve Murphree, Jr. * Copyright (c) 1988 University of Utah. @@ -52,14 +52,14 @@ /* * Round p (pointer or byte index) down to a correctly-aligned value - * for all data types (int, long, ...). The result is u_int and + * for all data types (int, long, ...). The result is u_long and * must be cast to any desired pointer type. ALIGN() is used for * aligning stack, which needs to be on a double word boundary for * 88k. */ #define ALIGNBYTES 15 /* 64 bit alignment */ -#define ALIGN(p) (((u_int)(p) + ALIGNBYTES) & ~ALIGNBYTES) +#define ALIGN(p) (((u_long)(p) + ALIGNBYTES) & ~ALIGNBYTES) #define ALIGNED_POINTER(p,t) ((((u_long)(p)) & (sizeof(t)-1)) == 0) #define NBPG (1 << PGSHIFT) /* bytes/page */ diff --git a/sys/arch/mips64/include/param.h b/sys/arch/mips64/include/param.h index c1276defcf6..4c87da6be83 100644 --- a/sys/arch/mips64/include/param.h +++ b/sys/arch/mips64/include/param.h @@ -1,4 +1,4 @@ -/* $OpenBSD: param.h,v 1.28 2011/03/23 16:54:36 pirofti Exp $ */ +/* $OpenBSD: param.h,v 1.29 2011/04/07 15:45:17 miod Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -46,7 +46,7 @@ /* * Round p (pointer or byte index) up to a correctly-aligned value for all - * data types (int, long, ...). The result is u_int and must be cast to + * data types (int, long, ...). The result is u_long and must be cast to * any desired pointer type. */ #define ALIGNBYTES 7 diff --git a/sys/arch/powerpc/include/param.h b/sys/arch/powerpc/include/param.h index 89d2ac92102..640348a0be4 100644 --- a/sys/arch/powerpc/include/param.h +++ b/sys/arch/powerpc/include/param.h @@ -1,4 +1,4 @@ -/* $OpenBSD: param.h,v 1.30 2007/11/04 13:43:39 martin Exp $ */ +/* $OpenBSD: param.h,v 1.31 2011/04/07 15:45:17 miod Exp $ */ /* $NetBSD: param.h,v 1.1 1996/09/30 16:34:28 ws Exp $ */ /*- @@ -50,7 +50,7 @@ #define MID_MACHINE MID_POWERPC #define ALIGNBYTES (sizeof(double) - 1) -#define ALIGN(p) (((u_int)(p) + ALIGNBYTES) & ~ALIGNBYTES) +#define ALIGN(p) (((u_long)(p) + ALIGNBYTES) & ~ALIGNBYTES) #define ALIGNED_POINTER(p,t) ((((u_long)(p)) & (sizeof(t)-1)) == 0) #define PAGE_SHIFT 12 diff --git a/sys/arch/sh/include/param.h b/sys/arch/sh/include/param.h index 57243585b3d..320d8b0e909 100644 --- a/sys/arch/sh/include/param.h +++ b/sys/arch/sh/include/param.h @@ -1,4 +1,4 @@ -/* $OpenBSD: param.h,v 1.6 2011/03/23 16:54:37 pirofti Exp $ */ +/* $OpenBSD: param.h,v 1.7 2011/04/07 15:45:18 miod Exp $ */ /* $NetBSD: param.h,v 1.15 2006/08/28 13:43:35 yamt Exp $ */ /*- @@ -68,7 +68,7 @@ /* * Round p (pointer or byte index) up to a correctly-aligned value - * for all data types (int, long, ...). The result is u_int and + * for all data types (int, long, ...). The result is u_long and * must be cast to any desired pointer type. * * ALIGNED_POINTER is a boolean macro that checks whether an address @@ -78,7 +78,7 @@ * */ #define ALIGNBYTES (sizeof(int) - 1) -#define ALIGN(p) (((u_int)(p) + ALIGNBYTES) & ~ALIGNBYTES) +#define ALIGN(p) (((u_long)(p) + ALIGNBYTES) & ~ALIGNBYTES) #define ALIGNED_POINTER(p, t) ((((u_long)(p)) & (sizeof(t) - 1)) == 0) #define DEV_BSHIFT 9 /* log2(DEV_BSIZE) */ diff --git a/sys/arch/solbourne/include/param.h b/sys/arch/solbourne/include/param.h index 8fdef00c24d..2932a7423ee 100644 --- a/sys/arch/solbourne/include/param.h +++ b/sys/arch/solbourne/include/param.h @@ -1,4 +1,4 @@ -/* $OpenBSD: param.h,v 1.8 2011/03/23 16:54:37 pirofti Exp $ */ +/* $OpenBSD: param.h,v 1.9 2011/04/07 15:45:18 miod Exp $ */ /* OpenBSD: param.h,v 1.29 2004/08/06 22:31:31 mickey Exp */ /* @@ -58,7 +58,7 @@ /* * Round p (pointer or byte index) up to a correctly-aligned value for - * the machine's strictest data type. The result is u_int and must be + * the machine's strictest data type. The result is u_long and must be * cast to any desired pointer type. * * ALIGNED_POINTER is a boolean macro that checks whether an address @@ -68,7 +68,7 @@ * */ #define ALIGNBYTES 7 -#define ALIGN(p) (((u_int)(p) + ALIGNBYTES) & ~ALIGNBYTES) +#define ALIGN(p) (((u_long)(p) + ALIGNBYTES) & ~ALIGNBYTES) #define ALIGNED_POINTER(p,t) ((((u_long)(p)) & (sizeof(t)-1)) == 0) #define SUN4_PGSHIFT 13 /* for a sun4 machine */ diff --git a/sys/arch/sparc/include/param.h b/sys/arch/sparc/include/param.h index 36921c85089..4fa007fb73b 100644 --- a/sys/arch/sparc/include/param.h +++ b/sys/arch/sparc/include/param.h @@ -1,4 +1,4 @@ -/* $OpenBSD: param.h,v 1.44 2011/03/23 16:54:37 pirofti Exp $ */ +/* $OpenBSD: param.h,v 1.45 2011/04/07 15:45:18 miod Exp $ */ /* $NetBSD: param.h,v 1.29 1997/03/10 22:50:37 pk Exp $ */ /* @@ -63,7 +63,7 @@ /* * Round p (pointer or byte index) up to a correctly-aligned value for - * the machine's strictest data type. The result is u_int and must be + * the machine's strictest data type. The result is u_long and must be * cast to any desired pointer type. * * ALIGNED_POINTER is a boolean macro that checks whether an address @@ -73,7 +73,7 @@ * */ #define ALIGNBYTES 7 -#define ALIGN(p) (((u_int)(p) + ALIGNBYTES) & ~ALIGNBYTES) +#define ALIGN(p) (((u_long)(p) + ALIGNBYTES) & ~ALIGNBYTES) #define ALIGNED_POINTER(p,t) ((((u_long)(p)) & (sizeof(t)-1)) == 0) #define SUN4_PGSHIFT 13 /* for a sun4 machine */ diff --git a/sys/arch/sparc64/include/param.h b/sys/arch/sparc64/include/param.h index 998462b96fd..94c98840529 100644 --- a/sys/arch/sparc64/include/param.h +++ b/sys/arch/sparc64/include/param.h @@ -1,4 +1,4 @@ -/* $OpenBSD: param.h,v 1.34 2011/03/23 16:54:37 pirofti Exp $ */ +/* $OpenBSD: param.h,v 1.35 2011/04/07 15:45:18 miod Exp $ */ /* $NetBSD: param.h,v 1.25 2001/05/30 12:28:51 mrg Exp $ */ /* @@ -75,7 +75,7 @@ /* * Round p (pointer or byte index) up to a correctly-aligned value for - * the machine's strictest data type. The result is u_int and must be + * the machine's strictest data type. The result is u_long and must be * cast to any desired pointer type. * * ALIGNED_POINTER is a boolean macro that checks whether an address diff --git a/sys/arch/vax/include/param.h b/sys/arch/vax/include/param.h index aee4ea40275..db5dc86a438 100644 --- a/sys/arch/vax/include/param.h +++ b/sys/arch/vax/include/param.h @@ -1,4 +1,4 @@ -/* $OpenBSD: param.h,v 1.35 2011/03/23 16:54:37 pirofti Exp $ */ +/* $OpenBSD: param.h,v 1.36 2011/04/07 15:45:18 miod Exp $ */ /* $NetBSD: param.h,v 1.39 1999/10/22 21:14:34 ragge Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -49,7 +49,7 @@ /* * Round p (pointer or byte index) up to a correctly-aligned value - * for all data types (int, long, ...). The result is u_int and + * for all data types (int, long, ...). The result is u_long and * must be cast to any desired pointer type. * * ALIGNED_POINTER is a boolean macro that checks whether an address @@ -60,7 +60,7 @@ */ #define ALIGNBYTES (sizeof(int) - 1) -#define ALIGN(p) (((u_int)(p) + ALIGNBYTES) &~ ALIGNBYTES) +#define ALIGN(p) (((u_long)(p) + ALIGNBYTES) &~ ALIGNBYTES) #define ALIGNED_POINTER(p,t) ((((u_long)(p)) & (sizeof(t)-1)) == 0) #define PGSHIFT 12 /* LOG2(NBPG) */ |