From 0fb2ec31fcc202f799e7fcd40e1f2f989f724da2 Mon Sep 17 00:00:00 2001 From: janwas Date: Sun, 13 Jun 2004 19:23:37 +0000 Subject: [PATCH] fix LONG_PTR VC6 error reported by stuart This was SVN commit r499. --- source/lib/sysdep/win/wdll.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/source/lib/sysdep/win/wdll.cpp b/source/lib/sysdep/win/wdll.cpp index a45b136db1..20e7c55f93 100755 --- a/source/lib/sysdep/win/wdll.cpp +++ b/source/lib/sysdep/win/wdll.cpp @@ -259,13 +259,15 @@ FLoadedAtPreferredAddress(PIMAGE_NT_HEADERS pinh, HMODULE hmod) { #undef InterlockedExchangePointer #define InterlockedExchangePointer(Target, Value) \ - (PVOID)(LONG_PTR)InterlockedExchange((PLONG)(Target), (LONG)(LONG_PTR)(Value)) + (PVOID)(uintptr_t)InterlockedExchange((PLONG)(Target), (LONG)(uintptr_t)(Value)) +/* #if (_MSC_VER >= 1300) typedef __w64 unsigned long *PULONG_PTR; #else typedef unsigned long *PULONG_PTR; #endif +*/ #endif @@ -293,11 +295,11 @@ extern "C" FARPROC WINAPI __delayLoadHelper2(PCImgDelayDescr pidd, FARPROC* ppfn if (!(idd.grAttrs & dlattrRva)) { PDelayLoadInfo rgpdli[1] = { &dli }; - +/* RaiseException( VcppException(ERROR_SEVERITY_ERROR, ERROR_INVALID_PARAMETER), 0, 1, PULONG_PTR(rgpdli) - ); + );*/ return 0; } @@ -352,14 +354,14 @@ extern "C" FARPROC WINAPI __delayLoadHelper2(PCImgDelayDescr pidd, FARPROC* ppfn if (hmod == 0) { PDelayLoadInfo rgpdli[1] = { &dli }; - +/* RaiseException( VcppException(ERROR_SEVERITY_ERROR, ERROR_MOD_NOT_FOUND), 0, 1, PULONG_PTR(rgpdli) ); - +*/ // If we get to here, we blindly assume that the handler of the exception // has magically fixed everything up and left the function pointer in // dli.pfnCur. @@ -424,14 +426,14 @@ extern "C" FARPROC WINAPI __delayLoadHelper2(PCImgDelayDescr pidd, FARPROC* ppfn } if (pfnRet == 0) { PDelayLoadInfo rgpdli[1] = { &dli }; - +/* RaiseException( VcppException(ERROR_SEVERITY_ERROR, ERROR_PROC_NOT_FOUND), 0, 1, PULONG_PTR(rgpdli) ); - +*/ // If we get to here, we blindly assume that the handler of the exception // has magically fixed everything up and left the function pointer in // dli.pfnCur.