linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Jesper Skov <jskov@cygnus.co.uk>
To: iweiny@pacbell.net
Cc: linuxppc-dev@lists.linuxppc.org (linuxdev)
Subject: Re: User level Macros for Endianess
Date: 12 Jan 2000 10:11:03 +0100	[thread overview]
Message-ID: <othfgj64ew.fsf@thinktwice.zoftcorp.dk> (raw)
In-Reply-To: iweiny@pacbell.net's message of "Wed, 12 Jan 2000 00:32:11 -0800 (PST)"


>>>>> "iweiny" == iweiny  <iweiny@pacbell.net> writes:

iweiny> What Macros should I be using to key off of for this?  I have
iweiny> looked through /usr/include/endian.h and
iweiny> /usr/include/bits/endian.h.  BYTE_ORDER (without the leading
iweiny> underscores) is only defined if __USE_BSD is defined.  BOTH
iweiny> __BIG_ENDIAN and __LITTLE_ENDIAN are defined as are BIG_ENDIAN
iweiny> and LITTLE_ENDIAN.  I'm so confused?

#include <asm/byteorder.h>

then use __le32_to_cpu and friends (see
/usr/include/linux/byteorder/generic.h)

I'm not sure if that's the Proper Way(TM) to do it from user land
though.

Jesper

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

       reply	other threads:[~2000-01-12  9:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200001120832.AAA10014@batcave2.localdomain>
2000-01-12  9:11 ` Jesper Skov [this message]
2000-01-12  9:31   ` User level Macros for Endianess Gabriel Paubert
2000-01-12 13:25 ` Charles Lepple
2000-01-12 19:37 ` David A. Gatwood
     [not found] <E869F6EDBD5F4E50C1256864006C9E10.006C9E4AC1256864@kehl.dalim.de>
2000-01-13  8:02 ` Stephane GEORGES
2000-01-13 15:48   ` David A. Gatwood
2000-01-13 16:18     ` Gabriel Paubert

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=othfgj64ew.fsf@thinktwice.zoftcorp.dk \
    --to=jskov@cygnus.co.uk \
    --cc=iweiny@pacbell.net \
    --cc=linuxppc-dev@lists.linuxppc.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).