Author: hyperion
Date: Wed Oct 29 15:06:44 2008
New Revision: 37074
URL:
http://svn.reactos.org/svn/reactos?rev=37074&view=rev
Log:
Merging r37048, r37051, r37052, r37055 from the-real-msvc branch
Added:
trunk/reactos/drivers/bus/acpi/include/platform/acmsc.h
- copied unchanged from r37048,
branches/the-real-msvc/drivers/bus/acpi/include/platform/acmsc.h
Removed:
trunk/reactos/lib/3rdparty/mingw/strcasecmp.c
trunk/reactos/lib/3rdparty/mingw/strncasecmp.c
trunk/reactos/lib/3rdparty/mingw/wcscmpi.c
Modified:
trunk/reactos/base/system/smss/smss.h
trunk/reactos/drivers/bus/acpi/include/platform/acwin.h
trunk/reactos/lib/3rdparty/mingw/crt1.c
trunk/reactos/lib/3rdparty/mingw/mingw.rbuild
trunk/reactos/lib/rtl/debug.c
trunk/reactos/lib/rtl/res.c
trunk/reactos/lib/rtl/rtl.h
trunk/reactos/lib/sdk/crt/math/i386/ci.c
trunk/reactos/lib/sdk/crt/string/ctype.c
Modified: trunk/reactos/base/system/smss/smss.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/smss/smss.h?re…
==============================================================================
--- trunk/reactos/base/system/smss/smss.h [iso-8859-1] (original)
+++ trunk/reactos/base/system/smss/smss.h [iso-8859-1] Wed Oct 29 15:06:44 2008
@@ -2,6 +2,7 @@
#define _SMSS_H_INCLUDED_
#include <stdio.h>
+#include <stdlib.h>
#define WIN32_NO_STATUS
#include <windows.h>
#define NTOS_MODE_USER
Modified: trunk/reactos/drivers/bus/acpi/include/platform/acwin.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/include/p…
==============================================================================
--- trunk/reactos/drivers/bus/acpi/include/platform/acwin.h [iso-8859-1] (original)
+++ trunk/reactos/drivers/bus/acpi/include/platform/acwin.h [iso-8859-1] Wed Oct 29
15:06:44 2008
@@ -47,14 +47,25 @@
#endif
-/* ReactOS uses GCC */
+#if defined(__GNUC__)
#include "acgcc.h"
#undef disable
-#define disable() __asm__("cli\n\t");
+#define disable() __asm__("cli\n\t")
#undef enable
-#define enable() __asm__("sti\n\t");
+#define enable() __asm__("sti\n\t")
+
+#elif defined(_MSC_VER)
+
+#include "acmsc.h"
+
+#undef disable
+#define disable() __asm { cli }
+#undef enable
+#define enable() __asm { sti }
+
+#endif
#undef DEBUGGER_THREADING
#define DEBUGGER_THREADING DEBUGGER_SINGLE_THREADED
Modified: trunk/reactos/lib/3rdparty/mingw/crt1.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/3rdparty/mingw/crt1.c?…
==============================================================================
--- trunk/reactos/lib/3rdparty/mingw/crt1.c [iso-8859-1] (original)
+++ trunk/reactos/lib/3rdparty/mingw/crt1.c [iso-8859-1] Wed Oct 29 15:06:44 2008
@@ -220,6 +220,7 @@
_pei386_runtime_relocator ();
#endif
+#if defined(__GNUC__)
#if defined(__i386__)
/* Align the stack to 16 bytes for the sake of SSE ops in main
or in functions inlined into main. */
@@ -233,6 +234,17 @@
#else
#error Unsupported architecture
#endif
+#elif defined(_MSC_VER)
+#if defined(_M_IX86)
+ /* Align the stack to 16 bytes for the sake of SSE ops in main
+ or in functions inlined into main. */
+ __asm and esp, 0FFFFFFF0h
+#else
+#error TODO
+#endif
+#else
+#error TODO
+#endif
/*
* Call the main function. If the user does not supply one
Modified: trunk/reactos/lib/3rdparty/mingw/mingw.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/3rdparty/mingw/mingw.r…
==============================================================================
--- trunk/reactos/lib/3rdparty/mingw/mingw.rbuild [iso-8859-1] (original)
+++ trunk/reactos/lib/3rdparty/mingw/mingw.rbuild [iso-8859-1] Wed Oct 29 15:06:44 2008
@@ -13,10 +13,7 @@
<file>isascii.c</file>
<file>iscsym.c</file>
<file>iscsymf.c</file>
- <file>strcasecmp.c</file>
- <file>strncasecmp.c</file>
<file>toascii.c</file>
- <file>wcscmpi.c</file>
<file>_wgetopt.c</file>
<if property="ARCH" value="i386">
<file>pseudo-reloc.c</file>
Removed: trunk/reactos/lib/3rdparty/mingw/strcasecmp.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/3rdparty/mingw/strcase…
==============================================================================
--- trunk/reactos/lib/3rdparty/mingw/strcasecmp.c [iso-8859-1] (original)
+++ trunk/reactos/lib/3rdparty/mingw/strcasecmp.c (removed)
@@ -1,21 +1,0 @@
-/*
- * strcasecmp.c
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is a part of the mingw-runtime package.
- * No warranty is given; refer to the file DISCLAIMER within the package.
- *
- * Oldnames from ANSI header string.h
- *
- * Some wrapper functions for those old name functions whose appropriate
- * equivalents are not simply underscore prefixed.
- *
- */
-
-#include <string.h>
-
-int
-strcasecmp (const char *sz1, const char *sz2)
-{
- return _stricmp (sz1, sz2);
-}
-
Removed: trunk/reactos/lib/3rdparty/mingw/strncasecmp.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/3rdparty/mingw/strncas…
==============================================================================
--- trunk/reactos/lib/3rdparty/mingw/strncasecmp.c [iso-8859-1] (original)
+++ trunk/reactos/lib/3rdparty/mingw/strncasecmp.c (removed)
@@ -1,21 +1,0 @@
-/*
- * strncasecmp.c
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is a part of the mingw-runtime package.
- * No warranty is given; refer to the file DISCLAIMER within the package.
- *
- * Oldnames from ANSI header string.h
- *
- * Some wrapper functions for those old name functions whose appropriate
- * equivalents are not simply underscore prefixed.
- *
- */
-
-#include <string.h>
-
-int
-strncasecmp (const char *sz1, const char *sz2, size_t sizeMaxCompare)
-{
- return _strnicmp (sz1, sz2, sizeMaxCompare);
-}
-
Removed: trunk/reactos/lib/3rdparty/mingw/wcscmpi.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/3rdparty/mingw/wcscmpi…
==============================================================================
--- trunk/reactos/lib/3rdparty/mingw/wcscmpi.c [iso-8859-1] (original)
+++ trunk/reactos/lib/3rdparty/mingw/wcscmpi.c (removed)
@@ -1,21 +1,0 @@
-/*
- * wcscmpi.c
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is a part of the mingw-runtime package.
- * No warranty is given; refer to the file DISCLAIMER within the package.
- *
- * Oldnames from ANSI header string.h
- *
- * Some wrapper functions for those old name functions whose appropriate
- * equivalents are not simply underscore prefixed.
- *
- */
-
-#include <string.h>
-
-int
-wcscmpi (const wchar_t * ws1, const wchar_t * ws2)
-{
- return _wcsicmp (ws1, ws2);
-}
-
Modified: trunk/reactos/lib/rtl/debug.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/debug.c?rev=37074&…
==============================================================================
--- trunk/reactos/lib/rtl/debug.c [iso-8859-1] (original)
+++ trunk/reactos/lib/rtl/debug.c [iso-8859-1] Wed Oct 29 15:06:44 2008
@@ -79,7 +79,7 @@
/* Copy it */
strncpy(Buffer, Prefix, PrefixLength);
-
+
/* Do the printf */
Length = _vsnprintf(Buffer + PrefixLength,
sizeof(Buffer) - PrefixLength,
@@ -109,7 +109,7 @@
/* Add the prefix */
Length += PrefixLength;
}
-
+
/* Build the string */
DebugString.Length = Length;
DebugString.Buffer = Buffer;
@@ -202,17 +202,19 @@
DbgPrint(PCCH Format,
...)
{
+ ULONG n;
va_list ap;
/* Call the internal routine that also handles ControlC */
va_start(ap, Format);
- return vDbgPrintExWithPrefixInternal("",
+ n = vDbgPrintExWithPrefixInternal("",
-1,
DPFLTR_ERROR_LEVEL,
Format,
ap,
TRUE);
va_end(ap);
+ return n;
}
/*
@@ -225,17 +227,19 @@
IN PCCH Format,
...)
{
+ ULONG n;
va_list ap;
/* Call the internal routine that also handles ControlC */
va_start(ap, Format);
- return vDbgPrintExWithPrefixInternal("",
+ n = vDbgPrintExWithPrefixInternal("",
ComponentId,
Level,
Format,
ap,
TRUE);
va_end(ap);
+ return n;
}
/*
@@ -246,16 +250,19 @@
DbgPrintReturnControlC(PCH Format,
...)
{
+ ULONG n;
va_list ap;
/* Call the internal routine that also handles ControlC */
va_start(ap, Format);
- return vDbgPrintExWithPrefixInternal("",
+ n = vDbgPrintExWithPrefixInternal("",
-1,
DPFLTR_ERROR_LEVEL,
Format,
ap,
FALSE);
+ va_end(ap);
+ return n;
}
/*
Modified: trunk/reactos/lib/rtl/res.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/res.c?rev=37074&am…
==============================================================================
--- trunk/reactos/lib/rtl/res.c [iso-8859-1] (original)
+++ trunk/reactos/lib/rtl/res.c [iso-8859-1] Wed Oct 29 15:06:44 2008
@@ -60,7 +60,7 @@
*/
int push_language( USHORT *list, ULONG pos, WORD lang )
{
- int i;
+ ULONG i;
for (i = 0; i < pos; i++) if (list[i] == lang) return pos;
list[pos++] = lang;
return pos;
Modified: trunk/reactos/lib/rtl/rtl.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/rtl.h?rev=37074&am…
==============================================================================
--- trunk/reactos/lib/rtl/rtl.h [iso-8859-1] (original)
+++ trunk/reactos/lib/rtl/rtl.h [iso-8859-1] Wed Oct 29 15:06:44 2008
@@ -31,9 +31,7 @@
#include <reactos/helper.h>
#include <pseh/pseh.h>
-#ifndef _MSC_VER
#include <intrin.h>
-#endif
#endif /* RTL_H */
Modified: trunk/reactos/lib/sdk/crt/math/i386/ci.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/math/i386/ci.c…
==============================================================================
--- trunk/reactos/lib/sdk/crt/math/i386/ci.c [iso-8859-1] (original)
+++ trunk/reactos/lib/sdk/crt/math/i386/ci.c [iso-8859-1] Wed Oct 29 15:06:44 2008
@@ -1,11 +1,19 @@
#include <precomp.h>
#include <math.h>
+#if defined(__GNUC__)
#define FPU_DOUBLE(var) double var; \
__asm__ __volatile__( "fstpl %0;fwait" : "=m" (var) : )
#define FPU_DOUBLES(var1,var2) double var1,var2; \
__asm__ __volatile__( "fstpl %0;fwait" : "=m" (var2) : ); \
__asm__ __volatile__( "fstpl %0;fwait" : "=m" (var1) : )
+#elif defined(_MSC_VER)
+#define FPU_DOUBLE(var) double var; \
+ __asm { fstp [var] }; __asm { fwait };
+#define FPU_DOUBLES(var1,var2) double var1,var2; \
+ __asm { fstp [var1] }; __asm { fwait }; \
+ __asm { fstp [var2] }; __asm { fwait };
+#endif
/*
* @implemented
Modified: trunk/reactos/lib/sdk/crt/string/ctype.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/string/ctype.c…
==============================================================================
--- trunk/reactos/lib/sdk/crt/string/ctype.c [iso-8859-1] (original)
+++ trunk/reactos/lib/sdk/crt/string/ctype.c [iso-8859-1] Wed Oct 29 15:06:44 2008
@@ -591,7 +591,7 @@
/*
* @implemented
*/
-wchar_t towlower(wchar_t c)
+wint_t towlower(wint_t c)
{
if (iswctype (c, _UPPER))
return (c - upalpha);
@@ -601,7 +601,7 @@
/*
* @implemented
*/
-wchar_t towupper(wchar_t c)
+wint_t towupper(wint_t c)
{
if (iswctype (c, _LOWER))
return (c + upalpha);