Author: sginsberg
Date: Fri Aug 21 17:57:26 2009
New Revision: 42829
URL:
http://svn.reactos.org/svn/reactos?rev=42829&view=rev
Log:
- svchost: #ifdef _MSC_VER doesn't mean "using Microsoft's headers"
anymore
- ddraw, imm32, msxml3, oleaut32, riched20: Include typeof.h for typeof emulation when
compiling under MSVC and remove from ReactOS-generic.rbuild (this can't go to port.h
as the modules do not include it).
- TCPIP: Fix a check for MSVC.
- NDIS: Don't use floating point arithmetics in kernel mode -- spotted by MSVC trying
to link to ftol (gcc inlined the operation).
- SAMLIB: Use __VA_ARGS__ instead of gcc-specific macro manipulation.
- WIN32CSR: Don't use gcc-specific \% if you want % in the string -- this is incorrect
and will pass a broken string to swprintf (the code seems to be uncalled though, so this
shouldn't change anything). Use %% instead.
- Error out on MSVC implementation of logb -- it doesn't produce the same code as the
gcc version.
- Rename gcc's float.h to gcc_float.h and use #include instead of #include_next for
consistency.
- Remove leftover header guard from types.h
- Remove superfluous brackets from PSEH2->MSVC defines -- this isn't necessary
anymore after 41597
- Correction to 42216: MSVC *does* let you define types in a function, but only at the top
of scope. Move back the C_ASSERT into KiAcquireGuardedMutex.
- Simplify definition of alloca
- scripts.cpp: Silence unavoidable warning.
- Remove compile time warning from Uniata -- the code has been unused for 1 1/2 years and
will probably remain so.
Added:
trunk/reactos/include/crt/mingw32/gcc_float.h
- copied unchanged from r42808, trunk/reactos/include/crt/mingw32/float.h
Removed:
trunk/reactos/include/crt/mingw32/float.h
Modified:
trunk/reactos/ReactOS-generic.rbuild
trunk/reactos/base/services/svchost/svchost.h
trunk/reactos/dll/directx/wine/ddraw/ddraw.rbuild
trunk/reactos/dll/win32/imm32/imm32.rbuild
trunk/reactos/dll/win32/msxml3/msxml3.rbuild
trunk/reactos/dll/win32/oleaut32/oleaut32.rbuild
trunk/reactos/dll/win32/riched20/riched20.rbuild
trunk/reactos/dll/win32/samlib/debug.h
trunk/reactos/drivers/network/ndis/ndis/config.c
trunk/reactos/drivers/network/tcpip/tcpip/dispatch.c
trunk/reactos/drivers/storage/ide/uniata/id_sata.cpp
trunk/reactos/include/crt/float.h
trunk/reactos/include/crt/malloc.h
trunk/reactos/include/crt/sys/types.h
trunk/reactos/include/reactos/libs/pseh/pseh2.h
trunk/reactos/lib/nls/scripts/scripts.cpp
trunk/reactos/lib/sdk/crt/float/i386/logb.c
trunk/reactos/ntoskrnl/ke/wait.c
trunk/reactos/subsystems/win32/csrss/win32csr/guiconsole.c
Modified: trunk/reactos/ReactOS-generic.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ReactOS-generic.rbuild?rev…
==============================================================================
--- trunk/reactos/ReactOS-generic.rbuild [iso-8859-1] (original)
+++ trunk/reactos/ReactOS-generic.rbuild [iso-8859-1] Fri Aug 21 17:57:26 2009
@@ -100,7 +100,6 @@
<compilerflag>/Zl</compilerflag>
<compilerflag>/Zi</compilerflag>
<compilerflag>/W1</compilerflag>
- <compilerflag>/FIwine/typeof.h</compilerflag>
</group>
<group compilerset="gcc">
Modified: trunk/reactos/base/services/svchost/svchost.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/services/svchost/svch…
==============================================================================
--- trunk/reactos/base/services/svchost/svchost.h [iso-8859-1] (original)
+++ trunk/reactos/base/services/svchost/svchost.h [iso-8859-1] Fri Aug 21 17:57:26 2009
@@ -10,7 +10,7 @@
/* INCLUDES ******************************************************************/
-#ifdef _MSC_VER
+#if 0
#define _CRT_SECURE_NO_DEPRECATE 1
#endif
Modified: trunk/reactos/dll/directx/wine/ddraw/ddraw.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/ddraw/ddr…
==============================================================================
--- trunk/reactos/dll/directx/wine/ddraw/ddraw.rbuild [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/wine/ddraw/ddraw.rbuild [iso-8859-1] Fri Aug 21 17:57:26
2009
@@ -7,6 +7,7 @@
<include base="ReactOS">include/reactos/wine</include>
<define name="__WINESRC__" />
<define name="USE_WIN32_OPENGL" />
+ <compilerflag compilerset="msc">/FIwine/typeof.h</compilerflag>
<library>advapi32</library>
<library>dxguid</library>
Modified: trunk/reactos/dll/win32/imm32/imm32.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/imm32/imm32.rbui…
==============================================================================
--- trunk/reactos/dll/win32/imm32/imm32.rbuild [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/imm32/imm32.rbuild [iso-8859-1] Fri Aug 21 17:57:26 2009
@@ -7,6 +7,7 @@
<include base="ReactOS">include/reactos/wine</include>
<define name="__WINESRC__" />
<redefine name="_WIN32_WINNT">0x600</redefine>
+ <compilerflag compilerset="msc">/FIwine/typeof.h</compilerflag>
<file>imm.c</file>
<file>version.rc</file>
<library>wine</library>
Modified: trunk/reactos/dll/win32/msxml3/msxml3.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/msxml3.rb…
==============================================================================
--- trunk/reactos/dll/win32/msxml3/msxml3.rbuild [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msxml3/msxml3.rbuild [iso-8859-1] Fri Aug 21 17:57:26 2009
@@ -10,6 +10,7 @@
<define name="_WINE" />
<redefine name="_WIN32_WINNT">0x601</redefine>
<define name="LIBXML_STATIC" />
+ <compilerflag compilerset="msc">/FIwine/typeof.h</compilerflag>
<library>libxml2</library>
<library>libxslt</library>
<library>wine</library>
Modified: trunk/reactos/dll/win32/oleaut32/oleaut32.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/oleaut32/oleaut3…
==============================================================================
--- trunk/reactos/dll/win32/oleaut32/oleaut32.rbuild [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/oleaut32/oleaut32.rbuild [iso-8859-1] Fri Aug 21 17:57:26
2009
@@ -15,6 +15,7 @@
<define name="PROXY_DELEGATION"/>
<define name="REGISTER_PROXY_DLL"/>
<define name="ENTRY_PREFIX">OLEAUTPS_</define>
+ <compilerflag compilerset="msc">/FIwine/typeof.h</compilerflag>
<file>connpt.c</file>
<file>dispatch.c</file>
<file>hash.c</file>
Modified: trunk/reactos/dll/win32/riched20/riched20.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/riched20/riched2…
==============================================================================
--- trunk/reactos/dll/win32/riched20/riched20.rbuild [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/riched20/riched20.rbuild [iso-8859-1] Fri Aug 21 17:57:26
2009
@@ -6,6 +6,7 @@
<include base="riched20">.</include>
<include base="ReactOS">include/reactos/wine</include>
<define name="__WINESRC__" />
+ <compilerflag compilerset="msc">/FIwine/typeof.h</compilerflag>
<linkerflag linkerset="ld">-enable-stdcall-fixup</linkerflag>
<file>caret.c</file>
<file>clipboard.c</file>
Modified: trunk/reactos/dll/win32/samlib/debug.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/samlib/debug.h?r…
==============================================================================
--- trunk/reactos/dll/win32/samlib/debug.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/samlib/debug.h [iso-8859-1] Fri Aug 21 17:57:26 2009
@@ -1,12 +1,12 @@
#ifdef NDEBUG
-#define DPRINT(args...)
+#define DPRINT(...)
#define CHECKPOINT
#else
-#define DPRINT(args...) do { DebugPrint("(SAMLIB:%s:%d) ",__FILE__,__LINE__);
DebugPrint(args); } while(0)
+#define DPRINT(...) do { DebugPrint("(SAMLIB:%s:%d) ",__FILE__,__LINE__);
DebugPrint(__VA_ARGS__); } while(0)
#define CHECKPOINT do { DebugPrint("(SAMLIB:%s:%d)
Checkpoint\n",__FILE__,__LINE__); } while(0)
#endif
-#define DPRINT1(args...) do { DebugPrint("(SAMLIB:%s:%d) ",__FILE__,__LINE__);
DebugPrint(args); } while(0)
+#define DPRINT1(...) do { DebugPrint("(SAMLIB:%s:%d) ",__FILE__,__LINE__);
DebugPrint(__VA_ARGS__); } while(0)
#define CHECKPOINT1 do { DebugPrint("(SAMLIB:%s:%d)
Checkpoint\n",__FILE__,__LINE__); } while(0)
Modified: trunk/reactos/drivers/network/ndis/ndis/config.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/ndis/ndis/…
==============================================================================
--- trunk/reactos/drivers/network/ndis/ndis/config.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/ndis/ndis/config.c [iso-8859-1] Fri Aug 21 17:57:26
2009
@@ -705,7 +705,14 @@
while (j < str.Length && str.Buffer[j] != '\0') j++;
- *NetworkAddressLength = (UINT)((j/2)+0.5);
+ if ((j % 2) == 0)
+ {
+ *NetworkAddressLength = (UINT)(j/2);
+ }
+ else
+ {
+ *NetworkAddressLength = (UINT)((j/2)+1);
+ }
if ((*NetworkAddressLength) == 0)
{
Modified: trunk/reactos/drivers/network/tcpip/tcpip/dispatch.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/tcpip/tcpi…
==============================================================================
--- trunk/reactos/drivers/network/tcpip/tcpip/dispatch.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/tcpip/tcpip/dispatch.c [iso-8859-1] Fri Aug 21 17:57:26
2009
@@ -1058,7 +1058,7 @@
("About to call send routine %x\n",
(*((PADDRESS_FILE)Request.Handle.AddressHandle)->Send)));
- if( (*((PADDRESS_FILE)Request.Handle.AddressHandle)->Send) )
+ if( (*((PADDRESS_FILE)Request.Handle.AddressHandle)->Send != NULL) )
Status = (*((PADDRESS_FILE)Request.Handle.AddressHandle)->Send)(
Request.Handle.AddressHandle,
DgramInfo->SendDatagramInformation,
Modified: trunk/reactos/drivers/storage/ide/uniata/id_sata.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/ide/uniata…
==============================================================================
--- trunk/reactos/drivers/storage/ide/uniata/id_sata.cpp [iso-8859-1] (original)
+++ trunk/reactos/drivers/storage/ide/uniata/id_sata.cpp [iso-8859-1] Fri Aug 21 17:57:26
2009
@@ -426,9 +426,8 @@
i++;
} else {
#ifdef _MSC_VER
-#pragma message ("HACK HACK HACK Disabling warning HACK HACK HACK")
#pragma warning(push)
-#pragma warning(disable:4333)
+#pragma warning(disable:4333) // right shift by too large amount, data loss
#endif
fis[7] |= (plba[3] >> 24) & 0x0f;
#ifdef _MSC_VER
Modified: trunk/reactos/include/crt/float.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/float.h?rev=42…
==============================================================================
--- trunk/reactos/include/crt/float.h [iso-8859-1] (original)
+++ trunk/reactos/include/crt/float.h [iso-8859-1] Fri Aug 21 17:57:26 2009
@@ -16,12 +16,12 @@
*
*/
-#ifdef __GNUC__
-#include_next<float.h>
-#endif
-
-#ifdef _MSC_VER
+#if defined(__GNUC__)
+#include <gcc_float.h>
+#elif defined(_MSC_VER)
#include <msc_float.h>
+#else
+#error
#endif
#ifndef _MINGW_FLOAT_H_
Modified: trunk/reactos/include/crt/malloc.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/malloc.h?rev=4…
==============================================================================
--- trunk/reactos/include/crt/malloc.h [iso-8859-1] (original)
+++ trunk/reactos/include/crt/malloc.h [iso-8859-1] Fri Aug 21 17:57:26 2009
@@ -146,12 +146,7 @@
#endif /* RC_INVOKED */
#ifndef NO_OLDNAMES
-#undef alloca
-#ifdef __GNUC__
-#define alloca(x) __builtin_alloca((x))
-#else
#define alloca _alloca
-#endif
#endif
#ifdef HEAPHOOK
Removed: trunk/reactos/include/crt/mingw32/float.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/mingw32/float.…
==============================================================================
--- trunk/reactos/include/crt/mingw32/float.h [iso-8859-1] (original)
+++ trunk/reactos/include/crt/mingw32/float.h (removed)
@@ -1,162 +1,0 @@
-/* Copyright (C) 2002 Free Software Foundation, Inc.
-
-This file is part of GCC.
-
-GCC is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-GCC is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GCC; see the file COPYING. If not, write to
-the Free Software Foundation, 51 Franklin Street, Fifth Floor,
-Boston, MA 02110-1301, USA. */
-
-/* As a special exception, if you include this header file into source
- files compiled by GCC, this header file does not by itself cause
- the resulting executable to be covered by the GNU General Public
- License. This exception does not however invalidate any other
- reasons why the executable file might be covered by the GNU General
- Public License. */
-
-/*
- * ISO C Standard: 5.2.4.2.2 Characteristics of floating types <float.h>
- */
-
-#ifndef _FLOAT_H___
-#define _FLOAT_H___
-
-/* Radix of exponent representation, b. */
-#undef FLT_RADIX
-#define FLT_RADIX __FLT_RADIX__
-
-/* Number of base-FLT_RADIX digits in the significand, p. */
-#undef FLT_MANT_DIG
-#undef DBL_MANT_DIG
-#undef LDBL_MANT_DIG
-#define FLT_MANT_DIG __FLT_MANT_DIG__
-#define DBL_MANT_DIG __DBL_MANT_DIG__
-#define LDBL_MANT_DIG __LDBL_MANT_DIG__
-
-/* Number of decimal digits, q, such that any floating-point number with q
- decimal digits can be rounded into a floating-point number with p radix b
- digits and back again without change to the q decimal digits,
-
- p * log10(b) if b is a power of 10
- floor((p - 1) * log10(b)) otherwise
-*/
-#undef FLT_DIG
-#undef DBL_DIG
-#undef LDBL_DIG
-#define FLT_DIG __FLT_DIG__
-#define DBL_DIG __DBL_DIG__
-#define LDBL_DIG __LDBL_DIG__
-
-/* Minimum int x such that FLT_RADIX**(x-1) is a normalized float, emin */
-#undef FLT_MIN_EXP
-#undef DBL_MIN_EXP
-#undef LDBL_MIN_EXP
-#define FLT_MIN_EXP __FLT_MIN_EXP__
-#define DBL_MIN_EXP __DBL_MIN_EXP__
-#define LDBL_MIN_EXP __LDBL_MIN_EXP__
-
-/* Minimum negative integer such that 10 raised to that power is in the
- range of normalized floating-point numbers,
-
- ceil(log10(b) * (emin - 1))
-*/
-#undef FLT_MIN_10_EXP
-#undef DBL_MIN_10_EXP
-#undef LDBL_MIN_10_EXP
-#define FLT_MIN_10_EXP __FLT_MIN_10_EXP__
-#define DBL_MIN_10_EXP __DBL_MIN_10_EXP__
-#define LDBL_MIN_10_EXP __LDBL_MIN_10_EXP__
-
-/* Maximum int x such that FLT_RADIX**(x-1) is a representable float, emax. */
-#undef FLT_MAX_EXP
-#undef DBL_MAX_EXP
-#undef LDBL_MAX_EXP
-#define FLT_MAX_EXP __FLT_MAX_EXP__
-#define DBL_MAX_EXP __DBL_MAX_EXP__
-#define LDBL_MAX_EXP __LDBL_MAX_EXP__
-
-/* Maximum integer such that 10 raised to that power is in the range of
- representable finite floating-point numbers,
-
- floor(log10((1 - b**-p) * b**emax))
-*/
-#undef FLT_MAX_10_EXP
-#undef DBL_MAX_10_EXP
-#undef LDBL_MAX_10_EXP
-#define FLT_MAX_10_EXP __FLT_MAX_10_EXP__
-#define DBL_MAX_10_EXP __DBL_MAX_10_EXP__
-#define LDBL_MAX_10_EXP __LDBL_MAX_10_EXP__
-
-/* Maximum representable finite floating-point number,
-
- (1 - b**-p) * b**emax
-*/
-#undef FLT_MAX
-#undef DBL_MAX
-#undef LDBL_MAX
-#define FLT_MAX __FLT_MAX__
-#define DBL_MAX __DBL_MAX__
-#define LDBL_MAX __LDBL_MAX__
-
-/* The difference between 1 and the least value greater than 1 that is
- representable in the given floating point type, b**1-p. */
-#undef FLT_EPSILON
-#undef DBL_EPSILON
-#undef LDBL_EPSILON
-#define FLT_EPSILON __FLT_EPSILON__
-#define DBL_EPSILON __DBL_EPSILON__
-#define LDBL_EPSILON __LDBL_EPSILON__
-
-/* Minimum normalized positive floating-point number, b**(emin - 1). */
-#undef FLT_MIN
-#undef DBL_MIN
-#undef LDBL_MIN
-#define FLT_MIN __FLT_MIN__
-#define DBL_MIN __DBL_MIN__
-#define LDBL_MIN __LDBL_MIN__
-
-/* Addition rounds to 0: zero, 1: nearest, 2: +inf, 3: -inf, -1: unknown. */
-/* ??? This is supposed to change with calls to fesetround in <fenv.h>. */
-#undef FLT_ROUNDS
-#define FLT_ROUNDS 1
-
-#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
-/* The floating-point expression evaluation method.
- -1 indeterminate
- 0 evaluate all operations and constants just to the range and
- precision of the type
- 1 evaluate operations and constants of type float and double
- to the range and precision of the double type, evaluate
- long double operations and constants to the range and
- precision of the long double type
- 2 evaluate all operations and constants to the range and
- precision of the long double type
-
- ??? This ought to change with the setting of the fp control word;
- the value provided by the compiler assumes the widest setting. */
-#undef FLT_EVAL_METHOD
-#define FLT_EVAL_METHOD __FLT_EVAL_METHOD__
-
-/* Number of decimal digits, n, such that any floating-point number in the
- widest supported floating type with pmax radix b digits can be rounded
- to a floating-point number with n decimal digits and back again without
- change to the value,
-
- pmax * log10(b) if b is a power of 10
- ceil(1 + pmax * log10(b)) otherwise
-*/
-#undef DECIMAL_DIG
-#define DECIMAL_DIG __DECIMAL_DIG__
-
-#endif /* C99 */
-#endif /* _FLOAT_H___ */
Modified: trunk/reactos/include/crt/sys/types.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/sys/types.h?re…
==============================================================================
--- trunk/reactos/include/crt/sys/types.h [iso-8859-1] (original)
+++ trunk/reactos/include/crt/sys/types.h [iso-8859-1] Fri Aug 21 17:57:26 2009
@@ -36,9 +36,7 @@
# endif
#endif
-#ifdef _WINE
-#ifndef _PID_T_
-#define _PID_T_
+#if defined(_WINE)
#ifndef _WIN64
typedef int _pid_t;
#else
@@ -50,7 +48,6 @@
typedef _pid_t pid_t;
#endif /* __pid_t_defined */
#endif
-#endif /* Not _PID_T_ */
#endif
#endif /* !_INC_TYPES */
Modified: trunk/reactos/include/reactos/libs/pseh/pseh2.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/libs/pseh/…
==============================================================================
--- trunk/reactos/include/reactos/libs/pseh/pseh2.h [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/libs/pseh/pseh2.h [iso-8859-1] Fri Aug 21 17:57:26 2009
@@ -370,10 +370,10 @@
#include <excpt.h>
-#define _SEH2_TRY __try {
-#define _SEH2_FINALLY } __finally {
-#define _SEH2_EXCEPT(...) } __except(__VA_ARGS__) {
-#define _SEH2_END }
+#define _SEH2_TRY __try
+#define _SEH2_FINALLY __finally
+#define _SEH2_EXCEPT(...) __except(__VA_ARGS__)
+#define _SEH2_END
#define _SEH2_GetExceptionInformation() (GetExceptionInformation())
#define _SEH2_GetExceptionCode() (GetExceptionCode())
Modified: trunk/reactos/lib/nls/scripts/scripts.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/nls/scripts/scripts.cp…
==============================================================================
--- trunk/reactos/lib/nls/scripts/scripts.cpp [iso-8859-1] (original)
+++ trunk/reactos/lib/nls/scripts/scripts.cpp [iso-8859-1] Fri Aug 21 17:57:26 2009
@@ -45,6 +45,11 @@
#include "scripts.h"
+#ifdef _MSC_VER
+#pragma warning(push)
+#pragma warning(disable:4351) // elements of array 'array' will be default
initialized
+#endif
+
struct SCRIPTS_ScriptsSet
{
private:
@@ -144,6 +149,10 @@
return retval;
}
};
+
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
int
WINAPI
Modified: trunk/reactos/lib/sdk/crt/float/i386/logb.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/float/i386/log…
==============================================================================
--- trunk/reactos/lib/sdk/crt/float/i386/logb.c [iso-8859-1] (original)
+++ trunk/reactos/lib/sdk/crt/float/i386/logb.c [iso-8859-1] Fri Aug 21 17:57:26 2009
@@ -29,6 +29,7 @@
("fxtract\n\t"
: "=t" (__junk), "=u" (__val) : "0" (__x));
#else
+#error REVIEW ME
__asm fld [__x];
__asm fxtract;
__asm fstp st(0);
Modified: trunk/reactos/ntoskrnl/ke/wait.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/wait.c?rev=428…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/wait.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ke/wait.c [iso-8859-1] Fri Aug 21 17:57:26 2009
@@ -117,15 +117,15 @@
NULL);
}
-/* KiAcquireGuardedMutex depends on these bits being right */
-C_ASSERT((GM_LOCK_WAITER_WOKEN * 2) == GM_LOCK_WAITER_INC);
-
VOID
FASTCALL
KiAcquireGuardedMutex(IN OUT PKGUARDED_MUTEX GuardedMutex)
{
ULONG BitsToRemove, BitsToAdd;
LONG OldValue, NewValue;
+
+ /* We depend on these bits being just right */
+ C_ASSERT((GM_LOCK_WAITER_WOKEN * 2) == GM_LOCK_WAITER_INC);
/* Increase the contention count */
GuardedMutex->Contention++;
Modified: trunk/reactos/subsystems/win32/csrss/win32csr/guiconsole.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/win…
==============================================================================
--- trunk/reactos/subsystems/win32/csrss/win32csr/guiconsole.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/csrss/win32csr/guiconsole.c [iso-8859-1] Fri Aug 21
17:57:26 2009
@@ -375,11 +375,11 @@
while((ptr = wcschr(szProcessName, L'\\')))
ptr[0] = L'_';
- swprintf(szBuffer, L"Console\\\%SystemRoot\%%S",
&szProcessName[wLength]);
+ swprintf(szBuffer, L"Console\\%%SystemRoot%%%S",
&szProcessName[wLength]);
DPRINT("#3 Path : %S\n", szBuffer);
if (RegOpenKeyExW(hKey, szBuffer, 0, samDesired, hSubKey) == ERROR_SUCCESS)
{
- swprintf(GuiData->szProcessName, L"\%SystemRoot\%%S",
&szProcessName[wLength]);
+ swprintf(GuiData->szProcessName, L"%%SystemRoot%%%S",
&szProcessName[wLength]);
RegCloseKey(hKey);
return TRUE;
}