Use AC_CHECK_DECLS in configure.ac to determine if the constant bswap
functions are defined/declared and define them to the non-constant ones in endians.h if not. (Logical change 1.314)edge.strict_endians
parent
aa0398ea0e
commit
0dd38ddd7d
12
config.h.in
12
config.h.in
|
@ -6,6 +6,18 @@
|
|||
/* Define to 1 if you have the <byteswap.h> header file. */
|
||||
#undef HAVE_BYTESWAP_H
|
||||
|
||||
/* Define to 1 if you have the declaration of `__bswap_constant_16', and to 0
|
||||
if you don't. */
|
||||
#undef HAVE_DECL___BSWAP_CONSTANT_16
|
||||
|
||||
/* Define to 1 if you have the declaration of `__bswap_constant_32', and to 0
|
||||
if you don't. */
|
||||
#undef HAVE_DECL___BSWAP_CONSTANT_32
|
||||
|
||||
/* Define to 1 if you have the declaration of `__bswap_constant_64', and to 0
|
||||
if you don't. */
|
||||
#undef HAVE_DECL___BSWAP_CONSTANT_64
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#undef HAVE_DLFCN_H
|
||||
|
||||
|
|
|
@ -92,13 +92,13 @@
|
|||
#define __cpu_to_le64(x) bswap_64(x)
|
||||
|
||||
/* For architectures that do not provide some/all of the constant versions. */
|
||||
#ifndef __bswap_constant_16
|
||||
#if defined HAVE_DECL___BSWAP_CONSTANT_16 && !HAVE_DECL___BSWAP_CONSTANT_16
|
||||
#define __bswap_constant_16(x) bswap_16(x)
|
||||
#endif
|
||||
#ifndef __bswap_constant_32
|
||||
#if defined HAVE_DECL___BSWAP_CONSTANT_32 && !HAVE_DECL___BSWAP_CONSTANT_32
|
||||
#define __bswap_constant_32(x) bswap_32(x)
|
||||
#endif
|
||||
#ifndef __bswap_constant_64
|
||||
#if defined HAVE_DECL___BSWAP_CONSTANT_64 && !HAVE_DECL___BSWAP_CONSTANT_64
|
||||
#define __bswap_constant_64(x) bswap_64(x)
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue