diff options
author | Philip Guenthe <guenther@cvs.openbsd.org> | 2011-09-08 03:40:33 +0000 |
---|---|---|
committer | Philip Guenthe <guenther@cvs.openbsd.org> | 2011-09-08 03:40:33 +0000 |
commit | 211427d868f8aecd29999f2831103f73bfc92516 (patch) | |
tree | 5a25fcd1af5efcfaa5c78baf48489585ce16228e /sys/arch/solbourne/include/param.h | |
parent | 6f53e4ebb844e940e8bd7264ebb259719834ebe2 (diff) |
Provide namespace-safe alignment macros in <machine/_types.h>, with
compat names kept in <machine/param.h>. In <sys/socket.h>, pull
in <sys/_types.h> instead of the namespace polluting <machine/param.h>
and completely eliminate __CMSG_ALIGN, replaced by _ALIGN
ok deraadt@
Diffstat (limited to 'sys/arch/solbourne/include/param.h')
-rw-r--r-- | sys/arch/solbourne/include/param.h | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/sys/arch/solbourne/include/param.h b/sys/arch/solbourne/include/param.h index 2932a7423ee..5ae0c528f8e 100644 --- a/sys/arch/solbourne/include/param.h +++ b/sys/arch/solbourne/include/param.h @@ -1,4 +1,4 @@ -/* $OpenBSD: param.h,v 1.9 2011/04/07 15:45:18 miod Exp $ */ +/* $OpenBSD: param.h,v 1.10 2011/09/08 03:40:32 guenther Exp $ */ /* OpenBSD: param.h,v 1.29 2004/08/06 22:31:31 mickey Exp */ /* @@ -56,20 +56,9 @@ #endif /* XXX */ #endif /* XXX */ -/* - * Round p (pointer or byte index) up to a correctly-aligned value for - * 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 - * is valid to fetch data elements of type t from on this architecture. - * This does not reflect the optimal alignment, just the possibility - * (within reasonable limits). - * - */ -#define ALIGNBYTES 7 -#define ALIGN(p) (((u_long)(p) + ALIGNBYTES) & ~ALIGNBYTES) -#define ALIGNED_POINTER(p,t) ((((u_long)(p)) & (sizeof(t)-1)) == 0) +#define ALIGNBYTES _ALIGNBYTES +#define ALIGN(p) _ALIGN(p) +#define ALIGNED_POINTER(p,t) _ALIGNED_POINTER(p,t) #define SUN4_PGSHIFT 13 /* for a sun4 machine */ #define SUN4CM_PGSHIFT 12 /* for a sun4c or sun4m machine */ |