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 ebl...@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature