Author: fireball
Date: Sun Aug 27 01:19:34 2006
New Revision: 23731
URL:
http://svn.reactos.org/svn/reactos?rev=23731&view=rev
Log:
- Typecast a param so that it doesn't give an error in gcc
- Make cmlib compilable as a makefile target "cmlib_host" (needed for linking
with mkhive)
Modified:
trunk/reactos/lib/cmlib/cmlib.mak
trunk/reactos/lib/cmlib/hivecell.c
Modified: trunk/reactos/lib/cmlib/cmlib.mak
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/cmlib/cmlib.mak?rev=23…
==============================================================================
--- trunk/reactos/lib/cmlib/cmlib.mak (original)
+++ trunk/reactos/lib/cmlib/cmlib.mak Sun Aug 27 01:19:34 2006
@@ -28,7 +28,9 @@
$(subst $(CMLIB_BASE), $(CMLIB_INT), $(CMLIB_HOST_SOURCES:.c=.o))
CMLIB_HOST_CFLAGS = -O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
- -DCMLIB_HOST -D_M_IX86 -I$(CMLIB_BASE) -Iinclude/reactos -DDBG
+ -D_X86_ -D__i386__ -D_REACTOS_ \
+ -DCMLIB_HOST -D_M_IX86 -I$(CMLIB_BASE) -Iinclude/reactos -Iinclude/psdk -Iinclude/ddk
\
+ -D__NO_CTYPE_INLINES
$(CMLIB_HOST_TARGET): $(CMLIB_HOST_OBJECTS) | $(CMLIB_OUT)
$(ECHO_AR)
Modified: trunk/reactos/lib/cmlib/hivecell.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/cmlib/hivecell.c?rev=2…
==============================================================================
--- trunk/reactos/lib/cmlib/hivecell.c (original)
+++ trunk/reactos/lib/cmlib/hivecell.c Sun Aug 27 01:19:34 2006
@@ -143,7 +143,7 @@
ASSERT(FreeBlock != NULL);
Storage = (FreeIndex & HCELL_TYPE_MASK) >> HCELL_TYPE_SHIFT;
- Index = HvpComputeFreeListIndex(FreeBlock->Size);
+ Index = HvpComputeFreeListIndex((ULONG)FreeBlock->Size);
FreeBlockData = (PHCELL_INDEX)(FreeBlock + 1);
*FreeBlockData = RegistryHive->Storage[Storage].FreeDisplay[Index];
@@ -168,7 +168,7 @@
ASSERT(RegistryHive->ReadOnly == FALSE);
Storage = (CellIndex & HCELL_TYPE_MASK) >> HCELL_TYPE_SHIFT;
- Index = HvpComputeFreeListIndex(CellBlock->Size);
+ Index = HvpComputeFreeListIndex((ULONG)CellBlock->Size);
pFreeCellOffset = &RegistryHive->Storage[Storage].FreeDisplay[Index];
while (*pFreeCellOffset != HCELL_NULL)