[PSDK]
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Sat, 14 Mar 2015 22:11:20 +0000 (22:11 +0000)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Sat, 14 Mar 2015 22:11:20 +0000 (22:11 +0000)
winnt.h: Improve Rtl*Memory defines, add missing RtlEqualMemory

svn path=/trunk/; revision=66713

reactos/include/ndk/rtlfuncs.h
reactos/include/psdk/winnt.h
reactos/include/xdk/winnt_old.h

index b38a982..8e7b755 100644 (file)
@@ -2084,8 +2084,10 @@ RtlCompareMemoryUlong(
     _In_ ULONG Pattern
 );
 
+#ifndef RtlEqualMemory
 #define RtlEqualMemory(Destination, Source, Length) \
     (!memcmp(Destination, Source, Length))
+#endif
 
 #define RtlCopyBytes RtlCopyMemory
 #define RtlFillBytes RtlFillMemory
index 4b9e332..0e7497b 100644 (file)
@@ -5861,10 +5861,11 @@ RtlCompareMemory (
   _In_ const VOID *Source2,
   _In_ SIZE_T Length);
 
-#define RtlMoveMemory memmove
-#define RtlCopyMemory memcpy
-#define RtlFillMemory(d,l,f) memset((d), (f), (l))
-#define RtlZeroMemory(d,l) RtlFillMemory((d),(l),0)
+#define RtlMoveMemory(Dest,Source,Length) memmove((Dest),(Source),(Length))
+#define RtlCopyMemory(Dest,Source,Length) memcpy((Dest),(Source),(Length))
+#define RtlFillMemory(Dest,Length,Fill) memset((Dest),(Fill),(Length))
+#define RtlZeroMemory(Dest,Length) RtlFillMemory((Dest),(Length),0)
+#define RtlEqualMemory(Dest,Source,Length) (!memcmp((Dest),(Source),(Length)))
 
 FORCEINLINE
 PVOID
index 7bc4d3c..e340221 100644 (file)
@@ -4506,10 +4506,11 @@ RtlCompareMemory (
   _In_ const VOID *Source2,
   _In_ SIZE_T Length);
 
-#define RtlMoveMemory memmove
-#define RtlCopyMemory memcpy
-#define RtlFillMemory(d,l,f) memset((d), (f), (l))
-#define RtlZeroMemory(d,l) RtlFillMemory((d),(l),0)
+#define RtlMoveMemory(Dest,Source,Length) memmove((Dest),(Source),(Length))
+#define RtlCopyMemory(Dest,Source,Length) memcpy((Dest),(Source),(Length))
+#define RtlFillMemory(Dest,Length,Fill) memset((Dest),(Fill),(Length))
+#define RtlZeroMemory(Dest,Length) RtlFillMemory((Dest),(Length),0)
+#define RtlEqualMemory(Dest,Source,Length) (!memcmp((Dest),(Source),(Length)))
 
 FORCEINLINE
 PVOID