[libvirt] FreeBSD, no gcc present libvirt build issue
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.
> 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...
Size: 621 bytes
Desc: OpenPGP digital signature
More information about the libvir-list