Author: amunger
Date: Sat Sep 30 06:54:20 2006
New Revision: 24304
URL:
http://svn.reactos.org/svn/reactos?rev=24304&view=rev
Log:
Merge 24208, 24236, 24242, and 24259 from trunk. LiveCD fixes.
Modified:
branches/ros-branch-0_3_1/reactos/Makefile
branches/ros-branch-0_3_1/reactos/config.rbuild
branches/ros-branch-0_3_1/reactos/tools/buildno/buildno.cpp
branches/ros-branch-0_3_1/reactos/tools/mkhive/cmi.c
branches/ros-branch-0_3_1/reactos/tools/mkhive/mkhive.mak
branches/ros-branch-0_3_1/reactos/tools/mkhive/registry.c
branches/ros-branch-0_3_1/reactos/tools/mkhive/rtl.c
branches/ros-branch-0_3_1/reactos/tools/widl/widl.mak
Modified: branches/ros-branch-0_3_1/reactos/Makefile
URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_1/reactos/Makefi…
==============================================================================
--- branches/ros-branch-0_3_1/reactos/Makefile (original)
+++ branches/ros-branch-0_3_1/reactos/Makefile Sat Sep 30 06:54:20 2006
@@ -152,11 +152,15 @@
ifeq ($(findstring msys,$(shell sh --version 2>nul)),msys)
export OSTYPE = msys
HOST=mingw32-linux
+CFLAGS+=-fshort-wchar
+CPPFLAGS+=-fshort-wchar
else
HOST=mingw32-windows
endif
else
HOST=mingw32-linux
+CFLAGS+=-fshort-wchar
+CPPFLAGS+=-fshort-wchar
endif
endif
Modified: branches/ros-branch-0_3_1/reactos/config.rbuild
URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_1/reactos/config…
==============================================================================
--- branches/ros-branch-0_3_1/reactos/config.rbuild (original)
+++ branches/ros-branch-0_3_1/reactos/config.rbuild Sat Sep 30 06:54:20 2006
@@ -44,14 +44,14 @@
<!--
Whether to compile in the integrated kernel debugger.
-->
-<property name="KDBG" value="0" />
+<property name="KDBG" value="1" />
<!--
Whether to compile for debugging. No compiler optimizations will be
performed.
-->
-<property name="DBG" value="0" />
+<property name="DBG" value="1" />
<!--
Modified: branches/ros-branch-0_3_1/reactos/tools/buildno/buildno.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_1/reactos/tools/…
==============================================================================
--- branches/ros-branch-0_3_1/reactos/tools/buildno/buildno.cpp (original)
+++ branches/ros-branch-0_3_1/reactos/tools/buildno/buildno.cpp Sat Sep 30 06:54:20 2006
@@ -38,6 +38,7 @@
static char * argv0 = "";
static char * filename = "";
+static char * kernel_version_build_type = 0;
#ifdef DBG
void
@@ -54,6 +55,15 @@
printf ("%s->tm_isdst = %d\n\n", tag, t->tm_isdst);
}
#endif
+
+int count_wide_string( wchar_t *str )
+{
+ int i;
+
+ for( i = 0; str[i]; i++ );
+
+ return i;
+}
void
write_h (int build, char *buildstr)
@@ -80,7 +90,7 @@
{
s = s + sprintf (s, ".%d", KERNEL_VERSION_PATCH_LEVEL);
}
- s = s + sprintf (s, "-%S\\0\"\n", KERNEL_VERSION_BUILD_TYPE);
+ s = s + sprintf (s, "-%s\\0\"\n", kernel_version_build_type);
s = s + sprintf (s, "#define KERNEL_RELEASE_STR\t\"%d.%d",
KERNEL_VERSION_MAJOR,
KERNEL_VERSION_MINOR);
@@ -88,7 +98,7 @@
{
s = s + sprintf (s, ".%d", KERNEL_VERSION_PATCH_LEVEL);
}
- s = s + sprintf (s, "-%S\"\n", KERNEL_VERSION_BUILD_TYPE);
+ s = s + sprintf (s, "-%s\"\n", kernel_version_build_type);
s = s + sprintf (s, "#define KERNEL_VERSION_RC\t\"%d.%d",
KERNEL_VERSION_MAJOR,
KERNEL_VERSION_MINOR);
@@ -96,7 +106,7 @@
{
s = s + sprintf (s, ".%d", KERNEL_VERSION_PATCH_LEVEL);
}
- s = s + sprintf (s, "-%S\\0\"\n", KERNEL_VERSION_BUILD_TYPE);
+ s = s + sprintf (s, "-%s\\0\"\n", kernel_version_build_type);
s = s + sprintf (s, "#define KERNEL_VERSION_STR\t\"%d.%d",
KERNEL_VERSION_MAJOR,
KERNEL_VERSION_MINOR);
@@ -104,7 +114,7 @@
{
s = s + sprintf (s, ".%d", KERNEL_VERSION_PATCH_LEVEL);
}
- s = s + sprintf (s, "-%S\"\n", KERNEL_VERSION_BUILD_TYPE);
+ s = s + sprintf (s, "-%s\"\n", kernel_version_build_type);
s = s + sprintf (s, "#define REACTOS_DLL_VERSION_MAJOR\t%d\n", dllversion);
s = s + sprintf (s, "#define REACTOS_DLL_RELEASE_RC\t\"%d.%d",
dllversion, KERNEL_VERSION_MINOR);
@@ -112,7 +122,7 @@
{
s = s + sprintf (s, ".%d", KERNEL_VERSION_PATCH_LEVEL);
}
- s = s + sprintf (s, "-%S\\0\"\n", KERNEL_VERSION_BUILD_TYPE);
+ s = s + sprintf (s, "-%s\\0\"\n", kernel_version_build_type);
s = s + sprintf (s, "#define REACTOS_DLL_RELEASE_STR\t\"%d.%d",
dllversion,
KERNEL_VERSION_MINOR);
@@ -120,7 +130,7 @@
{
s = s + sprintf (s, ".%d", KERNEL_VERSION_PATCH_LEVEL);
}
- s = s + sprintf (s, "-%S\"\n", KERNEL_VERSION_BUILD_TYPE);
+ s = s + sprintf (s, "-%s\"\n", kernel_version_build_type);
s = s + sprintf (s, "#define REACTOS_DLL_VERSION_RC\t\"%d.%d",
dllversion,
KERNEL_VERSION_MINOR);
@@ -128,7 +138,7 @@
{
s = s + sprintf (s, ".%d", KERNEL_VERSION_PATCH_LEVEL);
}
- s = s + sprintf (s, "-%S\\0\"\n", KERNEL_VERSION_BUILD_TYPE);
+ s = s + sprintf (s, "-%s\\0\"\n", kernel_version_build_type);
s = s + sprintf (s, "#define REACTOS_DLL_VERSION_STR\t\"%d.%d",
dllversion,
KERNEL_VERSION_MINOR);
@@ -136,7 +146,7 @@
{
s = s + sprintf (s, ".%d", KERNEL_VERSION_PATCH_LEVEL);
}
- s = s + sprintf (s, "-%S\"\n", KERNEL_VERSION_BUILD_TYPE);
+ s = s + sprintf (s, "-%s\"\n", kernel_version_build_type);
s = s + sprintf (s, "#endif\n/* EOF */\n");
h = fopen (filename, "wb");
@@ -284,6 +294,7 @@
int
main (int argc, char * argv [])
{
+ int i, length;
int print_only = FALSE;
int quiet = FALSE;
@@ -341,6 +352,14 @@
printf ( "\nReactOS Build Number Generator\n\n");
}
+ /* Convert kernel_version_build_type to a host-friendly string */
+ length = count_wide_string(KERNEL_VERSION_BUILD_TYPE);
+ kernel_version_build_type = (char *)malloc(length+1);
+ for( i = 0; KERNEL_VERSION_BUILD_TYPE[i]; i++ ) {
+ kernel_version_build_type[i] = KERNEL_VERSION_BUILD_TYPE[i];
+ }
+ kernel_version_build_type[i] = 0;
+
time (& t1); /* current build time */
t1_tm = gmtime (& t1);
@@ -378,7 +397,7 @@
{
printf(".%d", KERNEL_VERSION_PATCH_LEVEL);
}
- printf("-%S (Build %s)\n\n", KERNEL_VERSION_BUILD_TYPE, buildstr);
+ printf("-%s (Build %s)\n\n", kernel_version_build_type, buildstr);
}
/*
* (Over)write the include file, unless
Modified: branches/ros-branch-0_3_1/reactos/tools/mkhive/cmi.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_1/reactos/tools/…
==============================================================================
--- branches/ros-branch-0_3_1/reactos/tools/mkhive/cmi.c (original)
+++ branches/ros-branch-0_3_1/reactos/tools/mkhive/cmi.c Sat Sep 30 06:54:20 2006
@@ -31,7 +31,7 @@
IN SIZE_T Size,
IN BOOLEAN Paged)
{
- return malloc(Size);
+ return (PVOID) malloc(Size);
}
static VOID
Modified: branches/ros-branch-0_3_1/reactos/tools/mkhive/mkhive.mak
URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_1/reactos/tools/…
==============================================================================
--- branches/ros-branch-0_3_1/reactos/tools/mkhive/mkhive.mak (original)
+++ branches/ros-branch-0_3_1/reactos/tools/mkhive/mkhive.mak Sat Sep 30 06:54:20 2006
@@ -30,7 +30,7 @@
MKHIVE_OBJECTS = \
$(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_ \
-Iinclude/reactos -Iinclude/ddk -Iinclude/ndk -Iinclude/psdk -Iinclude -Iinclude/crt
-g3
Modified: branches/ros-branch-0_3_1/reactos/tools/mkhive/registry.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_1/reactos/tools/…
==============================================================================
--- branches/ros-branch-0_3_1/reactos/tools/mkhive/registry.c (original)
+++ branches/ros-branch-0_3_1/reactos/tools/mkhive/registry.c Sat Sep 30 06:54:20 2006
@@ -122,7 +122,7 @@
LocalKeyName = (PWSTR)KeyName;
for (;;)
{
- End = wcschr(LocalKeyName, '\\');
+ End = (PWSTR) xwcschr(LocalKeyName, '\\');
if (End)
{
KeyString.Buffer = LocalKeyName;
@@ -153,7 +153,7 @@
ParentKey->RegistryHive,
ParentKey->KeyCell,
&KeyString,
- 0,
+ OBJ_CASE_INSENSITIVE,
&SubKeyCell,
&BlockOffset);
if (AllowCreation && Status == STATUS_OBJECT_NAME_NOT_FOUND)
Modified: branches/ros-branch-0_3_1/reactos/tools/mkhive/rtl.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_1/reactos/tools/…
==============================================================================
--- branches/ros-branch-0_3_1/reactos/tools/mkhive/rtl.c (original)
+++ branches/ros-branch-0_3_1/reactos/tools/mkhive/rtl.c Sat Sep 30 06:54:20 2006
@@ -10,6 +10,24 @@
#define WIN32_NO_STATUS
#include <ntddk.h>
#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
@@ -54,7 +72,7 @@
if(SourceString)
{
- DestSize = wcslen(SourceString) * sizeof(WCHAR);
+ DestSize = xwcslen(SourceString) * sizeof(WCHAR);
DestinationString->Length = (USHORT)DestSize;
DestinationString->MaximumLength = (USHORT)DestSize + sizeof(WCHAR);
}
@@ -84,7 +102,7 @@
if (AllocateDestinationString)
{
UniDest->MaximumLength = (USHORT)Length + sizeof(WCHAR);
- UniDest->Buffer = malloc(UniDest->MaximumLength);
+ UniDest->Buffer = (PWSTR) malloc(UniDest->MaximumLength);
if (!UniDest->Buffer)
return STATUS_NO_MEMORY;
}
@@ -131,7 +149,7 @@
IN POOL_TYPE PoolType,
IN SIZE_T NumberOfBytes)
{
- return malloc(NumberOfBytes);
+ return (PVOID) malloc(NumberOfBytes);
}
VOID NTAPI
Modified: branches/ros-branch-0_3_1/reactos/tools/widl/widl.mak
URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_1/reactos/tools/…
==============================================================================
--- branches/ros-branch-0_3_1/reactos/tools/widl/widl.mak (original)
+++ branches/ros-branch-0_3_1/reactos/tools/widl/widl.mak Sat Sep 30 06:54:20 2006
@@ -55,7 +55,7 @@
$(addprefix $(INTERMEDIATE_), $(WIDL_SOURCES:.c=.o))
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) \
-Iinclude/reactos/wine -Iinclude/reactos -Iinclude -Iinclude/psdk