Module: wine Branch: master Commit: fea2aa55d03aeae73100c25f27bcb0b614f65da4 URL: http://source.winehq.org/git/wine.git/?a=commit;h=fea2aa55d03aeae73100c25f27...
Author: Alexandre Julliard julliard@winehq.org Date: Mon Dec 8 15:51:22 2008 +0100
include: Fix the 64-bit value of magic handle constants.
---
dlls/kernel32/process.c | 2 +- dlls/kernel32/thread.c | 2 +- include/winbase.h | 16 ++++++++-------- include/wine/test.h | 4 ++-- include/wingdi.h | 4 ++-- 5 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c index dcf4ce8..9893181 100644 --- a/dlls/kernel32/process.c +++ b/dlls/kernel32/process.c @@ -3141,7 +3141,7 @@ BOOL WINAPI IsWow64Process(HANDLE hProcess, PBOOL Wow64Process) #undef GetCurrentProcess HANDLE WINAPI GetCurrentProcess(void) { - return (HANDLE)0xffffffff; + return (HANDLE)~(ULONG_PTR)0; }
/*********************************************************************** diff --git a/dlls/kernel32/thread.c b/dlls/kernel32/thread.c index b5a3708..b084943 100644 --- a/dlls/kernel32/thread.c +++ b/dlls/kernel32/thread.c @@ -557,7 +557,7 @@ VOID WINAPI VWin32_BoostThreadStatic( DWORD threadId, INT boost ) #undef GetCurrentThread HANDLE WINAPI GetCurrentThread(void) { - return (HANDLE)0xfffffffe; + return (HANDLE)~(ULONG_PTR)1; }
diff --git a/include/winbase.h b/include/winbase.h index 714a670..6b19a4b 100644 --- a/include/winbase.h +++ b/include/winbase.h @@ -309,16 +309,16 @@ typedef struct _PROCESS_HEAP_ENTRY #define PROCESS_HEAP_ENTRY_MOVEABLE 0x0010 #define PROCESS_HEAP_ENTRY_DDESHARE 0x0020
-#define INVALID_HANDLE_VALUE ((HANDLE)~0UL) -#define INVALID_FILE_SIZE ((DWORD)~0UL) -#define INVALID_SET_FILE_POINTER ((DWORD)~0UL) -#define INVALID_FILE_ATTRIBUTES ((DWORD)~0UL) +#define INVALID_HANDLE_VALUE ((HANDLE)~(ULONG_PTR)0) +#define INVALID_FILE_SIZE (~0u) +#define INVALID_SET_FILE_POINTER (~0u) +#define INVALID_FILE_ATTRIBUTES (~0u)
#define LOCKFILE_FAIL_IMMEDIATELY 1 #define LOCKFILE_EXCLUSIVE_LOCK 2
-#define FLS_OUT_OF_INDEXES ((DWORD)~0UL) -#define TLS_OUT_OF_INDEXES ((DWORD)~0UL) +#define FLS_OUT_OF_INDEXES (~0u) +#define TLS_OUT_OF_INDEXES (~0u)
#define SHUTDOWN_NORETRY 1
@@ -2436,8 +2436,8 @@ static inline PVOID WINAPI InterlockedExchangePointer( PVOID volatile *dest, PVO }
#ifdef __WINESRC__ -#define GetCurrentProcess() ((HANDLE)0xffffffff) -#define GetCurrentThread() ((HANDLE)0xfffffffe) +#define GetCurrentProcess() ((HANDLE)~(ULONG_PTR)0) +#define GetCurrentThread() ((HANDLE)~(ULONG_PTR)1) #endif
/* WinMain(entry point) must be declared in winbase.h. */ diff --git a/include/wine/test.h b/include/wine/test.h index 62d8c3a..caa3f35 100644 --- a/include/wine/test.h +++ b/include/wine/test.h @@ -40,10 +40,10 @@ #endif
#ifndef INVALID_FILE_ATTRIBUTES -#define INVALID_FILE_ATTRIBUTES ((DWORD)~0UL) +#define INVALID_FILE_ATTRIBUTES (~0u) #endif #ifndef INVALID_SET_FILE_POINTER -#define INVALID_SET_FILE_POINTER ((DWORD)~0UL) +#define INVALID_SET_FILE_POINTER (~0u) #endif
/* debug level */ diff --git a/include/wingdi.h b/include/wingdi.h index e7be055..ac4ba2b 100644 --- a/include/wingdi.h +++ b/include/wingdi.h @@ -3253,8 +3253,8 @@ typedef struct _BLENDFUNCTION #define GRADIENT_FILL_TRIANGLE 0x00000002 #define GRADIENT_FILL_OP_FLAG 0x000000ff
-#define GDI_ERROR (0xFFFFFFFFL) -#define HGDI_ERROR ((HANDLE)0xFFFFFFFFL) +#define GDI_ERROR (~0u) +#define HGDI_ERROR ((HANDLE)~(ULONG_PTR)0)
/* AddFontResourceEx flags */ #define FR_PRIVATE 0x10