winnt.h: Improve Rtl*Memory defines, add missing RtlEqualMemory

svn path=/trunk/; revision=66713
This commit is contained in:
Timo Kreuzer 2015-03-14 22:11:20 +00:00
parent 98f1285e6b
commit f6ca509b09
3 changed files with 12 additions and 8 deletions

View file

@ -2084,8 +2084,10 @@ RtlCompareMemoryUlong(
_In_ ULONG Pattern _In_ ULONG Pattern
); );
#ifndef RtlEqualMemory
#define RtlEqualMemory(Destination, Source, Length) \ #define RtlEqualMemory(Destination, Source, Length) \
(!memcmp(Destination, Source, Length)) (!memcmp(Destination, Source, Length))
#endif
#define RtlCopyBytes RtlCopyMemory #define RtlCopyBytes RtlCopyMemory
#define RtlFillBytes RtlFillMemory #define RtlFillBytes RtlFillMemory

View file

@ -5861,10 +5861,11 @@ RtlCompareMemory (
_In_ const VOID *Source2, _In_ const VOID *Source2,
_In_ SIZE_T Length); _In_ SIZE_T Length);
#define RtlMoveMemory memmove #define RtlMoveMemory(Dest,Source,Length) memmove((Dest),(Source),(Length))
#define RtlCopyMemory memcpy #define RtlCopyMemory(Dest,Source,Length) memcpy((Dest),(Source),(Length))
#define RtlFillMemory(d,l,f) memset((d), (f), (l)) #define RtlFillMemory(Dest,Length,Fill) memset((Dest),(Fill),(Length))
#define RtlZeroMemory(d,l) RtlFillMemory((d),(l),0) #define RtlZeroMemory(Dest,Length) RtlFillMemory((Dest),(Length),0)
#define RtlEqualMemory(Dest,Source,Length) (!memcmp((Dest),(Source),(Length)))
FORCEINLINE FORCEINLINE
PVOID PVOID

View file

@ -4506,10 +4506,11 @@ RtlCompareMemory (
_In_ const VOID *Source2, _In_ const VOID *Source2,
_In_ SIZE_T Length); _In_ SIZE_T Length);
#define RtlMoveMemory memmove #define RtlMoveMemory(Dest,Source,Length) memmove((Dest),(Source),(Length))
#define RtlCopyMemory memcpy #define RtlCopyMemory(Dest,Source,Length) memcpy((Dest),(Source),(Length))
#define RtlFillMemory(d,l,f) memset((d), (f), (l)) #define RtlFillMemory(Dest,Length,Fill) memset((Dest),(Fill),(Length))
#define RtlZeroMemory(d,l) RtlFillMemory((d),(l),0) #define RtlZeroMemory(Dest,Length) RtlFillMemory((Dest),(Length),0)
#define RtlEqualMemory(Dest,Source,Length) (!memcmp((Dest),(Source),(Length)))
FORCEINLINE FORCEINLINE
PVOID PVOID