[XDK/DDK/NDK]

Simplify RtlXxxByteSwap macros (use them unconditionally)

svn path=/trunk/; revision=67520
This commit is contained in:
Timo Kreuzer 2015-05-02 22:19:47 +00:00
parent 6223a53eb1
commit 49dfd75396
3 changed files with 2 additions and 42 deletions

View file

@ -11528,16 +11528,10 @@ RtlCheckBit(
#endif /* !defined(MIDL_PASS) */
/* Byte Swap Functions */
#if (defined(_M_IX86) && (_MSC_FULL_VER > 13009037 || defined(__GNUC__))) || \
((defined(_M_AMD64) || defined(_M_IA64)) \
&& (_MSC_FULL_VER > 13009175 || defined(__GNUC__)))
#define RtlUshortByteSwap(_x) _byteswap_ushort((USHORT)(_x))
#define RtlUlongByteSwap(_x) _byteswap_ulong((_x))
#define RtlUlonglongByteSwap(_x) _byteswap_uint64((_x))
#endif
#if DBG
#define RTL_VERIFY(exp) \

View file

@ -1730,46 +1730,18 @@ RtlCharToInteger(
//
#ifdef NTOS_MODE_USER
#if (defined(_M_IX86) && (_MSC_FULL_VER > 13009037)) || \
((defined(_M_AMD64) || \
defined(_M_IA64)) && (_MSC_FULL_VER > 13009175))
unsigned short __cdecl _byteswap_ushort(unsigned short);
unsigned long __cdecl _byteswap_ulong (unsigned long);
unsigned __int64 __cdecl _byteswap_uint64(unsigned __int64);
#ifdef _MSC_VER
#pragma intrinsic(_byteswap_ushort)
#pragma intrinsic(_byteswap_ulong)
#pragma intrinsic(_byteswap_uint64)
#endif // _MSC_VER
#define RtlUshortByteSwap(_x) _byteswap_ushort((USHORT)(_x))
#define RtlUlongByteSwap(_x) _byteswap_ulong((_x))
#define RtlUlonglongByteSwap(_x) _byteswap_uint64((_x))
#elif defined (__GNUC__)
#define RtlUshortByteSwap(_x) _byteswap_ushort((USHORT)(_x))
#define RtlUlongByteSwap(_x) _byteswap_ulong((_x))
#define RtlUlonglongByteSwap(_x) _byteswap_uint64((_x))
#else
#if (NTDDI_VERSION >= NTDDI_WIN2K)
NTSYSAPI
USHORT
FASTCALL
RtlUshortByteSwap(IN USHORT Source);
NTSYSAPI
ULONG
FASTCALL
RtlUlongByteSwap(IN ULONG Source);
NTSYSAPI
ULONGLONG
FASTCALL
RtlUlonglongByteSwap(IN ULONGLONG Source);
#endif
#endif
#endif // NTOS_MODE_USER
//

View file

@ -3184,16 +3184,10 @@ RtlCheckBit(
#endif /* !defined(MIDL_PASS) */
/* Byte Swap Functions */
#if (defined(_M_IX86) && (_MSC_FULL_VER > 13009037 || defined(__GNUC__))) || \
((defined(_M_AMD64) || defined(_M_IA64)) \
&& (_MSC_FULL_VER > 13009175 || defined(__GNUC__)))
#define RtlUshortByteSwap(_x) _byteswap_ushort((USHORT)(_x))
#define RtlUlongByteSwap(_x) _byteswap_ulong((_x))
#define RtlUlonglongByteSwap(_x) _byteswap_uint64((_x))
#endif
#if DBG
#define RTL_VERIFY(exp) \