From 232af61717e9e7f5760ba8f2a84d437b86ebd65b Mon Sep 17 00:00:00 2001 From: "cantab.net!aia21" Date: Mon, 8 Mar 2004 12:19:08 +0000 Subject: [PATCH] =?UTF-8?q?Use=20bswap=5Fxx=20instead=20of=20=5F=5Fbswap?= =?UTF-8?q?=5Fconstant=5Fxx=20when=20the=20constant=20version=20is=20not?= =?UTF-8?q?=20available=20as=20is=20the=20case=20on=20some=20architectures?= =?UTF-8?q?.=20=20(Thanks=20to=20David=20Mart=EDnez=20Moreno=20for=20the?= =?UTF-8?q?=20bug=20report.)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (Logical change 1.302) --- include/ntfs/endians.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/include/ntfs/endians.h b/include/ntfs/endians.h index ba23a0f6..e43e7cc6 100644 --- a/include/ntfs/endians.h +++ b/include/ntfs/endians.h @@ -91,6 +91,17 @@ #define __cpu_to_le32(x) bswap_32(x) #define __cpu_to_le64(x) bswap_64(x) +/* For architectures that do not provide some/all of the constant versions. */ +#ifndef __bswap_constant_16 +#define __bswap_constant_16(x) bswap_16(x) +#endif +#ifndef __bswap_constant_32 +#define __bswap_constant_32(x) bswap_32(x) +#endif +#ifndef __bswap_constant_64 +#define __bswap_constant_64(x) bswap_64(x) +#endif + #define __constant_le16_to_cpu(x) __bswap_constant_16(x) #define __constant_le32_to_cpu(x) __bswap_constant_32(x) #define __constant_le64_to_cpu(x) __bswap_constant_64(x)