# HG changeset patch # User Matti Hamalainen # Date 1206833140 -7200 # Node ID a5f1c47cee0c35c83df69ec8324ec7423aa0bfb8 # Parent f2b3cdb6e7dc7976f03c6e4774c17d94ee6899d4 Use Glib endianess macros. diff -r f2b3cdb6e7dc -r a5f1c47cee0c src/sid/xs_md5.c --- a/src/sid/xs_md5.c Sun Mar 30 01:16:00 2008 +0200 +++ b/src/sid/xs_md5.c Sun Mar 30 01:25:40 2008 +0200 @@ -12,9 +12,10 @@ #include -#ifndef WORDS_BIGENDIAN +#if G_BYTE_ORDER == G_LITTLE_ENDIAN #define xs_md5_bytereverse(buf, len) /* Nothing */ #else +#if G_BYTE_ORDER == G_BIG_ENDIAN void xs_md5_bytereverse(guint8 *buf, guint l) { guint32 t; @@ -24,6 +25,9 @@ buf += sizeof(guint32); } while (--l); } +#else +#error Unsupported endianess! +#endif #endif diff -r f2b3cdb6e7dc -r a5f1c47cee0c src/sid/xs_sidplay2.cc --- a/src/sid/xs_sidplay2.cc Sun Mar 30 01:16:00 2008 +0200 +++ b/src/sid/xs_sidplay2.cc Sun Mar 30 01:25:40 2008 +0200 @@ -173,10 +173,14 @@ break; case FMT_U16_NE: -#ifdef WORDS_BIGENDIAN +#if G_BYTE_ORDER == G_BIG_ENDIAN myEngine->currConfig.sampleFormat = SID2_BIG_UNSIGNED; #else +#if G_BYTE_ORDER == G_LITTLE_ENDIAN myEngine->currConfig.sampleFormat = SID2_LITTLE_UNSIGNED; +#else +#error Unsupported endianess! +#endif #endif break; @@ -190,10 +194,14 @@ default: myStatus->audioFormat = FMT_S16_NE; -#ifdef WORDS_BIGENDIAN +#if G_BYTE_ORDER == G_BIG_ENDIAN myEngine->currConfig.sampleFormat = SID2_BIG_SIGNED; #else +#if G_BYTE_ORDER == G_LITTLE_ENDIAN myEngine->currConfig.sampleFormat = SID2_LITTLE_SIGNED; +#else +#error Unsupported endianess! +#endif #endif break;