From: Stefan Weil <weil@mail.berlios.de>
To: Blue Swirl <blauwirbel@gmail.com>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH 0/3] mingw32 compile fixes
Date: Sat, 15 May 2010 23:39:21 +0200 [thread overview]
Message-ID: <4BEF1489.6000907@mail.berlios.de> (raw)
In-Reply-To: <AANLkTininP15fyhM1nE_SwQdLk9z_XW8tPWZagB25sCU@mail.gmail.com>
Am 15.05.2010 22:49, schrieb Blue Swirl:
> Hi,
>
> With this mingw32 compiler:
>
> $ i586-mingw32msvc-gcc -v
> Using built-in specs.
> Target: i586-mingw32msvc
> Configured with:
> /tmp/buildd/gcc-mingw32-4.4.2/build-tree/gcc-4.4.2/configure
> --build=x86_64-linux-gnu --prefix=/usr --includedir='/usr/include'
> --mandir='/usr/share/man' --infodir='/usr/share/info'
> --sysconfdir=/etc --localstatedir=/var
> --libexecdir='/usr/lib/gcc-mingw32' --disable-multilib
> --enable-threads --enable-sjlj-exceptions
> --enable-version-specific-runtime-libs --disable-shared
> --target=i586-mingw32msvc --enable-languages=c,c++,fortran :
> (reconfigured) /tmp/buildd/gcc-mingw32-4.4.2/build-tree/gcc-4.4.2/configure
> --build=x86_64-linux-gnu --prefix=/usr --includedir='/usr/include'
> --mandir='/usr/share/man' --infodir='/usr/share/info'
> --sysconfdir=/etc --localstatedir=/var
> --libexecdir='/usr/lib/gcc-mingw32' --disable-multilib
> --enable-threads --enable-sjlj-exceptions
> --enable-version-specific-runtime-libs --disable-shared
> --target=i586-mingw32msvc --enable-languages=c,c++,fortran
> Thread model: win32
> gcc version 4.4.2 (GCC)
>
> build will not succeed because formats %zd, %zu, %hh, %lld, %llx and
> %llu are not known by the compiler.
>
> Any %ll* use is clearly a bug, we have PRI*64 macros just for this purpose.
>
> For %hh and %z there may be better ways than these patches.
>
> With the patches I can build working Win32 binaries and there are no warnings.
>
> Blue Swirl (3):
> Fix %lld or %llx printf format use
> mingw32: avoid using %hh format which is not known by the compiler
> mingw32: avoid using %zd etc. formats which are not known by the
> compiler
>
> arch_init.c | 18 +++++++++++++
> audio/audio.c | 11 ++++---
> audio/audio_template.h | 4 +-
> audio/esdaudio.c | 8 +++---
> audio/mixeng.c | 3 +-
> audio/ossaudio.c | 8 +++---
> block/curl.c | 13 +++++----
> block/parallels.c | 7 +++-
> block/qcow2.c | 10 ++++---
> buffered_file.c | 13 +++++----
> darwin-user/commpage.c | 2 +-
> darwin-user/syscall.c | 2 +-
> hw/ac97.c | 4 +-
> hw/eepro100.c | 22 +++++++++------
> hw/loader.c | 8 +++---
> hw/scsi-bus.c | 4 +-
> hw/scsi-disk.c | 16 ++++++------
> hw/usb-ohci.c | 7 +++--
> hw/vga.c | 2 +-
> hw/vhost_net.c | 2 +-
> hw/virtio-9p-debug.c | 2 +-
> hw/virtio-9p.c | 2 +-
> hw/xen_console.c | 3 +-
> hw/xen_disk.c | 6 +++-
> hw/xenfb.c | 9 ++++--
> ia64-dis.c | 9 ++++--
> nbd.c | 4 +-
> osdep.c | 2 +-
> qemu-common.h | 7 +++++
> qemu-img.c | 10 +++---
> qemu-io.c | 57 +++++++++++++++++++++--------------------
> sysemu.h | 4 +++
> target-cris/translate.c | 6 ++--
> target-microblaze/translate.c | 2 +-
> target-ppc/translate.c | 7 +++--
> target-sparc/helper.c | 2 +-
> usb-linux.c | 2 +-
> vnc-auth-sasl.c | 2 +-
> vnc.c | 9 +++---
> 39 files changed, 182 insertions(+), 127 deletions(-)
>
It's a compiler bug that the compiler does not know these format strings.
The code works nevertheless (at least with mingw libraries which are
not too old) because the format strings are interpreted by the C runtime
library.
Is it worth changing a lot of files when we can expect a newer mingw
compiler version which works correctly for standard format strings?
Regards
Stefan
next prev parent reply other threads:[~2010-05-15 21:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-15 20:49 [Qemu-devel] [PATCH 0/3] mingw32 compile fixes Blue Swirl
2010-05-15 21:39 ` Stefan Weil [this message]
2010-05-16 8:24 ` Blue Swirl
2010-05-17 8:37 ` Markus Armbruster
2010-05-17 16:01 ` Blue Swirl
2010-05-17 16:48 ` Markus Armbruster
2010-05-17 8:35 ` Markus Armbruster
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=4BEF1489.6000907@mail.berlios.de \
--to=weil@mail.berlios.de \
--cc=blauwirbel@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).