This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Little_endian data on a big_endian platform?
- To: BAndreasen at octavecomm dot com (Barry Andreasen)
- Subject: Re: Little_endian data on a big_endian platform?
- From: Joe Buck <jbuck at synopsys dot COM>
- Date: Thu, 2 Aug 2001 17:44:25 -0700 (PDT)
- Cc: gcc at gcc dot gnu dot org ('gcc at gcc dot gnu dot org'), BAndreasen at octavecomm dot com (Barry Andreasen)
> I have an application that is being ported to a Solaris/SPARC platform.
> This application interacts with other system processes and generates data
> that is transmitted over the network to other platforms that are not
> BIG_ENDIAN format. Based on the information I have been given about the
> client-server components, they were not built to pass platform independent
> data formats on the network (for unknown historic reasons). Are there
> options (commandline or build) with the compiler that would allow it to do
> the byte swapping on the data segment but not on the machine code so that
> the application could be built to interact with the existing LITTLE_ENDIAN
> network clients.
No, there are no such options. You'll need to add code that does the
appropriate byte-swapping.