svn commit: r290711 - head/sys/ofed/drivers/infiniband/core

Konstantin Belousov kostikbel at gmail.com
Fri Nov 13 08:35:53 UTC 2015


On Fri, Nov 13, 2015 at 09:18:54AM +0100, Hans Petter Selasky wrote:
> Hi,
> 
> On 11/12/15 18:17, Conrad Meyer wrote:
> > These should cast through (u)intptr_t rather than unsigned long.
> >
> 
> This is Linux code, and they use "unsigned long" for pointer casts 
> everywhere, trying to not break their style.
> 
> BTW: I added to linux_compat.c:
> 
> CTASSERT(sizeof(unsigned long) == sizeof(uintptr_t));
> 
> And it survived my "tinderbox" build and I was surprised!

FreeBSD (at least currently) runs on two kinds of ABIs: ILP32 and LP64.
ILP32 means that sizeof(int) == sizeof(long) == sizeof(void *) == 4.
For LP64, sizeof(long) == sizeof(void *) == 8, while sizeof(int) == 4.
We do not support anything else.


More information about the svn-src-all mailing list