ddk/ntddk.h (alternative 2)
Francois Gouget
fgouget at free.fr
Tue Aug 31 11:18:00 CDT 2004
On Tue, 31 Aug 2004, Francois Gouget wrote:
>
> Alternative 2 is to duplicated the needed declarations into rtlbitmap.c
> and include neither winternl.h or ntddk.h.
>
> With this option drop the dependency on the MS DDK while still running
> tests. Unfortunately testing RtlCheckBit is pretty meaningless as we
> have to duplicate the inline definition (it's not exported by ntdll.dll
> as far as I can see). Also it means we don't use the Microsoft headers
> and thus won't know if stuff changes.
>
>
> Changelog:
>
> * dlls/ntdll/tests/rtlbitmap.c
>
> Duplicate the RTL_BITMAP, RTL_BITMAP_RUN and RtlCheckBit definitions
> so this test compiles and runs with the Microsoft SDK headers.
Whoops. With patch this time.
--
Francois Gouget fgouget at free.fr http://fgouget.free.fr/
RFC 2549: ftp://ftp.isi.edu/in-notes/rfc2549.txt
IP over Avian Carriers with Quality of Service
-------------- next part --------------
Index: dlls/ntdll/tests/rtlbitmap.c
===================================================================
RCS file: /var/cvs/wine/dlls/ntdll/tests/rtlbitmap.c,v
retrieving revision 1.8
diff -u -r1.8 rtlbitmap.c
--- dlls/ntdll/tests/rtlbitmap.c 23 Aug 2004 18:52:54 -0000 1.8
+++ dlls/ntdll/tests/rtlbitmap.c 31 Aug 2004 14:31:51 -0000
@@ -21,7 +21,30 @@
* in later versions of ntdll.
*/
-#include "ntdll_test.h"
+#include <stdarg.h>
+
+#include <windef.h>
+#include <winbase.h>
+#include <wine/test.h>
+
+typedef struct tagRTL_BITMAP {
+ ULONG SizeOfBitMap;
+ PULONG Buffer;
+} RTL_BITMAP, *PRTL_BITMAP;
+typedef const RTL_BITMAP *PCRTL_BITMAP;
+
+typedef struct tagRTL_BITMAP_RUN {
+ ULONG StartingIndex;
+ ULONG NumberOfBits;
+} RTL_BITMAP_RUN, *PRTL_BITMAP_RUN;
+
+inline static BOOLEAN RtlCheckBit(PCRTL_BITMAP lpBits, ULONG ulBit)
+{
+ if (lpBits && ulBit < lpBits->SizeOfBitMap &&
+ lpBits->Buffer[ulBit >> 5] & (1 << (ulBit & 31)))
+ return TRUE;
+ return FALSE;
+}
/* Function ptrs for ordinal calls */
static HMODULE hntdll = 0;
More information about the wine-patches
mailing list