mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-04-20 14:03:26 +00:00
Fix compile warnings on Cygwin
This commit is contained in:
parent
a04480e311
commit
1c55d16080
@ -320,6 +320,12 @@ LJ_FUNCA int lj_err_unwind_win(EXCEPTION_RECORD *rec,
|
|||||||
#error "NYI: Windows arch-specific unwinder for JIT-compiled code"
|
#error "NYI: Windows arch-specific unwinder for JIT-compiled code"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(LJ_TARGET_CYGWIN) && defined(LJ_TARGET_X64)
|
||||||
|
#define RTL_DWORD64 DWORD64
|
||||||
|
#else
|
||||||
|
#define RTL_DWORD64 uintptr_t
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Windows unwinder for JIT-compiled code. */
|
/* Windows unwinder for JIT-compiled code. */
|
||||||
static void err_unwind_win_jit(global_State *g, int errcode)
|
static void err_unwind_win_jit(global_State *g, int errcode)
|
||||||
{
|
{
|
||||||
@ -329,7 +335,8 @@ static void err_unwind_win_jit(global_State *g, int errcode)
|
|||||||
memset(&hist, 0, sizeof(hist));
|
memset(&hist, 0, sizeof(hist));
|
||||||
RtlCaptureContext(&ctx);
|
RtlCaptureContext(&ctx);
|
||||||
while (1) {
|
while (1) {
|
||||||
uintptr_t frame, base, addr = ctx.CONTEXT_REG_PC;
|
RTL_DWORD64 frame, base;
|
||||||
|
uintptr_t addr = ctx.CONTEXT_REG_PC;
|
||||||
void *hdata;
|
void *hdata;
|
||||||
PRUNTIME_FUNCTION func = RtlLookupFunctionEntry(addr, &base, &hist);
|
PRUNTIME_FUNCTION func = RtlLookupFunctionEntry(addr, &base, &hist);
|
||||||
if (!func) { /* Found frame without .pdata: must be JIT-compiled code. */
|
if (!func) { /* Found frame without .pdata: must be JIT-compiled code. */
|
||||||
|
Loading…
Reference in New Issue
Block a user