From 9f50d049ea9ab846d63441766cab425a687b6575 Mon Sep 17 00:00:00 2001 From: Juergen Schmied Date: Sat, 26 Feb 2000 19:35:50 +0000 Subject: [PATCH] Fixed definition of the RtlMemory functions. Use macros internally and for Winelib, use real functions for exports from ntdll. --- dlls/ntdll/ntdll.spec | 2 +- dlls/ntdll/rtl.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++ include/winbase.h | 13 +++++-------- include/winnt.h | 6 ++++++ memory/string.c | 28 ---------------------------- 5 files changed, 59 insertions(+), 37 deletions(-) diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec index 8aaf826d03d..f9e723820e7 100644 --- a/dlls/ntdll/ntdll.spec +++ b/dlls/ntdll/ntdll.spec @@ -291,7 +291,7 @@ type win32 @ stub RtlClearAllBits @ stdcall RtlClearBits(long long long) RtlClearBits @ stub RtlCompactHeap -@ stub RtlCompareMemory +@ stdcall RtlCompareMemory(ptr ptr long) RtlCompareMemory @ stub RtlCompareMemoryUlong @ stub RtlCompareString @ stdcall RtlCompareUnicodeString (ptr ptr long) RtlCompareUnicodeString diff --git a/dlls/ntdll/rtl.c b/dlls/ntdll/rtl.c index 4b379c4aabe..f3dd60ab345 100644 --- a/dlls/ntdll/rtl.c +++ b/dlls/ntdll/rtl.c @@ -503,6 +503,53 @@ NTSTATUS WINAPI RtlClearBits(DWORD x1,DWORD x2,DWORD x3) } /****************************************************************************** + * RtlCopyMemory [NTDLL] + * + */ +#undef RtlCopyMemory +VOID WINAPI RtlCopyMemory( VOID *Destination, CONST VOID *Source, SIZE_T Length ) +{ + memcpy(Destination, Source, Length); +} + +/****************************************************************************** + * RtlMoveMemory [NTDLL] + */ +#undef RtlMoveMemory +VOID WINAPI RtlMoveMemory( VOID *Destination, CONST VOID *Source, SIZE_T Length ) +{ + memmove(Destination, Source, Length); +} + +/****************************************************************************** + * RtlFillMemory [NTDLL] + */ +#undef RtlFillMemory +VOID WINAPI RtlFillMemory( VOID *Destination, SIZE_T Length, BYTE Fill ) +{ + memset(Destination, Fill, Length); +} + +/****************************************************************************** + * RtlZeroMemory [NTDLL] + */ +#undef RtlZeroMemory +VOID WINAPI RtlZeroMemory( VOID *Destination, SIZE_T Length ) +{ + memset(Destination, 0, Length); +} + +/****************************************************************************** + * RtlCompareMemory [NTDLL] + */ +SIZE_T WINAPI RtlCompareMemory( const VOID *Source1, const VOID *Source2, SIZE_T Length) +{ + int i; + for(i=0; (i