[gaim-migrate @ 14718]

Thu, 08 Dec 2005 20:59:49 +0000

author
Richard Laager <rlaager@pidgin.im>
date
Thu, 08 Dec 2005 20:59:49 +0000
changeset 12411
925acea38f31
parent 12410
98d8abd3db98
child 12412
8abe3226695e

[gaim-migrate @ 14718]
Use the glib byte order macros, so we can prune out configure.ac a bit. Also, add a warning in case someone tries to compile this on a machine with an unknown byte ordering. I really don't think that'll happen, but it doesn't hurt to be thorough.

src/gtksound.c file | annotate | diff | comparison | revisions
--- a/src/gtksound.c	Thu Dec 08 20:59:33 2005 +0000
+++ b/src/gtksound.c	Thu Dec 08 20:59:49 2005 +0000
@@ -474,14 +474,16 @@
 			afSetVirtualSampleFormat(file, AF_DEFAULT_TRACK,
 					AF_SAMPFMT_TWOSCOMP, format.bits);
 
-#if __BYTE_ORDER == __BIG_ENDIAN
+#if G_BYTE_ORDER == G_BIG_ENDIAN
 			format.byte_format = AO_FMT_BIG;
 			afSetVirtualByteOrder(file, AF_DEFAULT_TRACK,
 					AF_BYTEORDER_BIGENDIAN);
-#elif __BYTE_ORDER == __LITTLE_ENDIAN
+#elif G_BYTE_ORDER == G_LITTLE_ENDIAN
 			format.byte_format = AO_FMT_LITTLE;
 			afSetVirtualByteOrder(file, AF_DEFAULT_TRACK,
 					AF_BYTEORDER_LITTLEENDIAN);
+#else
+#warning Unknown endianness
 #endif
 
 			bytes_per_frame = format.bits * format.channels / 8;

mercurial