- Make cmlibhost compile warning free

- Slight reordering of cmlib.h (by Colin Finck)

svn path=/trunk/; revision=35709
This commit is contained in:
Stefan Ginsberg 2008-08-27 17:54:27 +00:00
parent 9e68eda05b
commit 9112574303
3 changed files with 68 additions and 67 deletions

View file

@ -6,6 +6,8 @@
*/ */
#include "cmlib.h" #include "cmlib.h"
#define NDEBUG
#include <debug.h>
ULONG CmlibTraceLevel = 0; ULONG CmlibTraceLevel = 0;
@ -95,7 +97,7 @@ CmpPrepareIndexOfKeys(
} }
else else
{ {
DbgPrint("IndexCell->Signature %x\n", IndexCell->Signature); DPRINT1("IndexCell->Signature %x\n", IndexCell->Signature);
ASSERT(FALSE); ASSERT(FALSE);
} }
} }

View file

@ -8,6 +8,11 @@
#ifndef CMLIB_H #ifndef CMLIB_H
#define CMLIB_H #define CMLIB_H
//
// Debug support switch
//
#define _CMLIB_DEBUG_ 1
#ifdef CMLIB_HOST #ifdef CMLIB_HOST
#include <host/typedefs.h> #include <host/typedefs.h>
#include <stdio.h> #include <stdio.h>
@ -23,82 +28,76 @@
#define STATUS_NOT_REGISTRY_FILE ((NTSTATUS)0xC000015C) #define STATUS_NOT_REGISTRY_FILE ((NTSTATUS)0xC000015C)
#define STATUS_REGISTRY_RECOVERED ((NTSTATUS)0x40000009) #define STATUS_REGISTRY_RECOVERED ((NTSTATUS)0x40000009)
#define REG_OPTION_VOLATILE 1
#define OBJ_CASE_INSENSITIVE 0x00000040L
#define USHORT_MAX USHRT_MAX
VOID NTAPI
KeQuerySystemTime(
OUT PLARGE_INTEGER CurrentTime);
VOID NTAPI
RtlInitializeBitMap(
IN PRTL_BITMAP BitMapHeader,
IN PULONG BitMapBuffer,
IN ULONG SizeOfBitMap);
ULONG NTAPI
RtlFindSetBits(
IN PRTL_BITMAP BitMapHeader,
IN ULONG NumberToFind,
IN ULONG HintIndex);
VOID NTAPI
RtlSetBits(
IN PRTL_BITMAP BitMapHeader,
IN ULONG StartingIndex,
IN ULONG NumberToSet);
VOID NTAPI
RtlClearAllBits(
IN PRTL_BITMAP BitMapHeader);
#define RtlCheckBit(BMH,BP) (((((PLONG)(BMH)->Buffer)[(BP) / 32]) >> ((BP) % 32)) & 0x1)
#define PKTHREAD PVOID
#define PKGUARDED_MUTEX PVOID
#define PERESOURCE PVOID
#define PFILE_OBJECT PVOID
#define PKEVENT PVOID
#define PWORK_QUEUE_ITEM PVOID
#define EX_PUSH_LOCK PULONG_PTR
/* For <host/wcsfuncs.h> */ /* For <host/wcsfuncs.h> */
#define USE_HOST_WCSFUNCS #define USE_HOST_WCSFUNCS
#define CMLTRACE(x, ...)
#else
//
// Debug/Tracing support
//
#if _CMLIB_DEBUG_
#ifdef NEW_DEBUG_SYSTEM_IMPLEMENTED // enable when Debug Filters are implemented
#define CMLTRACE DbgPrintEx
#else
#define CMLTRACE(x, ...) \
if (x & CmlibTraceLevel) DbgPrint(__VA_ARGS__)
#endif
#else
#define CMLTRACE(x, ...) DPRINT(__VA_ARGS__)
#endif
#include <ntddk.h>
#endif #endif
#include <host/wcsfuncs.h> #include <host/wcsfuncs.h>
//
// Debug support switch
//
#define _CMLIB_DEBUG_ 1
// //
// These define the Debug Masks Supported // These define the Debug Masks Supported
// //
#define CMLIB_HCELL_DEBUG 0x01 #define CMLIB_HCELL_DEBUG 0x01
//
// Debug/Tracing support
//
#if _CMLIB_DEBUG_
#ifdef NEW_DEBUG_SYSTEM_IMPLEMENTED // enable when Debug Filters are implemented
#define CMLTRACE DbgPrintEx
#else
#define CMLTRACE(x, ...) \
if (x & CmlibTraceLevel) DbgPrint(__VA_ARGS__)
#endif
#else
#define CMLTRACE(x, ...) DPRINT(__VA_ARGS__)
#endif
#ifndef _TYPEDEFS_HOST_H
#include <ntddk.h>
#else
#define REG_OPTION_VOLATILE 1
#define OBJ_CASE_INSENSITIVE 0x00000040L
#define USHORT_MAX USHRT_MAX
VOID NTAPI
KeQuerySystemTime(
OUT PLARGE_INTEGER CurrentTime);
VOID NTAPI
RtlInitializeBitMap(
IN PRTL_BITMAP BitMapHeader,
IN PULONG BitMapBuffer,
IN ULONG SizeOfBitMap);
ULONG NTAPI
RtlFindSetBits(
IN PRTL_BITMAP BitMapHeader,
IN ULONG NumberToFind,
IN ULONG HintIndex);
VOID NTAPI
RtlSetBits(
IN PRTL_BITMAP BitMapHeader,
IN ULONG StartingIndex,
IN ULONG NumberToSet);
VOID NTAPI
RtlClearAllBits(
IN PRTL_BITMAP BitMapHeader);
#define RtlCheckBit(BMH,BP) (((((PLONG)(BMH)->Buffer)[(BP) / 32]) >> ((BP) % 32)) & 0x1)
#define PKTHREAD PVOID
#define PKGUARDED_MUTEX PVOID
#define PERESOURCE PVOID
#define PFILE_OBJECT PVOID
#define PKEVENT PVOID
#define PWORK_QUEUE_ITEM PVOID
#define EX_PUSH_LOCK PULONG_PTR
#endif
#ifndef ROUND_UP #ifndef ROUND_UP
#define ROUND_UP(a,b) ((((a)+(b)-1)/(b))*(b)) #define ROUND_UP(a,b) ((((a)+(b)-1)/(b))*(b))
#define ROUND_DOWN(a,b) (((a)/(b))*(b)) #define ROUND_DOWN(a,b) (((a)/(b))*(b))

View file

@ -14,7 +14,7 @@
<file>hivesum.c</file> <file>hivesum.c</file>
<file>hivewrt.c</file> <file>hivewrt.c</file>
</module> </module>
<module name="cmlibhost" type="hoststaticlibrary" allowwarnings="true"> <module name="cmlibhost" type="hoststaticlibrary">
<include base="cmlibhost">.</include> <include base="cmlibhost">.</include>
<include base="ReactOS">include/reactos</include> <include base="ReactOS">include/reactos</include>
<include base="ReactOS">include</include> <include base="ReactOS">include</include>