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

Daniel P. Berrange berrange at redhat.com
Thu Jan 26 10:26:49 UTC 2012


On Wed, Jan 25, 2012 at 09:13:23PM +0100, 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.

Since libvirt uses gnulib, we are guaranteed that %lld is valid
everywhere, and thus do not need any of the horrific PRId64
macros.

> +#ifdef _WIN64
> +/* XXX gnu_printf prefers lld while non-gnu printf expect PRId64... */

So this comment can be removed

> +# define PID_FORMAT "lld"
> +#else
> +# define PID_FORMAT "d"
> +#endif
> +


Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|




More information about the libvir-list mailing list