linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Glynn Clements <glynn@gclements.plus.com>
To: r_zaca <r_zaca@ig.com.br>
Cc: linux-c-programming@vger.kernel.org
Subject: Re: Byte Order
Date: Fri, 14 Jan 2005 21:31:04 +0000	[thread overview]
Message-ID: <16872.14872.897993.999745@gargle.gargle.HOWL> (raw)
In-Reply-To: <20050113_100557_072441.r_zaca@ig.com.br>


r_zaca wrote:

>   Thanks a lot, that is what I was looking for. A simple test that I can do, 
> using some C conde, to find out if the machine where the program is running 
> on uses Big or Little endian "memory organization". 

	#include <endian.h>
	
	#if __BYTE_ORDER == __LITTLE_ENDIAN
		...
	#elif __BYTE_ORDER == __BIG_ENDIAN
		...
	#elif __BYTE_ORDER == __PDP_ENDIAN
		...
	#endif

-- 
Glynn Clements <glynn@gclements.plus.com>

  reply	other threads:[~2005-01-14 21:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-13 10:05 Byte Order r_zaca
2005-01-14 21:31 ` Glynn Clements [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-01-12 17:03 r_zaca
2005-01-12 17:31 ` Eric Bambach
2005-01-12 17:34 ` Jan-Benedict Glaw

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=16872.14872.897993.999745@gargle.gargle.HOWL \
    --to=glynn@gclements.plus.com \
    --cc=linux-c-programming@vger.kernel.org \
    --cc=r_zaca@ig.com.br \
    /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).