[libvirt] FreeBSD, no gcc present libvirt build issue

Eric Blake eblake at redhat.com
Thu Aug 29 16:14:27 UTC 2013

On 08/29/2013 09:52 AM, Eric Blake wrote:

>>> #define RAND_MAX        0x7ffffffd
>> Huh?  Why is this not 2**n-1?  That violates assumptions we have made,
>> and is WHY your compile failed.  It has nothing to do with clang vs. gcc
>> (both compilers would fail), it has to do with your changed system
>> header resulting in violating assumptions that hold in ALL OTHER
>> IMPLEMENTATIONS, that random numbers are evenly distributed within a
>> range of a power of 2.
> http://lists.freebsd.org/pipermail/svn-src-head/2013-July/049076.html
> makes it look like the reduction in range was _intentional_?  Yuck.  A
> non-power-of-2 random generator adds needless complexity to the user.

> I also intend to open a bug against POSIX to request that RAND_MAX be
> required to be 2**n-1, rather than relying on the assumption that
> everyone so far, until FreeBSD 10, has happened to meet that requirement.


Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130829/ed9e6215/attachment-0001.sig>

More information about the libvir-list mailing list