Little_endian data on a big_endian platform?
Joe Buck
jbuck@synopsys.COM
Thu Aug 2 17:44:00 GMT 2001
> 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.
More information about the Gcc
mailing list