From: Stephane GEORGES <sg@dalim.de>
To: "David A. Gatwood" <dgatwood@deepspace.mklinux.org>
Cc: iweiny@pacbell.net, linuxdev <linuxppc-dev@lists.linuxppc.org>
Subject: Re: User level Macros for Endianess
Date: Thu, 13 Jan 2000 09:02:14 +0100 [thread overview]
Message-ID: <387D8686.EF88134E@dalim.de> (raw)
In-Reply-To: E869F6EDBD5F4E50C1256864006C9E10.006C9E4AC1256864@kehl.dalim.de
I use my own executable compiled by GNU before compiling anything else:
bigendian.c
-----------
int main()
{
unsigned short val = 0x0011;
unsigned char* str = (unsigned char*)&val;
if ( str[0] == 0x00 )
return 1;
else
return 0;
}
in my GNUmakefile
-----------------
- one rule to compile bigendian.c if exe not compiled
- one rule testing the return value of exe and setting
MEMORY_IS_LITTLE_ENDIAN or MEMORY_IS_BIG_ENDIAN
That way I do not need to look for the right MACRO on the right SYSTEM.
I compile my code on IRIX (SGI), Solaris (SUN), intel Linux and LinuxPPC.
--
/====================================================================/|
| Stephane GEORGES | ||
| DALiM SOFTWARE GmbH R&D | Tel: +49 7851 9196 40 ||
| Strassburger Str.6 | Fax: +49 7851 7357 6 ||
| D-77696 | ||
| Kehl-Sundheim (Germany) | E-mail: sg@dalim.de ||
|____________________________________________________________________|/
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
next parent reply other threads:[~2000-01-13 8:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <E869F6EDBD5F4E50C1256864006C9E10.006C9E4AC1256864@kehl.dalim.de>
2000-01-13 8:02 ` Stephane GEORGES [this message]
2000-01-13 15:48 ` User level Macros for Endianess David A. Gatwood
2000-01-13 16:18 ` Gabriel Paubert
[not found] <200001120832.AAA10014@batcave2.localdomain>
2000-01-12 9:11 ` Jesper Skov
2000-01-12 9:31 ` Gabriel Paubert
2000-01-12 13:25 ` Charles Lepple
2000-01-12 19:37 ` David A. Gatwood
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=387D8686.EF88134E@dalim.de \
--to=sg@dalim.de \
--cc=dgatwood@deepspace.mklinux.org \
--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 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.