#
f7aae1f1 |
| 09-Oct-2019 |
zrj <rimvydas.jasinskas@gmail.com> |
Add <machine/alignbytes.h>.
Refactor ALIGN* macros to fix issue in <sys/socket.h> after the _CMSG_ALIGN() macro was adjusted to use ALIGNBYTES definition. * Including <sys/param.h> would introduc
Add <machine/alignbytes.h>.
Refactor ALIGN* macros to fix issue in <sys/socket.h> after the _CMSG_ALIGN() macro was adjusted to use ALIGNBYTES definition. * Including <sys/param.h> would introduce major namespace pollution. * Use NetBSD variant of namespace friendly double underscore versions. * Instead of <machine/cdefs.h> put double underscore versions into self contained header to minimize header poisoning. * Provide __ALIGNPTR() macro to avoid visibility issues with uintptr_t. * Move out single underscore versions from <machine/param.h>. Keep them for OpenBSD compat that declares them in <ARCH/_types.h>. * Make non underscored versions user overridable (just like NetBSD). This is useful for cases where different alignment is needed.
Later on this new header can be adjusted to provide other alignment macros like: STACKALIGNBYTES, ALIGNED_POINTER etc.
In-discussion-with: swilder
show more ...
|