[libvirt] [PATCH] Include stdint.h in libvirt.h for INT64_MAX

Eric Blake eblake at redhat.com
Wed Mar 9 14:58:21 UTC 2011


On 03/09/2011 06:47 AM, Daniel Veillard wrote:
>> Instead of including stdint.h specify the value directly.
>> ---
>>  include/libvirt/libvirt.h.in |    2 +-
>>  1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in
>> index 618b350..82e45d7 100644
>> --- a/include/libvirt/libvirt.h.in
>> +++ b/include/libvirt/libvirt.h.in
>> @@ -705,7 +705,7 @@ typedef enum {
>>   * Macro providing the virMemoryParameter value that indicates "unlimited"
>>   */
>>  
>> -#define VIR_DOMAIN_MEMORY_PARAM_UNLIMITED (INT64_MAX >> 10)
>> +#define VIR_DOMAIN_MEMORY_PARAM_UNLIMITED 9007199254740991 /* = INT64_MAX >> 10 */
> 
>   Hum shouldn't that be 9007199254740991UL to provide type information ?

UL still won't work on 32-bit platforms.  You need the LL (or ULL) suffix.

-- 
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/20110309/f18964cd/attachment-0001.sig>


More information about the libvir-list mailing list