mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 18:23:07 +00:00
[REACTOS] Fix misc 64 bit issues (#783)
* [WIN32K] Fix handle calculation in DbgGdiHTIntegrityCheck * [NOTEPAD] Fix MSVC warnings * [PSDK] Simplify *PROC definitions in windef.h * [VIDEOPRT] Don't try to use NtVdmControl on x64 * [FREELDR] Fix some macros * [CRT] Make qsort 64 bit compatible * [NTOS] Use #ifndef _WIN64 instead of #ifdef _M_IX86 around C_ASSERTs * [FAST486] Fix 64 bit warnings and change DWORD to ULONG, so it can be used in kernel mode * [APPHELP_APITEST] Fix 64 bit issue
This commit is contained in:
parent
d67156fa98
commit
cfd1647914
16 changed files with 54 additions and 42 deletions
|
@ -244,15 +244,10 @@ typedef HANDLE HGLOBAL;
|
|||
typedef HANDLE HLOCAL;
|
||||
typedef HANDLE GLOBALHANDLE;
|
||||
typedef HANDLE LOCALHANDLE;
|
||||
#ifdef _WIN64
|
||||
|
||||
typedef INT_PTR (WINAPI *FARPROC)();
|
||||
typedef INT_PTR (WINAPI *NEARPROC)();
|
||||
typedef INT_PTR (WINAPI *PROC)();
|
||||
#else
|
||||
typedef int (WINAPI *FARPROC)();
|
||||
typedef int (WINAPI *NEARPROC)();
|
||||
typedef int (WINAPI *PROC)();
|
||||
#endif
|
||||
|
||||
typedef void *HGDIOBJ;
|
||||
|
||||
|
|
|
@ -113,7 +113,7 @@
|
|||
* (by reading outside of the prefetch buffer). The prefetch cache must
|
||||
* also not cross a page boundary.
|
||||
*/
|
||||
C_ASSERT((FAST486_CACHE_SIZE >= sizeof(DWORD))
|
||||
C_ASSERT((FAST486_CACHE_SIZE >= sizeof(ULONG))
|
||||
&& (FAST486_CACHE_SIZE <= FAST486_PAGE_SIZE));
|
||||
|
||||
struct _FAST486_STATE;
|
||||
|
|
|
@ -30,6 +30,8 @@
|
|||
#include <stdlib.h>
|
||||
#include <search.h>
|
||||
|
||||
#define long intptr_t
|
||||
|
||||
#define min(a, b) (a) < (b) ? (a) : (b)
|
||||
|
||||
/*
|
||||
|
@ -50,7 +52,7 @@
|
|||
es % sizeof(long) ? 2 : es == sizeof(long)? 0 : 1;
|
||||
|
||||
static __inline void
|
||||
swapfunc(char *a, char *b, int n, int swaptype)
|
||||
swapfunc(char *a, char *b, intptr_t n, int swaptype)
|
||||
{
|
||||
if(swaptype <= 1)
|
||||
swapcode(long, a, b, n)
|
||||
|
@ -91,7 +93,8 @@ __cdecl
|
|||
qsort(void *a, size_t n, size_t es, int (__cdecl *cmp)(const void*, const void*))
|
||||
{
|
||||
char *pa, *pb, *pc, *pd, *pl, *pm, *pn;
|
||||
int d, r, swaptype, swap_cnt;
|
||||
int swaptype, swap_cnt;
|
||||
intptr_t d, r;
|
||||
|
||||
loop: SWAPINIT(a, es);
|
||||
swap_cnt = 0;
|
||||
|
|
|
@ -38,7 +38,7 @@ FASTCALL
|
|||
Fast486MemReadCallback(PFAST486_STATE State, ULONG Address, PVOID Buffer, ULONG Size)
|
||||
{
|
||||
UNREFERENCED_PARAMETER(State);
|
||||
RtlMoveMemory(Buffer, (PVOID)Address, Size);
|
||||
RtlMoveMemory(Buffer, UlongToPtr(Address), Size);
|
||||
}
|
||||
|
||||
static VOID
|
||||
|
@ -46,7 +46,7 @@ FASTCALL
|
|||
Fast486MemWriteCallback(PFAST486_STATE State, ULONG Address, PVOID Buffer, ULONG Size)
|
||||
{
|
||||
UNREFERENCED_PARAMETER(State);
|
||||
RtlMoveMemory((PVOID)Address, Buffer, Size);
|
||||
RtlMoveMemory(UlongToPtr(Address), Buffer, Size);
|
||||
}
|
||||
|
||||
static VOID
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue