Author: tkreuzer Date: Wed Aug 27 15:27:32 2008 New Revision: 35712
URL: http://svn.reactos.org/svn/reactos?rev=35712&view=rev Log: Merge 34714, 34716, 34718, 34720 from ros-amd64-bringup branch: recyclebin: DWORD -> SIZE_T and SIZE_T -> DWORD rtl: - cast AtomName to ULONG_PTR instead of ULONG - RtlQueryProcessdebugInformation(): cast teb->ClientId.UniqueProcess to ULONG_PTR for assignment to Pid. - vs(w)nprintf: cast argument to ULONG_PTR instead of unsigned long for a %p crt: - int -> intptr_t - unsigned long -> uintptr_t - #undef _MINGW_IMPORT in ctype.c, to avoid warnings scrnsafe: rename _toul to _toulptr and make it return an ULONG_PTR
Modified: trunk/reactos/lib/recyclebin/recyclebin_v5.c trunk/reactos/lib/recyclebin/recyclebin_v5_enumerator.c trunk/reactos/lib/rtl/atom.c trunk/reactos/lib/rtl/dbgbuffer.c trunk/reactos/lib/rtl/sprintf.c trunk/reactos/lib/rtl/srw.c trunk/reactos/lib/rtl/swprintf.c trunk/reactos/lib/sdk/crt/process/_system.c trunk/reactos/lib/sdk/crt/process/process.c trunk/reactos/lib/sdk/crt/string/ctype.c trunk/reactos/lib/sdk/scrnsave/scrnsave.c
Modified: trunk/reactos/lib/recyclebin/recyclebin_v5.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/recyclebin/recyclebin_v... ============================================================================== --- trunk/reactos/lib/recyclebin/recyclebin_v5.c [iso-8859-1] (original) +++ trunk/reactos/lib/recyclebin/recyclebin_v5.c [iso-8859-1] Wed Aug 27 15:27:32 2008 @@ -564,7 +564,7 @@ LPWSTR FileName; /* Pointer into BufferName buffer */ LPCSTR DesktopIniContents = "[.ShellClassInfo]\r\nCLSID={645FF040-5081-101B-9F08-00AA002F954E}\r\n"; INFO2_HEADER Info2Contents[] = { { 5, 0, 0, 0x320, 0 } }; - SIZE_T BytesToWrite, BytesWritten, Needed; + DWORD BytesToWrite, BytesWritten, Needed; HANDLE hFile = INVALID_HANDLE_VALUE; HRESULT hr;
@@ -676,7 +676,7 @@ HANDLE tokenHandle = INVALID_HANDLE_VALUE; PTOKEN_USER TokenUserInfo = NULL; LPWSTR StringSid = NULL, p; - SIZE_T Needed, DirectoryLength; + DWORD Needed, DirectoryLength; INT len; HRESULT hr;
Modified: trunk/reactos/lib/recyclebin/recyclebin_v5_enumerator.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/recyclebin/recyclebin_v... ============================================================================== --- trunk/reactos/lib/recyclebin/recyclebin_v5_enumerator.c [iso-8859-1] (original) +++ trunk/reactos/lib/recyclebin/recyclebin_v5_enumerator.c [iso-8859-1] Wed Aug 27 15:27:32 2008 @@ -191,9 +191,9 @@ static HRESULT STDMETHODCALLTYPE RecycleBin5File_RecycleBinFile_GetFileName( IN IRecycleBinFile *This, - IN DWORD BufferSize, + IN SIZE_T BufferSize, IN OUT LPWSTR Buffer, - OUT DWORD *RequiredSize) + OUT SIZE_T *RequiredSize) { struct RecycleBin5File *s = CONTAINING_RECORD(This, struct RecycleBin5File, recycleBinFileImpl); DWORD dwRequired;
Modified: trunk/reactos/lib/rtl/atom.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/atom.c?rev=35712&am... ============================================================================== --- trunk/reactos/lib/rtl/atom.c [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/atom.c [iso-8859-1] Wed Aug 27 15:27:32 2008 @@ -90,9 +90,9 @@ DPRINT("RtlpCheckIntegerAtom(AtomName '%S' AtomValue %p)\n", AtomName, AtomValue);
- if (!((ULONG)AtomName & 0xFFFF0000)) - { - LoValue = (USHORT)((ULONG)AtomName & 0xFFFF); + if (!((ULONG_PTR)AtomName & 0xFFFF0000)) + { + LoValue = (USHORT)((ULONG_PTR)AtomName & 0xFFFF);
if (LoValue == 0) LoValue = 0xC000;
Modified: trunk/reactos/lib/rtl/dbgbuffer.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/dbgbuffer.c?rev=357... ============================================================================== --- trunk/reactos/lib/rtl/dbgbuffer.c [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/dbgbuffer.c [iso-8859-1] Wed Aug 27 15:27:32 2008 @@ -234,7 +234,7 @@ IN OUT PRTL_DEBUG_INFORMATION Buf) { NTSTATUS Status = STATUS_SUCCESS; - ULONG Pid = (ULONG) NtCurrentTeb()->ClientId.UniqueProcess; + ULONG Pid = (ULONG_PTR) NtCurrentTeb()->ClientId.UniqueProcess;
Buf->Flags = DebugInfoMask; Buf->OffsetFree = sizeof(RTL_DEBUG_INFORMATION); @@ -319,7 +319,7 @@ Buf->TargetProcessHandle = NtCurrentProcess();
ClientId.UniqueThread = 0; - ClientId.UniqueProcess = (HANDLE)ProcessId; + ClientId.UniqueProcess = (HANDLE)(ULONG_PTR)ProcessId; InitializeObjectAttributes(&ObjectAttributes, NULL, 0,
Modified: trunk/reactos/lib/rtl/sprintf.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/sprintf.c?rev=35712... ============================================================================== --- trunk/reactos/lib/rtl/sprintf.c [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/sprintf.c [iso-8859-1] Wed Aug 27 15:27:32 2008 @@ -577,7 +577,7 @@ flags |= ZEROPAD; } str = number(str, end, - (unsigned long) va_arg(args, void *), 16, + (ULONG_PTR) va_arg(args, void *), 16, field_width, precision, flags); continue;
Modified: trunk/reactos/lib/rtl/srw.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/srw.c?rev=35712&... ============================================================================== --- trunk/reactos/lib/rtl/srw.c [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/srw.c [iso-8859-1] Wed Aug 27 15:27:32 2008 @@ -44,7 +44,7 @@ RTL_SRWLOCK_SHARED | RTL_SRWLOCK_CONTENTION_LOCK) #define RTL_SRWLOCK_BITS 4
-#if defined(__GNUC__) +#if defined(__GNUC__) && !defined(_M_AMD64) /* This macro will cause the code to assert if compiled with a buggy version of GCC that doesn't align the wait blocks properly on the stack! */ #define ASSERT_SRW_WAITBLOCK(ptr) \
Modified: trunk/reactos/lib/rtl/swprintf.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/swprintf.c?rev=3571... ============================================================================== --- trunk/reactos/lib/rtl/swprintf.c [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/swprintf.c [iso-8859-1] Wed Aug 27 15:27:32 2008 @@ -575,7 +575,7 @@ flags |= ZEROPAD; } str = number(str, end, - (unsigned long) va_arg(args, void *), 16, + (ULONG_PTR) va_arg(args, void *), 16, field_width, precision, flags); continue;
Modified: trunk/reactos/lib/sdk/crt/process/_system.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/process/_system... ============================================================================== --- trunk/reactos/lib/sdk/crt/process/_system.c [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/process/_system.c [iso-8859-1] Wed Aug 27 15:27:32 2008 @@ -108,7 +108,7 @@ CloseHandle(ProcessInformation.hThread);
// system should wait untill the calling process is finished - _cwait(&nStatus,(int)ProcessInformation.hProcess,0); + _cwait(&nStatus,(intptr_t)ProcessInformation.hProcess,0); CloseHandle(ProcessInformation.hProcess);
return nStatus;
Modified: trunk/reactos/lib/sdk/crt/process/process.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/process/process... ============================================================================== --- trunk/reactos/lib/sdk/crt/process/process.c [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/process/process.c [iso-8859-1] Wed Aug 27 15:27:32 2008 @@ -182,7 +182,7 @@ return str; }
-static int +static intptr_t do_spawnT(int mode, const _TCHAR* cmdname, const _TCHAR* args, const _TCHAR* envp) { STARTUPINFO StartupInfo = {0}; @@ -304,7 +304,7 @@ { case _P_NOWAIT: case _P_NOWAITO: - return((int)ProcessInformation.hProcess); + return((intptr_t)ProcessInformation.hProcess); case _P_OVERLAY: CloseHandle(ProcessInformation.hProcess); _exit(0); @@ -317,7 +317,7 @@ CloseHandle(ProcessInformation.hProcess); return( 0); } - return( (int)ProcessInformation.hProcess); + return( (intptr_t)ProcessInformation.hProcess); }
/*
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 Aug 27 15:27:32 2008 @@ -1,4 +1,6 @@ #include <string.h> +#undef __MINGW_IMPORT +#define __MINGW_IMPORT #include <ctype.h>
#undef _pctype
Modified: trunk/reactos/lib/sdk/scrnsave/scrnsave.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/scrnsave/scrnsave.c... ============================================================================== --- trunk/reactos/lib/sdk/scrnsave/scrnsave.c [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/scrnsave/scrnsave.c [iso-8859-1] Wed Aug 27 15:27:32 2008 @@ -36,10 +36,10 @@
#define ISNUM(c) ((c) >= '0' && c <= '9')
-static unsigned long _toul(const TCHAR *s) -{ - unsigned long res; - unsigned long n; +static ULONG_PTR _toulptr(const TCHAR *s) +{ + ULONG_PTR res; + ULONG_PTR n; const TCHAR *p;
for (p = s; *p; p++) @@ -223,7 +223,7 @@ fChildPreview = TRUE;
while (ISSPACE(*++p)); - hParent = (HWND) _toul(p); + hParent = (HWND) _toulptr(p);
if (hParent && IsWindow(hParent)) return LaunchScreenSaver(hParent);