This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Question On Endianness And Solaris Sparc Versus IA32 File Systems
- From: Ian Lance Taylor <iant at google dot com>
- To: Thomas Dineen <tdineen at ix dot netcom dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: 16 Sep 2007 11:17:22 -0700
- Subject: Re: Question On Endianness And Solaris Sparc Versus IA32 File Systems
- References: <46EC478B.1090804@ix.netcom.com>
Thomas Dineen <tdineen@ix.netcom.com> writes:
> On both Solaris 8 Sparc and Solaris 8 IA32
> machines when I read the same file sequentially
> using getc() and I get different results in byte
> ordering because of the Big Endian (Sparc) versus
> Little Endian (Intel) file system data organization.
>
> Question is there any way to automatically
> compensate for this with getc??? Or more obviously
> do I just have to rewrite the software application
> to compensate for this?
As you said, the question is off-topic. This mailing list is for
questions about the gcc compiler, not for general programming
questions.
You have to write the software to compensate.
Ian