Re: [libvirt] [PATCH libvirt 3/6] Fix warnings about pid_t printf format on mingw64

2012-01-30 Thread Marc-André Lureau
On Thu, Jan 26, 2012 at 11:28 AM, Daniel P. Berrange berra...@redhat.com wrote: On Wed, Jan 25, 2012 at 05:54:19PM -0700, Eric Blake wrote: On 01/25/2012 05:22 PM, Marc-André Lureau wrote: the decision should _not_ be based on _WIN64, but instead on a configure-time test on the underlying

Re: [libvirt] [PATCH libvirt 3/6] Fix warnings about pid_t printf format on mingw64

2012-01-30 Thread Eric Blake
On 01/30/2012 12:15 PM, Marc-André Lureau wrote: But we can use 'lld' because we made sure all libvirt code goes via the gnulib printf replacements which guarentee %lld works correctly. Actually, it doesn't. The replacement is provided by the module stdio which isn't used (or perhaps

Re: [libvirt] [PATCH libvirt 3/6] Fix warnings about pid_t printf format on mingw64

2012-01-26 Thread Daniel P. Berrange
On Wed, Jan 25, 2012 at 05:54:19PM -0700, Eric Blake wrote: On 01/25/2012 05:22 PM, Marc-André Lureau wrote: the decision should _not_ be based on _WIN64, but instead on a configure-time test on the underlying type of pid_t. And since _that_ gets difficult, I'd almost rather go with the

[libvirt] [PATCH libvirt 3/6] Fix warnings about pid_t printf format on mingw64

2012-01-25 Thread Marc-André Lureau
Define PID_FORMAT and fix warnings for mingw64 x86_64 build. Unfortunately, gnu_printf attribute check expect %lld while normal printf is PRId64. So one warning remains. --- src/rpc/virnetsocket.c |4 ++-- src/util/command.c | 10 +- src/util/util.h|8

Re: [libvirt] [PATCH libvirt 3/6] Fix warnings about pid_t printf format on mingw64

2012-01-25 Thread Eric Blake
On 01/25/2012 01:13 PM, Marc-André Lureau wrote: Define PID_FORMAT and fix warnings for mingw64 x86_64 build. Unfortunately, gnu_printf attribute check expect %lld while normal printf is PRId64. So one warning remains. --- src/rpc/virnetsocket.c |4 ++-- src/util/command.c | 10

Re: [libvirt] [PATCH libvirt 3/6] Fix warnings about pid_t printf format on mingw64

2012-01-25 Thread Eric Blake
On 01/25/2012 05:22 PM, Marc-André Lureau wrote: the decision should _not_ be based on _WIN64, but instead on a configure-time test on the underlying type of pid_t. And since _that_ gets difficult, I'd almost rather go with the simpler approach of: % PRIdMAX, (intmax_t) pid everywhere