[libvirt] [PATCH 02/12] storage: avoid mishandling backing store > 2GB

Eric Blake eblake at redhat.com
Mon Jun 13 18:00:46 UTC 2011


On 06/08/2011 10:05 AM, Richard W.M. Jones wrote:
> On Tue, Jun 07, 2011 at 03:34:58PM +0200, Matthias Bolte wrote:
>> Using unsigned int instead of uint32_t would also work and avoid
>> stdint.h types that the libvirt codebase avoids.
> 
> Out of interest, why is libvirt avoiding these int types?

Actually, I don't see anything wrong with using these types internally
(which this file was) where it makes sense; it just becomes a bit more
of a maintenance burden to remember to use the correct PRI* macros
rather than raw %d and friends when printing such values.  But for the
public APIs, we've chosen to avoid those types and to instead stick to
native int types, so that our public headers do not break in the face of
broken <stdint.h> files (it's sad how many platforms where gnulib ends
up replacing <stdint.h> because of bugs).

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

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


More information about the libvir-list mailing list