Re: FreeBSD, no gcc present libvirt build issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

http://austingroupbugs.net/view.php?id=743

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

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]