On Wednesday 01 June 2011 01:07:29 [email protected] wrote: > I am looking into potentially MFC'ing r212367 and related, that adds > drains to sbufs. The reason for MFC is that several pieces of new > code in CURRENT are using the drain functionality and it would make > MFCing those changes much easier. > > The problem is that r212367 added a pointer to a drain function in the > sbuf (it replaced a pointer to void). The C standard doesn't > guarantee that a void * and a function pointer have the same size, > though its true on amd64, i386 and I believe PPC. What I'm wondering > is, though not guaranteed by the standard, is it *practically* true > that sizeof(void *) == sizeof(int(*)(void)), such that an MFC won't > break binary compatibility for any supported architecture?
It's guaranteed by POSIX. http://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html Section 2.12.3
signature.asc
Description: This is a digitally signed message part.

