From: Stefan Weil <sw@weilnetz.de>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] win32: provide gmtime_r emulation
Date: Wed, 12 Sep 2012 06:17:18 +0200 [thread overview]
Message-ID: <50500CCE.1040206@weilnetz.de> (raw)
In-Reply-To: <504F7BA2.6020706@redhat.com>
Am 11.09.2012 19:57, schrieb Paolo Bonzini:
> Il 11/09/2012 19:15, Stefan Weil ha scritto:
>> latest MinGW-w64 supports _gmtime32_s, but MinGW does not,
>> so this solution won't link with MinGW.
> Do we need to support anything but latest MinGW-w64?
>
> Paolo
Good question.
Pro:
* For 64 bit support, we already need MinGW-w64.
* It looks like MinGW-w64 headers are better maintained
(printf attributes, gmtime_s, ...).
* Therefore compilations with MinGW-w64 result in much
less compiler warnings (or even none with one of my
patches which are still missing in git master).
Contra:
* On Windows hosts, installation of MinGW-w64 needs an
additional installation step (MinGW-w64 on top of MinGW)
which is not needed if someone just wants to build 32 bit
applications.
* Cross support for MinGW-w64 is improving with newer Linux
distributions, but still not complete (one of my hosts
still runs Ubuntu Lucid which does not support MinGW-w64
for 32 bit).
Maybe we should continue to support MinGW for one or two more
years until the situation stabilizes. Maybe MinGW and
MinGW-w64 will be unified again one day.
We could add gmtime_r and localtime_r implementations for
MinGW / MinGW-w64 and use the non-reentrant functions in
that implementation for the moment.
Later, we could replace that implementation by one using
the reentrant _s variants.
Or we use conditional compilation to choose whether we need
the non-reentrant or the reentrant variant. I just had a look:
__MINGW64_VERSION_MAJOR can be used to detect MinGW-w64).
Regards,
Stefan
prev parent reply other threads:[~2012-09-12 4:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-11 7:28 [Qemu-devel] [PATCH] win32: provide gmtime_r emulation Paolo Bonzini
2012-09-11 17:15 ` Stefan Weil
2012-09-11 17:57 ` Paolo Bonzini
2012-09-12 4:17 ` Stefan Weil [this message]
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=50500CCE.1040206@weilnetz.de \
--to=sw@weilnetz.de \
--cc=pbonzini@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.