Question about bigendian/littleendian dependencies with universal binaries.
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Hi, Any help is appreciated. - Terry _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... 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? This email sent to site_archiver@lists.apple.com
participants (1)
-
Terry Simons