diff --git a/config.h.in b/config.h.in index f9155955..b586808a 100644 --- a/config.h.in +++ b/config.h.in @@ -6,6 +6,18 @@ /* Define to 1 if you have the 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 header file. */ #undef HAVE_DLFCN_H diff --git a/include/ntfs/endians.h b/include/ntfs/endians.h index e43e7cc6..bb8cf543 100644 --- a/include/ntfs/endians.h +++ b/include/ntfs/endians.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