Skip to content

Commit

Permalink
ALAC : Fall back to compiler's __BYTE_ORDER__ for endian-ness detection.
Browse files Browse the repository at this point in the history
  • Loading branch information
erikd committed Feb 8, 2013
1 parent 1ad2dec commit 13106fa
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2013-02-07 Erik de Castro Lopo <erikd AT mega-nerd DOT com>

* src/ALAC/EndianPortable.c
Fall back to compiler's __BYTE_ORDER__ for endian-ness detection.

2013-02-06 Erik de Castro Lopo <erikd AT mega-nerd DOT com>

* configure.ac src/common.h src/ima_adpcm.c src/ms_adpcm.c src/paf.c
Expand Down
8 changes: 8 additions & 0 deletions src/ALAC/EndianPortable.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@
#define TARGET_RT_LITTLE_ENDIAN 0
#elif defined (TARGET_OS_WIN32)
#define TARGET_RT_LITTLE_ENDIAN 1
#elif defined (__BYTE_ORDER__)

#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
#define TARGET_RT_LITTLE_ENDIAN 1
#else
#define TARGET_RT_LITTLE_ENDIAN 0
#endif

#endif

uint16_t Swap16NtoB(uint16_t inUInt16)
Expand Down

0 comments on commit 13106fa

Please sign in to comment.