Author: sserapion
Date: Tue Dec  8 00:09:35 2009
New Revision: 44462

URL: http://svn.reactos.org/svn/reactos?rev=44462&view=rev
Log:
Fix building some modules. special thanks to Basil Gello.

Modified:
    branches/ros-amd64-bringup/rostests/drivers/kmtest/ntos_io.c
    branches/ros-amd64-bringup/rostests/drivers/kmtest/ntos_ob.c
    branches/ros-amd64-bringup/rostests/drivers/kmtest/reghelper.c
    branches/ros-amd64-bringup/rostests/tests/global_mem/global_mem.c
    branches/ros-amd64-bringup/rostests/tests/isotest/isotest.c
    branches/ros-amd64-bringup/rostests/tests/map_dup_inherit/map_dup_inherit.c
    branches/ros-amd64-bringup/rostests/tests/mdi/mdi.c
    branches/ros-amd64-bringup/rostests/tests/miditest/miditest.c
    branches/ros-amd64-bringup/rostests/tests/multithrdwin/multithrdwin.c
    branches/ros-amd64-bringup/rostests/tests/p_dup_handle/p_dup_handle.c
    branches/ros-amd64-bringup/rostests/win32/user32/kbdlayout/kbdlayout.c
    branches/ros-amd64-bringup/rostests/winetests/msvcrt/printf.c

Modified: branches/ros-amd64-bringup/rostests/drivers/kmtest/ntos_io.c
URL: 
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/rostests/drivers/kmtest/ntos_io.c?rev=44462&r1=44461&r2=44462&view=diff
==============================================================================
--- branches/ros-amd64-bringup/rostests/drivers/kmtest/ntos_io.c [iso-8859-1] 
(original)
+++ branches/ros-amd64-bringup/rostests/drivers/kmtest/ntos_io.c [iso-8859-1] 
Tue Dec  8 00:09:35 2009
@@ -48,7 +48,7 @@
 
     ok(Mdl == NULL,
       "IoAllocateMdl should fail allocation of 2Gb or more, but got Mdl=0x%X",
-      (UINT32)Mdl);
+      (UINT_PTR)Mdl);
 
     if (Mdl)
         IoFreeMdl(Mdl);
@@ -59,10 +59,10 @@
     ok(Mdl != NULL, "Mdl allocation failed");
     // Check fields of the allocated struct
     ok(Mdl->Next == NULL, "Mdl->Next should be NULL, but is 0x%X",
-        (UINT32)Mdl->Next);
+        (UINT_PTR)Mdl->Next);
     ok(Mdl->ByteCount == MdlSize,
         "Mdl->ByteCount should be equal to MdlSize, but is 0x%X",
-        (UINT32)Mdl->ByteCount);
+        (UINT_PTR)Mdl->ByteCount);
     // TODO: Check other fields of MDL struct
 
     IoFreeMdl(Mdl);
@@ -72,7 +72,7 @@
     Mdl = IoAllocateMdl(VirtualAddress, MdlSize, FALSE, FALSE, Irp);
     ok(Mdl != NULL, "Mdl allocation failed");
     ok(Irp->MdlAddress == Mdl, "Irp->MdlAddress should be 0x%X, but is 0x%X",
-        (UINT32)Mdl, (UINT32)Irp->MdlAddress);
+        (UINT_PTR)Mdl, (UINT_PTR)Irp->MdlAddress);
 
     IoFreeMdl(Mdl);
 

Modified: branches/ros-amd64-bringup/rostests/drivers/kmtest/ntos_ob.c
URL: 
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/rostests/drivers/kmtest/ntos_ob.c?rev=44462&r1=44461&r2=44462&view=diff
==============================================================================
--- branches/ros-amd64-bringup/rostests/drivers/kmtest/ntos_ob.c [iso-8859-1] 
(original)
+++ branches/ros-amd64-bringup/rostests/drivers/kmtest/ntos_ob.c [iso-8859-1] 
Tue Dec  8 00:09:35 2009
@@ -324,7 +324,7 @@
         "Object insertion should have failed, but got 0x%lX", Status);
     ok(ObBody[0] == ObBody1[1],
         "Object bodies doesn't match, 0x%p != 0x%p", ObBody[0], ObBody1[1]);
-    ok(ObHandle2[0] != NULL, "Bad handle returned 0x%lX", (ULONG)ObHandle2[0]);
+    ok(ObHandle2[0] != NULL, "Bad handle returned 0x%lX", 
(ULONG_PTR)ObHandle2[0]);
 
     DPRINT1("%d %d %d %d %d %d %d\n", DumpCount, OpenCount, // deletecount+1
         CloseCount, DeleteCount, ParseCount, OkayToCloseCount, QueryNameCount);

Modified: branches/ros-amd64-bringup/rostests/drivers/kmtest/reghelper.c
URL: 
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/rostests/drivers/kmtest/reghelper.c?rev=44462&r1=44461&r2=44462&view=diff
==============================================================================
--- branches/ros-amd64-bringup/rostests/drivers/kmtest/reghelper.c [iso-8859-1] 
(original)
+++ branches/ros-amd64-bringup/rostests/drivers/kmtest/reghelper.c [iso-8859-1] 
Tue Dec  8 00:09:35 2009
@@ -75,7 +75,7 @@
     /* Remove the current driver name from the string */
     /* FIXME: Dont use hard coded driver name, determine it from the string 
returned from the above Query */
     Length = (wcslen((PWCHAR)ValuePartialInfo->Data) * 2) - 
(wcslen(L"kmtest.sys") * 2);
-    RtlZeroMemory((PVOID)((ULONG)ValuePartialInfo->Data + Length),
+    RtlZeroMemory((PVOID)((ULONG_PTR)ValuePartialInfo->Data + Length),
     wcslen(L"drvtests.sys") * 2);
     ZwClose(ServiceKey);
 

Modified: branches/ros-amd64-bringup/rostests/tests/global_mem/global_mem.c
URL: 
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/rostests/tests/global_mem/global_mem.c?rev=44462&r1=44461&r2=44462&view=diff
==============================================================================
--- branches/ros-amd64-bringup/rostests/tests/global_mem/global_mem.c 
[iso-8859-1] (original)
+++ branches/ros-amd64-bringup/rostests/tests/global_mem/global_mem.c 
[iso-8859-1] Tue Dec  8 00:09:35 2009
@@ -139,7 +139,7 @@
 /*---------------------------------------------------------------------------
 **
 */
-void OUTPUT_HexDword(DWORD dw)
+void OUTPUT_HexDword(ULONG_PTR dw)
 {
     char buffer[32];
     sprintf(buffer, "0x%lX",dw);
@@ -412,9 +412,9 @@
         else
         {
             OUTPUT_Line("Alloced Handle: ");
-            OUTPUT_HexDword((DWORD)hMem);
+            OUTPUT_HexDword((ULONG_PTR)hMem);
             OUTPUT_Line("ReAlloced Handle: ");
-            OUTPUT_HexDword((DWORD)hReAlloced);
+            OUTPUT_HexDword((ULONG_PTR)hReAlloced);
             if (hMem == hReAlloced)
             {
                 OUTPUT_Line("GlobalReAlloc returned the same pointer.  The 
documentation states that this is wrong, but Windows NT works this way.");
@@ -455,9 +455,9 @@
         else
         {
             OUTPUT_Line("Alloced Handle: ");
-            OUTPUT_HexDword((DWORD)hMem);
+            OUTPUT_HexDword((ULONG_PTR)hMem);
             OUTPUT_Line("ReAlloced Handle: ");
-            OUTPUT_HexDword((DWORD)hReAlloced);
+            OUTPUT_HexDword((ULONG_PTR)hReAlloced);
             if (hMem != hReAlloced)
             {
                 OUTPUT_Line("GlobalReAlloc returned a different.");
@@ -516,9 +516,9 @@
         else
         {
             OUTPUT_Line("Alloced Handle: ");
-            OUTPUT_HexDword((DWORD)hMem);
+            OUTPUT_HexDword((ULONG_PTR)hMem);
             OUTPUT_Line("ReAlloced Handle: ");
-            OUTPUT_HexDword((DWORD)hReAlloced);
+            OUTPUT_HexDword((ULONG_PTR)hReAlloced);
 
             pMem = GlobalLock(hReAlloced);
             hMem = hReAlloced;
@@ -559,9 +559,9 @@
         else
         {
             OUTPUT_Line("Alloced Handle: ");
-            OUTPUT_HexDword((DWORD)hMem);
+            OUTPUT_HexDword((ULONG_PTR)hMem);
             OUTPUT_Line("ReAlloced Handle: ");
-            OUTPUT_HexDword((DWORD)hReAlloced);
+            OUTPUT_HexDword((ULONG_PTR)hReAlloced);
             if (hMem != hReAlloced)
             {
                 OUTPUT_Line("GlobalReAlloc returned a different block.");
@@ -638,7 +638,7 @@
         OUTPUT_Result(result);
 
         OUTPUT_Line("Pointer from handle: ");
-        OUTPUT_HexDword((DWORD)GlobalLock(hMem));
+        OUTPUT_HexDword((ULONG_PTR)GlobalLock(hMem));
 
         OUTPUT_Line("Testing after a lock");
         OUTPUT_Line("Testing for a lock of 1");
@@ -679,7 +679,7 @@
     if (0 != hMem)
     {
         OUTPUT_Line("Allocation handle: ");
-        OUTPUT_HexDword((DWORD)hMem);
+        OUTPUT_HexDword((ULONG_PTR)hMem);
         OUTPUT_Line("Testing for a discarded flag");
         uFlags = GlobalFlags(hMem);
         if (0 != (uFlags & GMEM_DISCARDED)) /*discarded*/
@@ -720,7 +720,7 @@
     {
 
         OUTPUT_Line("Allocation handle: ");
-        OUTPUT_HexDword((DWORD)hMem);
+        OUTPUT_HexDword((ULONG_PTR)hMem);
 
         OUTPUT_Line("Testing initial allocation");
         OUTPUT_Line("Testing for non-discarded and lock of 0");
@@ -737,7 +737,7 @@
         OUTPUT_Result(result);
 
         OUTPUT_Line("Pointer from handle: ");
-        OUTPUT_HexDword((DWORD)GlobalLock(hMem));
+        OUTPUT_HexDword((ULONG_PTR)GlobalLock(hMem));
         OUTPUT_Line("Testing after a lock");
         OUTPUT_Line("Testing for non-discarded and lock of 0");
         uFlags = GlobalFlags(hMem);
@@ -796,7 +796,7 @@
     {
 
         OUTPUT_Line("Allocation handle: ");
-        OUTPUT_HexDword((DWORD)hMem);
+        OUTPUT_HexDword((ULONG_PTR)hMem);
 
         hTest = GlobalHandle(hMem);
         if (hMem == hTest)
@@ -806,7 +806,7 @@
         else
         {
             OUTPUT_Line("GlobalHandle returned:");
-            OUTPUT_HexDword((DWORD)hTest);
+            OUTPUT_HexDword((ULONG_PTR)hTest);
             subtest = TEST_CombineStatus(subtest, FAILED);
         }
 
@@ -830,7 +830,7 @@
     {
 
         OUTPUT_Line("Allocation handle: ");
-        OUTPUT_HexDword((DWORD)hMem);
+        OUTPUT_HexDword((ULONG_PTR)hMem);
         pMem = GlobalLock(hMem);
         hTest = GlobalHandle(pMem);
         if (hMem == hTest)
@@ -840,7 +840,7 @@
         else
         {
             OUTPUT_Line("GlobalHandle returned:");
-            OUTPUT_HexDword((DWORD)hTest);
+            OUTPUT_HexDword((ULONG_PTR)hTest);
             subtest = TEST_CombineStatus(subtest, FAILED);
         }
 
@@ -979,7 +979,7 @@
     if (0 != hMem)
     {
         OUTPUT_Line("Allocation handle: ");
-        OUTPUT_HexDword((DWORD)hMem);
+        OUTPUT_HexDword((ULONG_PTR)hMem);
 
         hTest = GlobalDiscard(hMem);
         if (0 == hTest)

Modified: branches/ros-amd64-bringup/rostests/tests/isotest/isotest.c
URL: 
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/rostests/tests/isotest/isotest.c?rev=44462&r1=44461&r2=44462&view=diff
==============================================================================
--- branches/ros-amd64-bringup/rostests/tests/isotest/isotest.c [iso-8859-1] 
(original)
+++ branches/ros-amd64-bringup/rostests/tests/isotest/isotest.c [iso-8859-1] 
Tue Dec  8 00:09:35 2009
@@ -21,7 +21,7 @@
 
   while (offset < (size & ~15))
     {
-      ptr = (unsigned char*)((ULONG)buffer + offset);
+      ptr = (unsigned char*)((ULONG_PTR)buffer + offset);
       printf("%08lx  %02hx %02hx %02hx %02hx %02hx %02hx %02hx %02hx-%02hx 
%02hx %02hx %02hx %02hx %02hx %02hx %02hx",
             offset,
             ptr[0],
@@ -62,7 +62,7 @@
       offset += 16;
     }
 
-  ptr = (unsigned char*)((ULONG)buffer + offset);
+  ptr = (unsigned char*)((ULONG_PTR)buffer + offset);
   if (offset < size)
     {
       printf("%08lx ", offset);

Modified: 
branches/ros-amd64-bringup/rostests/tests/map_dup_inherit/map_dup_inherit.c
URL: 
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/rostests/tests/map_dup_inherit/map_dup_inherit.c?rev=44462&r1=44461&r2=44462&view=diff
==============================================================================
--- branches/ros-amd64-bringup/rostests/tests/map_dup_inherit/map_dup_inherit.c 
[iso-8859-1] (original)
+++ branches/ros-amd64-bringup/rostests/tests/map_dup_inherit/map_dup_inherit.c 
[iso-8859-1] Tue Dec  8 00:09:35 2009
@@ -17,7 +17,7 @@
 
   if( argc == 2 ) {
     #ifdef WIN64
-        file_map = (void *)atoi64(argv[1]);
+        file_map = (void *)_atoi64(argv[1]);
     #else
         file_map = (void *)UlongToPtr(atoi(argv[1]));
     #endif

Modified: branches/ros-amd64-bringup/rostests/tests/mdi/mdi.c
URL: 
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/rostests/tests/mdi/mdi.c?rev=44462&r1=44461&r2=44462&view=diff
==============================================================================
--- branches/ros-amd64-bringup/rostests/tests/mdi/mdi.c [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/rostests/tests/mdi/mdi.c [iso-8859-1] Tue Dec  8 
00:09:35 2009
@@ -160,7 +160,7 @@
        mcs.y = mcs.cy = CW_USEDEFAULT;
        mcs.style = MDIS_ALLCHILDSTYLES;
 
-       hChild = (HWND)SendMessage(hMDIClient, WM_MDICREATE, 0, (LONG)&mcs);
+       hChild = (HWND)SendMessage(hMDIClient, WM_MDICREATE, 0, (LPARAM)&mcs);
        if(!hChild)
        {
                MessageBox(hMDIClient, "MDI Child creation failed.", "Oh Oh...",

Modified: branches/ros-amd64-bringup/rostests/tests/miditest/miditest.c
URL: 
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/rostests/tests/miditest/miditest.c?rev=44462&r1=44461&r2=44462&view=diff
==============================================================================
--- branches/ros-amd64-bringup/rostests/tests/miditest/miditest.c [iso-8859-1] 
(original)
+++ branches/ros-amd64-bringup/rostests/tests/miditest/miditest.c [iso-8859-1] 
Tue Dec  8 00:09:35 2009
@@ -36,7 +36,7 @@
     printf("Opening MIDI output #0\n");
 
     Result = midiOutOpen(&Handle, 0, 0, 0, CALLBACK_NULL);
-    printf("Result == %d Handle == %d\n", Result, (int)Handle);
+    printf("Result == %d Handle == %x\n", Result, Handle);
 
     // play something:
     midiOutShortMsg(Handle, 0x007f3090);

Modified: branches/ros-amd64-bringup/rostests/tests/multithrdwin/multithrdwin.c
URL: 
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/rostests/tests/multithrdwin/multithrdwin.c?rev=44462&r1=44461&r2=44462&view=diff
==============================================================================
--- branches/ros-amd64-bringup/rostests/tests/multithrdwin/multithrdwin.c 
[iso-8859-1] (original)
+++ branches/ros-amd64-bringup/rostests/tests/multithrdwin/multithrdwin.c 
[iso-8859-1] Tue Dec  8 00:09:35 2009
@@ -157,7 +157,7 @@
   HDC hDC;
   RECT Client;
   HBRUSH Brush;
-  DWORD Ret;
+  DWORD_PTR Ret;
 
   static COLORREF Colors[] =
     {

Modified: branches/ros-amd64-bringup/rostests/tests/p_dup_handle/p_dup_handle.c
URL: 
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/rostests/tests/p_dup_handle/p_dup_handle.c?rev=44462&r1=44461&r2=44462&view=diff
==============================================================================
--- branches/ros-amd64-bringup/rostests/tests/p_dup_handle/p_dup_handle.c 
[iso-8859-1] (original)
+++ branches/ros-amd64-bringup/rostests/tests/p_dup_handle/p_dup_handle.c 
[iso-8859-1] Tue Dec  8 00:09:35 2009
@@ -15,7 +15,7 @@
   fprintf( stderr, "%lu: Starting\n", GetCurrentProcessId() );
 
   if( argc == 2 ) {
-    h_process = (HANDLE)atoi(argv[1]);
+    h_process = (HANDLE)(ULONG_PTR)atoi(argv[1]);
   } else {
     if( !DuplicateHandle( GetCurrentProcess(),
                          GetCurrentProcess(),
@@ -38,7 +38,7 @@
     memset( &si, 0, sizeof( si ) );
     memset( &pi, 0, sizeof( pi ) );
 
-    sprintf( cmdline, "%s %lu", argv[0], (DWORD)h_process );
+    sprintf( cmdline, "%s %x", argv[0], h_process );
     if( !CreateProcess(NULL, cmdline, NULL, NULL, TRUE, 0, NULL, NULL,
                       &si, &pi ) ) {
       fprintf( stderr, "%lu: Could not create child process.\n",

Modified: branches/ros-amd64-bringup/rostests/win32/user32/kbdlayout/kbdlayout.c
URL: 
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/rostests/win32/user32/kbdlayout/kbdlayout.c?rev=44462&r1=44461&r2=44462&view=diff
==============================================================================
--- branches/ros-amd64-bringup/rostests/win32/user32/kbdlayout/kbdlayout.c 
[iso-8859-1] (original)
+++ branches/ros-amd64-bringup/rostests/win32/user32/kbdlayout/kbdlayout.c 
[iso-8859-1] Tue Dec  8 00:09:35 2009
@@ -122,7 +122,7 @@
 
 LRESULT CALLBACK WndSubclassProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM 
lParam)
 {
-       WND_DATA *data = (WND_DATA*)GetWindowLong(hwnd, GWL_USERDATA);
+       WND_DATA *data = (WND_DATA*)GetWindowLongPtr(hwnd, GWL_USERDATA);
 
        if(uMsg == WM_INPUTLANGCHANGE)
        {
@@ -143,9 +143,9 @@
 void SubclassWnd(HWND hWnd, WCHAR* Name)
 {
        WND_DATA *data = HeapAlloc(GetProcessHeap(), 0, sizeof(WND_DATA));
-       data->OrigProc = (WNDPROC)SetWindowLong( hWnd, GWL_WNDPROC, 
(LONG)WndSubclassProc);
+       data->OrigProc = (WNDPROC)SetWindowLongPtr( hWnd, GWL_WNDPROC, 
(LONG_PTR)WndSubclassProc);
        wcsncpy(data->WndName, Name, 25);
-       SetWindowLong(hWnd, GWL_USERDATA, (LONG)data);
+       SetWindowLong(hWnd, GWL_USERDATA, (LONG_PTR)data);
        return;
 }
 

Modified: branches/ros-amd64-bringup/rostests/winetests/msvcrt/printf.c
URL: 
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/rostests/winetests/msvcrt/printf.c?rev=44462&r1=44461&r2=44462&view=diff
==============================================================================
--- branches/ros-amd64-bringup/rostests/winetests/msvcrt/printf.c [iso-8859-1] 
(original)
+++ branches/ros-amd64-bringup/rostests/winetests/msvcrt/printf.c [iso-8859-1] 
Tue Dec  8 00:09:35 2009
@@ -23,8 +23,10 @@
 /* With Visual Studio >= 2005,  swprintf() takes an extra parameter unless
  * the following macro is defined.
  */
+#ifdef _MSC_VER
 #define _CRT_NON_CONFORMING_SWPRINTFS
- 
+#endif
+
 #include <stdio.h>
 
 #include "windef.h"


Reply via email to