diff options
author | ed <ed@FreeBSD.org> | 2016-05-31 13:31:19 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2016-05-31 13:31:19 +0000 |
commit | 79cf319baedad2cf81b737b2cb00f2087f8fa679 (patch) | |
tree | caa918689b7e7cef1501bcbde0cfa91d016a2630 /sys/x86/include/_align.h | |
parent | 968b0346dded50130f7a3fe8864178baf0f0cef8 (diff) | |
download | FreeBSD-src-79cf319baedad2cf81b737b2cb00f2087f8fa679.zip FreeBSD-src-79cf319baedad2cf81b737b2cb00f2087f8fa679.tar.gz |
Implement _ALIGN() using internal integer types.
The existing version depends on register_t and uintptr_t, which are only
available when including headers such as <sys/types.h>. As this macro is
used by <sys/socket.h>, for example, it should be written in such a way
that it doesn't depend on those types.
Diffstat (limited to 'sys/x86/include/_align.h')
-rw-r--r-- | sys/x86/include/_align.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/x86/include/_align.h b/sys/x86/include/_align.h index 0d0981b..9f7b6b9 100644 --- a/sys/x86/include/_align.h +++ b/sys/x86/include/_align.h @@ -46,7 +46,7 @@ * for all data types (int, long, ...). The result is unsigned int * and must be cast to any desired pointer type. */ -#define _ALIGNBYTES (sizeof(register_t) - 1) -#define _ALIGN(p) (((uintptr_t)(p) + _ALIGNBYTES) & ~_ALIGNBYTES) +#define _ALIGNBYTES (sizeof(__register_t) - 1) +#define _ALIGN(p) (((__uintptr_t)(p) + _ALIGNBYTES) & ~_ALIGNBYTES) #endif /* !_X86_INCLUDE__ALIGN_H_ */ |