From: "Andreas Färber" <afaerber@suse.de>
To: Jan Kiszka <jan.kiszka@web.de>, Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH for-1.1? v2] slirp: Avoid statements without effect on Big Endian host
Date: Mon, 28 May 2012 17:18:56 +0200 [thread overview]
Message-ID: <4FC39760.9030800@suse.de> (raw)
In-Reply-To: <4FC365D6.80205@web.de>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Am 28.05.2012 13:47, schrieb Jan Kiszka:
> On 2012-05-28 00:10, Peter Maydell wrote:
>> On 27 May 2012 17:42, Andreas Färber <andreas.faerber@web.de>
>> wrote:
>>> +# if defined(__APPLE__) +# undef NTOHL +# undef NTOHS +#
>>> undef HTONL +# undef HTONS +# define NTOHL(d) do { } while
>>> (0) +# define NTOHS(d) do { } while (0) +# define HTONL(d) do
>>> { } while (0) +# define HTONS(d) do { } while (0) +# else
>>
>> We could just use this for everything, not just if __APPLE__,
>> right? For big-endian the semantics we want are always "do
>> nothing" so it's always OK to undef and redefine... That would
>> save having a special case.
>
> Yes, please.
On second thoughts my v2 was totally unnecessary and the solution
flawed: The HTONS(x); warning is stemming from Apple's
#define HTONS(d) (d)
not from our
#define HTONS(d)
so we can just unconditionally #undef the existing definitions.
That'll lead to unnecessary semicolons but not to warnings.
Andreas
- --
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)
iQIcBAEBAgAGBQJPw5dgAAoJEPou0S0+fgE/wIkP/iu4ZQMR22nukCvtXANu2G7b
QfnsM7w28zRS2y+RkpoQ4pdldD5o2PMVowUA8uGtscvO4o5wVn7/h+1z768NFMht
KeOAic2h1cDUMQZp5DIhuMwXNHtzrYKejxyJSWzVFdpT+Za8tecQ4ge+iDXObdL0
u2a5RAfZU5oPSLZYdUWHkQhf6GayXRvkr/o6rBHKi0Y6S/Du9vlNUpMcANg1O85E
LtraZbfikfKAtWxX+3+yTaNmpfylbYTnUQqHGEXcwMSr7TIDstoyf1kmQcrOacQa
KwOGfW0psRsLQHSb9c3msezo4bFM/S+hyLj3Qg/Cr6Va/jENiyHUNALSymRCvlNw
nVTZOPoNfYOYHnu7yR7xTjpIxngCL7vtdjw4RhJASVKZXQo1TzeAgi9Wx/LFGuFa
Kifqr1wQwSUm+BESMAtJMKixobMscm1rkcwsITuAxTR+l6Cp6X3FcOG9xuHWbT52
IBToxsapwkRNdrb5HZxRIufOvTUq6j/zRfpODqiYe5IoHhF25w4Cvx5+eJ8X7Up6
2RrWRwtj6lmkBhezp2yiBZ/nIUVDcD8jywllla3PS52rjwJoFvRfAU9551yZPMkP
sVhSdID9f9KzwzzUE8YfcCGaVFnOriJG5LikxqcRztp7nlKSPFQNA0DvTK3xTuez
TzrCEwLr6wtBcdvG+6CK
=0bsI
-----END PGP SIGNATURE-----
prev parent reply other threads:[~2012-05-28 15:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-27 16:42 [Qemu-devel] [PATCH for-1.1? v2] slirp: Avoid statements without effect on Big Endian host Andreas Färber
2012-05-27 22:10 ` Peter Maydell
2012-05-28 11:47 ` Jan Kiszka
2012-05-28 12:00 ` Peter Maydell
2012-05-28 14:06 ` Andreas Färber
2012-05-28 15:18 ` Andreas Färber [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=4FC39760.9030800@suse.de \
--to=afaerber@suse.de \
--cc=jan.kiszka@web.de \
--cc=peter.maydell@linaro.org \
--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.