Author: akhaldi
Date: Fri May 13 17:16:08 2011
New Revision: 51702
URL:
http://svn.reactos.org/svn/reactos?rev=51702&view=rev
Log:
* Reduce difference to the cmake branch, MSVC fixes.
Modified:
trunk/reactos/base/applications/cmdutils/doskey/doskey.c
trunk/reactos/base/applications/sndrec32/sndrec32.cpp
trunk/reactos/boot/freeldr/freeldr/freeldr.c
trunk/reactos/dll/win32/glu32/libutil/mipmap.c
trunk/reactos/dll/win32/riched20/txtsrv.c
trunk/reactos/dll/win32/shell32/shelllink.c
trunk/reactos/drivers/base/nmidebug/nmidebug.c
trunk/reactos/drivers/bus/acpi/osl.c
trunk/reactos/drivers/usb/usbehci/pdo.c
trunk/reactos/lib/drivers/oskittcp/oskittcp/defaults.c
trunk/reactos/lib/drivers/oskittcp/oskittcp/interface.c
Modified: trunk/reactos/base/applications/cmdutils/doskey/doskey.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
==============================================================================
--- trunk/reactos/base/applications/cmdutils/doskey/doskey.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/cmdutils/doskey/doskey.c [iso-8859-1] Fri May 13
17:16:08 2011
@@ -10,7 +10,7 @@
LPWSTR pszExeName = L"cmd.exe";
/* Function pointers */
-typedef DWORD (WINAPI *GetConsoleCommandHistoryW_t) (LPWSTR sCommands, DWORD
nBufferLength, LPWSTR sExeName);
+typedef DWORD (WINAPI *GetConsoleCommandHistoryW_t) (LPWSTR sCommands, DWORD
nBufferLength, LPWSTR sExeName);
typedef DWORD (WINAPI *GetConsoleCommandHistoryLengthW_t) (LPWSTR sExeName);
typedef BOOL (WINAPI *SetConsoleNumberOfCommandsW_t)(DWORD nNumber, LPWSTR sExeName);
typedef VOID (WINAPI *ExpungeConsoleCommandHistoryW_t)(LPWSTR sExeName);
@@ -142,7 +142,7 @@
return;
}
- while ( fgetws(line, MAX_PATH, fp) != NULL)
+ while ( fgetws(line, MAX_PATH, fp) != NULL)
{
/* Remove newline character */
WCHAR *end = &line[wcslen(line) - 1];
@@ -191,13 +191,16 @@
int
wmain(VOID)
{
- setlocale(LC_ALL, "");
+ WCHAR *pArgStart;
+ WCHAR *pArgEnd;
+ HMODULE hKernel32;
+
+ setlocale(LC_ALL, "");
/* Get the full command line using GetCommandLine(). We can't just use argv,
* because then a parameter like "gotoroot=cd \" wouldn't be passed
completely. */
- WCHAR *pArgStart;
- WCHAR *pArgEnd = GetCommandLine();
- HMODULE hKernel32 = LoadLibraryW(L"kernel32.dll");
+ pArgEnd = GetCommandLine();
+ hKernel32 = LoadLibraryW(L"kernel32.dll");
/* Get function pointers */
pGetConsoleCommandHistoryW = (GetConsoleCommandHistoryW_t)GetProcAddress( hKernel32,
"GetConsoleCommandHistoryW");
Modified: trunk/reactos/base/applications/sndrec32/sndrec32.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/sndrec32…
==============================================================================
--- trunk/reactos/base/applications/sndrec32/sndrec32.cpp [iso-8859-1] (original)
+++ trunk/reactos/base/applications/sndrec32/sndrec32.cpp [iso-8859-1] Fri May 13 17:16:08
2011
@@ -462,7 +462,7 @@
x = ( i * samples ) / WAVEBAR_CX;
- line_h = ( abs(AUD_OUT->nsample( x )) * max_h ) /
AUD_OUT->samplevalue_max();
+ line_h = ( AUD_OUT->nsample( x ) * max_h ) /
AUD_OUT->samplevalue_max();
if ( line_h )
Modified: trunk/reactos/boot/freeldr/freeldr/freeldr.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/freel…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/freeldr.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/freeldr.c [iso-8859-1] Fri May 13 17:16:08 2011
@@ -54,6 +54,17 @@
RunLoader();
}
+#ifdef _MSC_VER
+long _ftol2(double f)
+{
+ return _ftol(f);
+}
+long _ftol2_sse(double f)
+{
+ return _ftol(f);
+}
+#endif
+
// We need to emulate these, because the original ones don't work in freeldr
int __cdecl wctomb(char *mbchar, wchar_t wchar)
{
Modified: trunk/reactos/dll/win32/glu32/libutil/mipmap.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/glu32/libutil/mi…
==============================================================================
--- trunk/reactos/dll/win32/glu32/libutil/mipmap.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/glu32/libutil/mipmap.c [iso-8859-1] Fri May 13 17:16:08 2011
@@ -6577,7 +6577,7 @@
* Contributed by Gerk Huisma <gerk(a)five-d.demon.nl>nl>.
*/
-typedef WINAPI void (GLAPIENTRY *TexImage3Dproc)( GLenum target, GLint level,
+typedef void (GLAPIENTRY *TexImage3Dproc)( GLenum target, GLint level,
GLenum internalFormat,
GLsizei width, GLsizei height,
GLsizei depth, GLint border,
Modified: trunk/reactos/dll/win32/riched20/txtsrv.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/riched20/txtsrv.…
==============================================================================
--- trunk/reactos/dll/win32/riched20/txtsrv.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/riched20/txtsrv.c [iso-8859-1] Fri May 13 17:16:08 2011
@@ -88,7 +88,10 @@
ITextImpl->lpVtbl = &textservices_Vtbl;
ITextImpl->editor = ME_MakeEditor(pITextHost, FALSE);
ITextImpl->editor->exStyleFlags = 0;
- ITextImpl->editor->rcFormat = (RECT){0,0,0,0};
+ ITextImpl->editor->rcFormat.left = 0;
+ ITextImpl->editor->rcFormat.top = 0;
+ ITextImpl->editor->rcFormat.right = 0;
+ ITextImpl->editor->rcFormat.bottom = 0;
ME_HandleMessage(ITextImpl->editor, WM_CREATE, 0, 0, TRUE, &hres);
if (pUnkOuter)
Modified: trunk/reactos/dll/win32/shell32/shelllink.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shelllin…
==============================================================================
--- trunk/reactos/dll/win32/shell32/shelllink.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/shelllink.c [iso-8859-1] Fri May 13 17:16:08 2011
@@ -187,9 +187,13 @@
/* strdup on the process heap */
static LPWSTR __inline HEAP_strdupAtoW( HANDLE heap, DWORD flags, LPCSTR str)
{
+ INT len;
+ LPWSTR p;
+
assert(str);
- INT len = MultiByteToWideChar( CP_ACP, 0, str, -1, NULL, 0 );
- LPWSTR p = HeapAlloc( heap, flags, len*sizeof (WCHAR) );
+
+ len = MultiByteToWideChar( CP_ACP, 0, str, -1, NULL, 0 );
+ p = HeapAlloc( heap, flags, len*sizeof (WCHAR) );
if( !p )
return p;
MultiByteToWideChar( CP_ACP, 0, str, -1, p, len );
Modified: trunk/reactos/drivers/base/nmidebug/nmidebug.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/base/nmidebug/nmid…
==============================================================================
--- trunk/reactos/drivers/base/nmidebug/nmidebug.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/base/nmidebug/nmidebug.c [iso-8859-1] Fri May 13 17:16:08 2011
@@ -21,7 +21,14 @@
{
((PCHAR)&KiBugCheckData[4])[0] -= (NmiBegin[3] | NmiBegin[7]);
((PCHAR)&KiBugCheckData[4])[3] |= 1;
+#ifdef _MSC_VER
+ __asm
+ {
+ rcr KiBugCheckData[4], 8
+ }
+#else
__asm__("rcrl %b[shift], %k[retval]" : [retval] "=rm"
(KiBugCheckData[4]) : "[retval]" (KiBugCheckData[4]), [shift] "Nc"
(8));
+#endif
}
BOOLEAN
Modified: trunk/reactos/drivers/bus/acpi/osl.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/osl.c?rev…
==============================================================================
--- trunk/reactos/drivers/bus/acpi/osl.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/bus/acpi/osl.c [iso-8859-1] Fri May 13 17:16:08 2011
@@ -67,6 +67,8 @@
ACPI_STATUS
AcpiOsInitialize (void)
{
+ UINT32 i;
+
DPRINT("AcpiOsInitialize called\n");
#ifndef NDEBUG
@@ -74,8 +76,6 @@
AcpiDbgLevel = 0x00FFFFFF;
AcpiDbgLayer = 0xFFFFFFFF;
#endif
-
- UINT32 i;
for (i = 0; i < NUM_SEMAPHORES; i++)
{
@@ -209,10 +209,11 @@
AcpiOsAcquireObject (
ACPI_CACHE_T *Cache)
{
+ void* ptr;
PNPAGED_LOOKASIDE_LIST List = (PNPAGED_LOOKASIDE_LIST)Cache;
+
DPRINT("AcpiOsAcquireObject from %p\n", Cache);
- void* ptr =
- ExAllocateFromNPagedLookasideList(List);
+ ptr = ExAllocateFromNPagedLookasideList(List);
ASSERT(ptr);
RtlZeroMemory(ptr,List->L.Size);
@@ -692,8 +693,10 @@
UINT64
AcpiOsGetTimer (void)
{
+ LARGE_INTEGER Timer;
+
DPRINT("AcpiOsGetTimer\n");
- LARGE_INTEGER Timer;
+
KeQueryTickCount(&Timer);
return Timer.QuadPart;
@@ -758,9 +761,10 @@
AcpiOsGetRootPointer (
void)
{
+ ACPI_PHYSICAL_ADDRESS pa = 0;
+
DPRINT("AcpiOsGetRootPointer\n");
- ACPI_PHYSICAL_ADDRESS pa = 0;
-
+
AcpiFindRootPointer(&pa);
return pa;
}
Modified: trunk/reactos/drivers/usb/usbehci/pdo.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/usbehci/pdo.c?…
==============================================================================
--- trunk/reactos/drivers/usb/usbehci/pdo.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/usb/usbehci/pdo.c [iso-8859-1] Fri May 13 17:16:08 2011
@@ -368,6 +368,8 @@
PIO_STACK_LOCATION Stack;
ULONG_PTR Information = Irp->IoStatus.Information;
NTSTATUS Status = Irp->IoStatus.Status;
+ PDEVICE_CAPABILITIES DeviceCapabilities;
+ ULONG i;
Stack = IoGetCurrentIrpStackLocation(Irp);
MinorFunction = Stack->MinorFunction;
@@ -513,8 +515,6 @@
case IRP_MN_QUERY_CAPABILITIES:
{
DPRINT("Ehci: PDO Query Capabilities\n");
- PDEVICE_CAPABILITIES DeviceCapabilities;
- ULONG i;
DeviceCapabilities =
(PDEVICE_CAPABILITIES)Stack->Parameters.DeviceCapabilities.Capabilities;
Modified: trunk/reactos/lib/drivers/oskittcp/oskittcp/defaults.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/oskittcp/oskit…
==============================================================================
--- trunk/reactos/lib/drivers/oskittcp/oskittcp/defaults.c [iso-8859-1] (original)
+++ trunk/reactos/lib/drivers/oskittcp/oskittcp/defaults.c [iso-8859-1] Fri May 13
17:16:08 2011
@@ -194,7 +194,11 @@
return RtlCompareMemory(b1, b2, len);
}
+#ifndef _MSC_VER
+
int memcmp(const void *b1, const void *b2, size_t len)
{
return RtlCompareMemory(b1, b2, len);
}
+
+#endif
Modified: trunk/reactos/lib/drivers/oskittcp/oskittcp/interface.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/oskittcp/oskit…
==============================================================================
--- trunk/reactos/lib/drivers/oskittcp/oskittcp/interface.c [iso-8859-1] (original)
+++ trunk/reactos/lib/drivers/oskittcp/oskittcp/interface.c [iso-8859-1] Fri May 13
17:16:08 2011
@@ -129,9 +129,10 @@
int proto )
{
struct socket *so;
-
- OSKLock();
- int error = socreate(domain, &so, type, proto);
+ int error ;
+
+ OSKLock();
+ error = socreate(domain, &so, type, proto);
if( !error ) {
so->so_connection = context;
InitializeSocketFlags(so);