qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] qtest: fix 32-bit build


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH] qtest: fix 32-bit build
Date: Fri, 30 Mar 2012 17:19:40 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120316 Thunderbird/11.0

On 03/30/2012 11:54 AM, Anthony Liguori wrote:
> time_t appears to be an unsigned long so use %ld.

Not portable.  POSIX does not guarantee the size of time_t; there are
32-bit platforms where time_t is 64-bit.

The only way to print a time_t value is to cast it through a known-width
type, and seeing as how there are 64-bit time_t on 32-bit platforms,
that pretty much has to be %jd and intmax_t.

-- 
Eric Blake   address@hidden    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]