mirror of
https://github.com/claunia/flac.git
synced 2025-12-16 18:54:26 +00:00
Use a configure check for bswap16 instead of gcc version #ifdefs.
Fixes a build problem on apple clang. Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
This commit is contained in:
committed by
Erik de Castro Lopo
parent
1f30b3e711
commit
7a671e7c41
@@ -67,6 +67,7 @@ AC_CHECK_HEADERS([stdint.h inttypes.h byteswap.h sys/param.h termios.h x86intrin
|
|||||||
AC_HEADER_TIOCGWINSZ
|
AC_HEADER_TIOCGWINSZ
|
||||||
|
|
||||||
XIPH_C_BSWAP32
|
XIPH_C_BSWAP32
|
||||||
|
XIPH_C_BSWAP16
|
||||||
|
|
||||||
ac_cv_c_big_endian=0
|
ac_cv_c_big_endian=0
|
||||||
ac_cv_c_little_endian=0
|
ac_cv_c_little_endian=0
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
#if HAVE_BSWAP32 /* GCC and Clang */
|
#if HAVE_BSWAP32 /* GCC and Clang */
|
||||||
|
|
||||||
/* GCC prior to 4.8 didn't provide bswap16 on x86_64 */
|
/* GCC prior to 4.8 didn't provide bswap16 on x86_64 */
|
||||||
#if __GNUC__ <= 4 && __GNUC_MINOR__ < 8
|
#ifndef HAVE_BSWAP16
|
||||||
static inline unsigned short __builtin_bswap16(unsigned short a)
|
static inline unsigned short __builtin_bswap16(unsigned short a)
|
||||||
{
|
{
|
||||||
return (a<<8)|(a>>8);
|
return (a<<8)|(a>>8);
|
||||||
|
|||||||
Reference in New Issue
Block a user