Question about bigendian/littleendian dependencies with universal binaries.
Question about bigendian/littleendian dependencies with universal binaries.
- Subject: Question about bigendian/littleendian dependencies with universal binaries.
- From: Terry Simons <email@hidden>
- Date: Mon, 15 Oct 2007 12:24:31 -0600
Hi,
I'm working on an application that needs to deal with big and little
endian differences beyond the standard networking "host to network"
and "network to host" API calls, and I'm curious how this will affect
the creation of a Universal Binary.
We're using the autoconf tools to configure the project, and I know
that it's possible to use AC_C_BIGENDIAN to elicit -DWORDS_BIGENDIAN
(or not) on the appropriate platform, but it seems as if this would
always be defined if the build host is big endian, and never defined
if the build host is little endian.
So what's the proper way to deal with a situation such as this? Is
there some sort of define that magically happens for me when the
compiler is targeting x86 on a ppc and vice versa?
Should we be using some sort of magic token to do the determination
at runtime? If so, is there an example somewhere of how to do this?
Any help is appreciated.
- Terry
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden