Author: tkreuzer Date: Sat May 2 22:19:47 2015 New Revision: 67520
URL: http://svn.reactos.org/svn/reactos?rev=67520&view=rev Log: [XDK/DDK/NDK] Simplify RtlXxxByteSwap macros (use them unconditionally)
Modified: trunk/reactos/include/ddk/wdm.h trunk/reactos/include/ndk/rtlfuncs.h trunk/reactos/include/xdk/rtlfuncs.h
Modified: trunk/reactos/include/ddk/wdm.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/wdm.h?rev=67520... ============================================================================== --- trunk/reactos/include/ddk/wdm.h [iso-8859-1] (original) +++ trunk/reactos/include/ddk/wdm.h [iso-8859-1] Sat May 2 22:19:47 2015 @@ -11528,15 +11528,9 @@ #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
Modified: trunk/reactos/include/ndk/rtlfuncs.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/rtlfuncs.h?rev=... ============================================================================== --- trunk/reactos/include/ndk/rtlfuncs.h [iso-8859-1] (original) +++ trunk/reactos/include/ndk/rtlfuncs.h [iso-8859-1] Sat May 2 22:19:47 2015 @@ -1730,46 +1730,18 @@ // #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
//
Modified: trunk/reactos/include/xdk/rtlfuncs.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/xdk/rtlfuncs.h?rev=... ============================================================================== --- trunk/reactos/include/xdk/rtlfuncs.h [iso-8859-1] (original) +++ trunk/reactos/include/xdk/rtlfuncs.h [iso-8859-1] Sat May 2 22:19:47 2015 @@ -3184,15 +3184,9 @@ #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