Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Aug 2013 10:14:27 -0600
From:      Eric Blake <eblake@redhat.com>
Cc:        svn-src-head@freebsd.org, libvir-list <libvir-list@redhat.com>, Jason Helfman <jgh@freebsd.org>
Subject:   Re: [libvirt] FreeBSD, no gcc present libvirt build issue
Message-ID:  <521F7363.3080804@redhat.com>
In-Reply-To: <521F6E54.1070104@redhat.com>
References:  <CAMuy=%2BiG20hs9b%2BD210=TZ50weyaJoPK8NZ8Mgea8s1A2UDQhw@mail.gmail.com> <521F63F4.4020406@redhat.com> <CAMuy=%2BhO15c_0EdjnMQMtL5OGESfQkkvjZ5oUwRGv2%2B0VB6U0w@mail.gmail.com> <CAMuy=%2BhgHARZyAUgiVaf0hdOSpTQOGRubucCY%2BQ6-kzDN8a5Ng@mail.gmail.com> <521F6C0F.9060007@redhat.com> <521F6E54.1070104@redhat.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--GxO1kqv1WdcE6B3Pg9vp8CaIE1WDVcvx1
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

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. g=
cc
>> (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.
>>
>=20
> http://lists.freebsd.org/pipermail/svn-src-head/2013-July/049076.html
>=20
> makes it look like the reduction in range was _intentional_?  Yuck.  A
> non-power-of-2 random generator adds needless complexity to the user.
>=20

>=20
> 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 requiremen=
t.

http://austingroupbugs.net/view.php?id=3D743

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


--GxO1kqv1WdcE6B3Pg9vp8CaIE1WDVcvx1
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.14 (GNU/Linux)
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBCAAGBQJSH3NjAAoJEKeha0olJ0Nqz1gIAKiIF3hO4U9zqq2kpdsfQyFM
XzYK0/FrPlQpszBjf0XZ6EiIFfEXUMjY8GB+PvxVN7Nl5ImuzQRuT7HH8b91U4XS
bsHKrvtHpqGGiuX1rf1Yk762dRlDqVu+LG0Wmuxy13Jd4IoRaCkZNK9ZdyTamNSp
DFSg0tqdIVfNifCFdTzLrBn6OlE+NdfAU+FOS/TMEZcGBmslaYAPbuqiZhvxIdTB
8KcrujuNkhknKtEuheaQj1he3eDCtliohIGiqbwo/Obbq4WqzoAdQY2CmSGv/NvN
0/kNznxFpY4EAcEA5q0JQGzdTP4KdfXiEP7kP3RThNMOhI6q+5sjAJ8rG5D9nyw=
=WX7j
-----END PGP SIGNATURE-----

--GxO1kqv1WdcE6B3Pg9vp8CaIE1WDVcvx1--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?521F7363.3080804>