On 05/24/2011 12:33 PM, Matthias Bolte wrote: > 2011/5/24 Eric Blake <eblake@xxxxxxxxxx>: >> We don't use the gnulib vsnprintf replacement, which means that >> on mingw, vsnprintf doesn't support %sn. I meant %zn, not %sn; and I'll also mention %llu which is another one mingw doesn't natively know. >> >> But as it turns out, VIR_GET_VAR_STR was a rather inefficient >> reimplementation of virVasprintf. >> >> * src/util/logging.c (VIR_GET_VAR_STR): Drop. >> (virLogMessage): Inline a simpler version here. >> * src/util/virterror.c (VIR_GET_VAR_STR, virRaiseErrorFull): >> Likewise. >> Reported by Matthias Bolte. >> --- >> src/util/logging.c | 45 ++++++--------------------------------------- >> src/util/virterror.c | 44 +++++--------------------------------------- >> 2 files changed, 11 insertions(+), 78 deletions(-) >> > > ACK. Thanks; pushed. > > This actually fixed a debug output that confused me. Before this patch > the output claimed > > 19:14:15.365: 2140: debug : virEventPollCalculateTimeout:345 : Timeout > at 0 due in 0 ms > > But this 0 0 case is impossible from the logic in the code. After the > patch it is reporting correctly > > 20:15:25.157: 2140: debug : virEventPollCalculateTimeout:345 : Timeout > at 0 due in -1 ms Cool. That probably means that mingw treated %llu as %lu and only parsed 32-bits of a 64-bit stack entity, leaving the %d for the remaining 32 bits; whereas post-patch you get the right argument mapping. -- Eric Blake eblake@xxxxxxxxxx +1-801-349-2682 Libvirt virtualization library http://libvirt.org
Attachment:
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list