All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Anthony Liguori <aliguori@us.ibm.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] qtest: fix 32-bit build
Date: Fri, 30 Mar 2012 17:19:40 -0600	[thread overview]
Message-ID: <4F763F8C.6020107@redhat.com> (raw)
In-Reply-To: <1333130099-25238-1-git-send-email-aliguori@us.ibm.com>

[-- Attachment #1: Type: text/plain, Size: 519 bytes --]

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   eblake@redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 620 bytes --]

      parent reply	other threads:[~2012-03-30 23:19 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-30 17:54 [Qemu-devel] [PATCH] qtest: fix 32-bit build Anthony Liguori
2012-03-30 17:59 ` Anthony Liguori
2012-03-30 18:03   ` Stefan Weil
2012-03-30 18:29     ` Anthony Liguori
2012-03-30 18:55       ` Paolo Bonzini
2012-03-30 19:06         ` Anthony Liguori
2012-03-30 19:13           ` Paolo Bonzini
2012-03-30 19:16             ` Anthony Liguori
2012-03-30 19:23               ` Stefan Weil
2012-03-30 19:27                 ` Anthony Liguori
2012-03-30 19:57             ` Blue Swirl
2012-03-30 23:19 ` Eric Blake [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F763F8C.6020107@redhat.com \
    --to=eblake@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.