mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 08:55:19 +00:00
[XDK/DDK/NDK]
Simplify RtlXxxByteSwap macros (use them unconditionally) svn path=/trunk/; revision=67520
This commit is contained in:
parent
6223a53eb1
commit
49dfd75396
3 changed files with 2 additions and 42 deletions
|
@ -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) \
|
||||
|
|
|
@ -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
|
||||
|
||||
//
|
||||
|
|
|
@ -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) \
|
||||
|
|
Loading…
Reference in a new issue