[Speex-dev] [patch] Mac Universal Binaries

Peter Grayson jpgrayson at gmail.com
Wed May 2 13:30:27 PDT 2007


Hi all,

Speex currently decides endianness at configure-time. This causes the
ppc half of Mac universal binaries to have some endianness problems.
Most notably, the header built by speex_packet_to_header() has
incorrect byte-ordering.

This Apple developer page describes the incantation that can be used
to build universal binaries on Mac. It also highlights the
configure-time versus compile-time endianess problem

http://developer.apple.com/documentation/Porting/Conceptual/PortingUnix/compiling/chapter_4_section_3.html

I have included a patch that applies Apple's recommendation to use the
gcc-defined __BIG_ENDIAN__ preprocessor variable to determine
endianness at compile-time. This technique works like a champ on Mac.
It also works fine on Linux variants with modern a modern gcc. And
Windows works like before.

The patch was made against the head of the subversion trunk.

Hope this helps.

Pete
-------------- next part --------------
A non-text attachment was scrubbed...
Name: speex-ppc-endianness.patch
Type: text/x-patch
Size: 1240 bytes
Desc: not available
Url : http://lists.xiph.org/pipermail/speex-dev/attachments/20070502/9a81b8c4/speex-ppc-endianness.bin


More information about the Speex-dev mailing list