Fixed definition of the RtlMemory functions. Use macros internally and
for Winelib, use real functions for exports from ntdll.

diff --git a/include/winbase.h b/include/winbase.h
index 329a143..5cc91ff 100644
--- a/include/winbase.h
+++ b/include/winbase.h
@@ -1439,14 +1439,6 @@
 #define     ReportEvent WINELIB_NAME_AW(ReportEvent)
 BOOL      WINAPI ResetEvent(HANDLE);
 DWORD       WINAPI ResumeThread(HANDLE);
-VOID        WINAPI RtlFillMemory(LPVOID,UINT,UINT);
-#define     FillMemory RtlFillMemory
-VOID        WINAPI RtlMoveMemory(LPVOID,LPCVOID,UINT);
-#define     MoveMemory RtlMoveMemory
-VOID        WINAPI RtlZeroMemory(LPVOID,UINT);
-#define     ZeroMemory RtlZeroMemory
-VOID        WINAPI RtlCopyMemory(LPVOID,const VOID*, DWORD);
-#define     CopyMemory RtlCopyMemory
 BOOL        WINAPI RevertToSelf(void);
 DWORD       WINAPI SearchPathA(LPCSTR,LPCSTR,LPCSTR,DWORD,LPSTR,LPSTR*);
 DWORD       WINAPI SearchPathW(LPCWSTR,LPCWSTR,LPCWSTR,DWORD,LPWSTR,LPWSTR*);
@@ -1765,6 +1757,11 @@
 INT       WINAPI lstrcmpiW(LPCWSTR,LPCWSTR);
 #define     lstrcmpi WINELIB_NAME_AW(lstrcmpi)
 
+/* compatibility macros */
+#define     FillMemory RtlFillMemory
+#define     MoveMemory RtlMoveMemory
+#define     ZeroMemory RtlZeroMemory
+#define     CopyMemory RtlCopyMemory
 
 /* the following may be macros when compiling Wine */
 #ifndef SetLastError
diff --git a/include/winnt.h b/include/winnt.h
index f22e81b..0812239 100644
--- a/include/winnt.h
+++ b/include/winnt.h
@@ -1625,6 +1625,12 @@
 #define DACL_SECURITY_INFORMATION   0x00000004
 #define SACL_SECURITY_INFORMATION   0x00000008
 
+#define RtlEqualMemory(Destination, Source, Length) (!memcmp((Destination),(Source),(Length)))
+#define RtlMoveMemory(Destination, Source, Length) memmove((Destination),(Source),(Length))
+#define RtlCopyMemory(Destination, Source, Length) memcpy((Destination),(Source),(Length))
+#define RtlFillMemory(Destination, Length, Fill) memset((Destination),(Fill),(Length))
+#define RtlZeroMemory(Destination, Length) memset((Destination),0,(Length))
+
 #include "poppack.h"
 
 #endif  /* __WINE_WINNT_H */