All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"Peter Maydell" <peter.maydell@linaro.org>
Cc: Alexander von Gluck IV <kallisti5@unixzen.com>,
	Ed Maste <emaste@freebsd.org>,
	QEMU Developers <qemu-devel@nongnu.org>,
	Li-Wen Hsu <lwhsu@freebsd.org>
Subject: Re: [PATCH 4/4] qemu/bswap: Remove <byteswap.h> dependency
Date: Fri, 25 Sep 2020 08:25:35 -0700	[thread overview]
Message-ID: <bf531a36-9d1e-10b4-de0e-f53cffd4f949@linaro.org> (raw)
In-Reply-To: <70564f81-d2a6-9bad-b761-40e0d5c69961@redhat.com>

On 9/25/20 2:22 AM, Philippe Mathieu-Daudé wrote:
> Looking at FreeBSD, bswap*() are defined as macro:
> https://github.com/freebsd/freebsd/blob/master/sys/sys/endian.h#L58

That works for me.

> So theoretically they could change the prototype still respecting
> the documentation contract, and undefines wouldn't work anymore.

But we'd be #defining our own macros that would mean that the out-of-line
functions would never be used.  So it still works.


r~


  reply	other threads:[~2020-09-25 15:37 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-23 10:02 [PATCH 0/4] qemu/bswap: Use compiler __builtin_bswap() Philippe Mathieu-Daudé
2020-09-23 10:02 ` [PATCH 1/4] qemu/bswap: Remove unused qemu_bswap_len() Philippe Mathieu-Daudé
2020-09-24 19:24   ` Richard Henderson
2020-09-23 10:02 ` [PATCH 2/4] qemu/bswap: Replace bswapXX() by compiler __builtin_bswap() Philippe Mathieu-Daudé
2020-09-24 19:25   ` Richard Henderson
2020-09-23 10:02 ` [PATCH 3/4] qemu/bswap: Replace bswapXXs() " Philippe Mathieu-Daudé
2020-09-24 19:29   ` Richard Henderson
2020-09-23 10:02 ` [PATCH 4/4] qemu/bswap: Remove <byteswap.h> dependency Philippe Mathieu-Daudé
2020-09-23 10:16   ` Peter Maydell
2020-09-23 10:30     ` Philippe Mathieu-Daudé
2020-09-24 19:30       ` Richard Henderson
2020-09-24 19:33         ` Peter Maydell
2020-09-25  9:22           ` Philippe Mathieu-Daudé
2020-09-25 15:25             ` Richard Henderson [this message]
2020-09-24 19:29   ` Richard Henderson

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=bf531a36-9d1e-10b4-de0e-f53cffd4f949@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=emaste@freebsd.org \
    --cc=kallisti5@unixzen.com \
    --cc=lwhsu@freebsd.org \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@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.