Module: wine Branch: master Commit: 3f37e33497ab6f61cffee53a0f479516404c2dd7 URL: http://source.winehq.org/git/wine.git/?a=commit;h=3f37e33497ab6f61cffee53a0f...
Author: Michael Stefaniuc mstefani@redhat.de Date: Wed Feb 10 11:43:37 2010 +0100
kernel32: Avoid using HIWORD on types that are 64bit on Win64.
---
dlls/kernel32/atom.c | 3 ++- dlls/kernel32/except.c | 2 +- dlls/kernel32/module.c | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/dlls/kernel32/atom.c b/dlls/kernel32/atom.c index d6caec2..a8deb5e 100644 --- a/dlls/kernel32/atom.c +++ b/dlls/kernel32/atom.c @@ -37,6 +37,7 @@ #include "kernel_private.h"
#define MAX_ATOM_LEN 255 +#define IS_INTATOM(x) (((ULONG_PTR)(x) >> 16) == 0)
/****************************************************************** * get_local_table @@ -88,7 +89,7 @@ BOOL WINAPI InitAtomTable( DWORD entries ) */ static inline BOOL check_integral_atom( const void* ptr, ATOM* patom) { - if (HIWORD( ptr )) return FALSE; + if (!IS_INTATOM( ptr )) return FALSE; if ((*patom = LOWORD( ptr )) >= MAXINTATOM) { SetLastError( ERROR_INVALID_PARAMETER ); diff --git a/dlls/kernel32/except.c b/dlls/kernel32/except.c index d6dea99..6ed88ad 100644 --- a/dlls/kernel32/except.c +++ b/dlls/kernel32/except.c @@ -133,7 +133,7 @@ static int format_exception_msg( const EXCEPTION_POINTERS *ptr, char *buffer, in rec->ExceptionInformation[0]); break; case EXCEPTION_WINE_STUB: - if (HIWORD(rec->ExceptionInformation[1])) + if ((ULONG_PTR)rec->ExceptionInformation[1] >> 16) len = snprintf( buffer, size, "Unimplemented function %s.%s called", (char *)rec->ExceptionInformation[0], (char *)rec->ExceptionInformation[1] ); else diff --git a/dlls/kernel32/module.c b/dlls/kernel32/module.c index 96a240e..2b8f11e 100644 --- a/dlls/kernel32/module.c +++ b/dlls/kernel32/module.c @@ -1032,7 +1032,7 @@ FARPROC WINAPI GetProcAddress( HMODULE hModule, LPCSTR function )
if (!hModule) hModule = NtCurrentTeb()->Peb->ImageBaseAddress;
- if (HIWORD(function)) + if ((ULONG_PTR)function >> 16) { ANSI_STRING str;