mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 07:56:59 +00:00
Fix mkhive on unix.
svn path=/trunk/; revision=24242
This commit is contained in:
parent
939cbfc4c7
commit
5d46ef1a26
5 changed files with 26 additions and 4 deletions
|
@ -152,11 +152,15 @@ ifeq ($(word 1,$(shell gcc -dumpmachine)),mingw32)
|
||||||
ifeq ($(findstring msys,$(shell sh --version 2>nul)),msys)
|
ifeq ($(findstring msys,$(shell sh --version 2>nul)),msys)
|
||||||
export OSTYPE = msys
|
export OSTYPE = msys
|
||||||
HOST=mingw32-linux
|
HOST=mingw32-linux
|
||||||
|
CFLAGS+=-fshort-wchar
|
||||||
|
CPPFLAGS+=-fshort-wchar
|
||||||
else
|
else
|
||||||
HOST=mingw32-windows
|
HOST=mingw32-windows
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
HOST=mingw32-linux
|
HOST=mingw32-linux
|
||||||
|
CFLAGS+=-fshort-wchar
|
||||||
|
CPPFLAGS+=-fshort-wchar
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ MKHIVE_SOURCES = $(addprefix $(MKHIVE_BASE_), \
|
||||||
MKHIVE_OBJECTS = \
|
MKHIVE_OBJECTS = \
|
||||||
$(addprefix $(INTERMEDIATE_), $(MKHIVE_SOURCES:.c=.o))
|
$(addprefix $(INTERMEDIATE_), $(MKHIVE_SOURCES:.c=.o))
|
||||||
|
|
||||||
MKHIVE_HOST_CFLAGS = $(xTOOLS_CFLAGS) -I$(INFLIB_BASE) -I$(CMLIB_BASE) \
|
MKHIVE_HOST_CFLAGS = -fshort-wchar $(xTOOLS_CFLAGS) -I$(INFLIB_BASE) -I$(CMLIB_BASE) \
|
||||||
-D_NTOSKRNL_ \
|
-D_NTOSKRNL_ \
|
||||||
-Iinclude/reactos -Iinclude/ddk -Iinclude/ndk -Iinclude/psdk -Iinclude -Iinclude/crt -g3
|
-Iinclude/reactos -Iinclude/ddk -Iinclude/ndk -Iinclude/psdk -Iinclude -Iinclude/crt -g3
|
||||||
|
|
||||||
|
|
|
@ -122,7 +122,7 @@ RegpOpenOrCreateKey(
|
||||||
LocalKeyName = (PWSTR)KeyName;
|
LocalKeyName = (PWSTR)KeyName;
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
End = (PWSTR) wcschr(LocalKeyName, '\\');
|
End = (PWSTR) xwcschr(LocalKeyName, '\\');
|
||||||
if (End)
|
if (End)
|
||||||
{
|
{
|
||||||
KeyString.Buffer = LocalKeyName;
|
KeyString.Buffer = LocalKeyName;
|
||||||
|
|
|
@ -11,6 +11,24 @@
|
||||||
#include <ntddk.h>
|
#include <ntddk.h>
|
||||||
#include <bitmap.c>
|
#include <bitmap.c>
|
||||||
|
|
||||||
|
SIZE_T xwcslen( PWSTR String ) {
|
||||||
|
SIZE_T i;
|
||||||
|
|
||||||
|
for( i = 0; String[i]; i++ );
|
||||||
|
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
|
||||||
|
PWSTR xwcschr( PWSTR String, WCHAR Char )
|
||||||
|
{
|
||||||
|
SIZE_T i;
|
||||||
|
|
||||||
|
for( i = 0; String[i] && String[i] != Char; i++ );
|
||||||
|
|
||||||
|
if( String[i] ) return &String[i];
|
||||||
|
else return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @implemented
|
* @implemented
|
||||||
*
|
*
|
||||||
|
@ -54,7 +72,7 @@ RtlInitUnicodeString(
|
||||||
|
|
||||||
if(SourceString)
|
if(SourceString)
|
||||||
{
|
{
|
||||||
DestSize = wcslen(SourceString) * sizeof(WCHAR);
|
DestSize = xwcslen(SourceString) * sizeof(WCHAR);
|
||||||
DestinationString->Length = (USHORT)DestSize;
|
DestinationString->Length = (USHORT)DestSize;
|
||||||
DestinationString->MaximumLength = (USHORT)DestSize + sizeof(WCHAR);
|
DestinationString->MaximumLength = (USHORT)DestSize + sizeof(WCHAR);
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,7 +55,7 @@ WIDL_OBJECTS = \
|
||||||
$(addprefix $(INTERMEDIATE_), $(WIDL_SOURCES:.c=.o))
|
$(addprefix $(INTERMEDIATE_), $(WIDL_SOURCES:.c=.o))
|
||||||
|
|
||||||
WIDL_HOST_CFLAGS = $(TOOLS_CFLAGS) \
|
WIDL_HOST_CFLAGS = $(TOOLS_CFLAGS) \
|
||||||
-DINT16=SHORT -D__USE_W32API -DYYDEBUG=1 \
|
-DINT16=SHORT -D__USE_W32API -DYYDEBUG=1 -D__REACTOS__=1 \
|
||||||
-I$(WIDL_BASE) -I$(WPP_BASE) \
|
-I$(WIDL_BASE) -I$(WPP_BASE) \
|
||||||
-Iinclude/reactos/wine -Iinclude/reactos -Iinclude -Iinclude/psdk
|
-Iinclude/reactos/wine -Iinclude/reactos -Iinclude -Iinclude/psdk
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue