Linux PARISC architecture development
 help / color / mirror / Atom feed
From: Randolph Chung <randolph@tausq.org>
To: Stuart Brady <sdbrady@ntlworld.com>
Cc: parisc-linux@lists.parisc-linux.org
Subject: Re: [parisc-linux] [PATCH] include/linux/soundcard.h endian fix
Date: Mon, 23 Feb 2004 04:24:58 -0800	[thread overview]
Message-ID: <20040223122458.GA6675@tausq.org> (raw)
In-Reply-To: <20040222070150.GA773@calypso>

> Would it be better to do the following? :
> 
> #ifdef(__BYTE_ORDER)
> #  if defined(__BIG_ENDIAN)
> #    if __BYTE_ORDER == __BIG_ENDIAN
> #      define AFMT_S16_NE AFMT_S16_BE
> #    endif
> #  elif defined(__LITTLE_ENDIAN)
> #    if __BYTE_ORDER == __LITTLE_ENDIAN
> #      define AFMT_S16_NE AFMT_S16_LE
> #    endif
> #  end if
> #endif

yes, this is much better. If you include asm/byteorder.h then this
should always be defined. maybe add a #error to catch the (unlikely)
case where neither is defined?

randolph
-- 
Randolph Chung
Debian GNU/Linux Developer, hppa/ia64 ports
http://www.tausq.org/

  reply	other threads:[~2004-02-23 10:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-22  7:01 [parisc-linux] [PATCH] include/linux/soundcard.h endian fix Stuart Brady
2004-02-23 12:24 ` Randolph Chung [this message]
2004-02-23 19:40   ` Stuart Brady
2004-03-07 17:32     ` Stuart Brady
2004-03-07 18:02       ` Helge Deller

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=20040223122458.GA6675@tausq.org \
    --to=randolph@tausq.org \
    --cc=parisc-linux@lists.parisc-linux.org \
    --cc=sdbrady@ntlworld.com \
    /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