qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@web.de>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: "Andreas Färber" <andreas.faerber@web.de>, 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 13:47:34 +0200	[thread overview]
Message-ID: <4FC365D6.80205@web.de> (raw)
In-Reply-To: <CAFEAcA-zSfedki28ruiWhx98GpkSG5-JaSPeFCCDP2g3V5T1OA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 656 bytes --]

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.

Jan



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

  reply	other threads:[~2012-05-28 11:48 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 [this message]
2012-05-28 12:00     ` Peter Maydell
2012-05-28 14:06       ` Andreas Färber
2012-05-28 15:18     ` Andreas Färber

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=4FC365D6.80205@web.de \
    --to=jan.kiszka@web.de \
    --cc=andreas.faerber@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 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).