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

2012-03-30 Thread Eric Blake
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 seei

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

2012-03-30 Thread Blue Swirl
On Fri, Mar 30, 2012 at 19:13, Paolo Bonzini wrote: > Il 30/03/2012 21:06, Anthony Liguori ha scritto: >> On 03/30/2012 01:55 PM, Paolo Bonzini wrote: >>> Il 30/03/2012 20:29, Anthony Liguori ha scritto: > Now it will fail with w64 (which uses 64 bit time_t and > a 32 bit long).

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

2012-03-30 Thread Anthony Liguori
On 03/30/2012 02:23 PM, Stefan Weil wrote: Am 30.03.2012 21:16, schrieb Anthony Liguori: On 03/30/2012 02:13 PM, Paolo Bonzini wrote: Il 30/03/2012 21:06, Anthony Liguori ha scritto: On 03/30/2012 01:55 PM, Paolo Bonzini wrote: Il 30/03/2012 20:29, Anthony Liguori ha scritto: Now it will fai

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

2012-03-30 Thread Stefan Weil
Am 30.03.2012 21:16, schrieb Anthony Liguori: On 03/30/2012 02:13 PM, Paolo Bonzini wrote: Il 30/03/2012 21:06, Anthony Liguori ha scritto: On 03/30/2012 01:55 PM, Paolo Bonzini wrote: Il 30/03/2012 20:29, Anthony Liguori ha scritto: Now it will fail with w64 (which uses 64 bit time_t and a 3

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

2012-03-30 Thread Anthony Liguori
On 03/30/2012 02:13 PM, Paolo Bonzini wrote: Il 30/03/2012 21:06, Anthony Liguori ha scritto: On 03/30/2012 01:55 PM, Paolo Bonzini wrote: Il 30/03/2012 20:29, Anthony Liguori ha scritto: Now it will fail with w64 (which uses 64 bit time_t and a 32 bit long). That's a bug in w64 (it has a br

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

2012-03-30 Thread Paolo Bonzini
Il 30/03/2012 21:06, Anthony Liguori ha scritto: > On 03/30/2012 01:55 PM, Paolo Bonzini wrote: >> Il 30/03/2012 20:29, Anthony Liguori ha scritto: Now it will fail with w64 (which uses 64 bit time_t and a 32 bit long). >>> >>> That's a bug in w64 (it has a broken ABI). >>> >>> Do we actu

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

2012-03-30 Thread Anthony Liguori
On 03/30/2012 01:55 PM, Paolo Bonzini wrote: Il 30/03/2012 20:29, Anthony Liguori ha scritto: Now it will fail with w64 (which uses 64 bit time_t and a 32 bit long). That's a bug in w64 (it has a broken ABI). Do we actually build and run on w64?? It's actually sensible and x32 does the same

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

2012-03-30 Thread Paolo Bonzini
Il 30/03/2012 20:29, Anthony Liguori ha scritto: >> Now it will fail with w64 (which uses 64 bit time_t and >> a 32 bit long). > > That's a bug in w64 (it has a broken ABI). > > Do we actually build and run on w64?? It's actually sensible and x32 does the same. Not too urgent though. Paolo

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

2012-03-30 Thread Anthony Liguori
On 03/30/2012 01:03 PM, Stefan Weil wrote: Am 30.03.2012 19:59, schrieb Anthony Liguori: Applied. Sorry for the breakage. Regards, Anthony Liguori There is a new breakage: Now it will fail with w64 (which uses 64 bit time_t and a 32 bit long). That's a bug in w64 (it has a broken ABI). D

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

2012-03-30 Thread Stefan Weil
Am 30.03.2012 19:59, schrieb Anthony Liguori: Applied. Sorry for the breakage. Regards, Anthony Liguori There is a new breakage: Now it will fail with w64 (which uses 64 bit time_t and a 32 bit long). Regards, Stefan W.

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

2012-03-30 Thread Anthony Liguori
Applied. Sorry for the breakage. Regards, Anthony Liguori On 03/30/2012 12:54 PM, Anthony Liguori wrote: time_t appears to be an unsigned long so use %ld. Reported-by: Stefan Weil Signed-off-by: Anthony Liguori --- qtest.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff

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

2012-03-30 Thread Anthony Liguori
time_t appears to be an unsigned long so use %ld. Reported-by: Stefan Weil Signed-off-by: Anthony Liguori --- qtest.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/qtest.c b/qtest.c index 53e2b79..cd7186c 100644 --- a/qtest.c +++ b/qtest.c @@ -34,7 +34,7 @@ static in