summaryrefslogtreecommitdiff
path: root/src/lj_err.c
diff options
context:
space:
mode:
authorMike Pall <mike>2015-09-20 19:17:02 +0200
committerMike Pall <mike>2015-09-20 19:17:02 +0200
commit076d625dc6046c5f05d55a95d3b9afd5637d5a5a (patch)
tree28ae5557c7c0a435e8d65585f1c40955f5d57b96 /src/lj_err.c
parent8715ae65c1f70f2402b89a004b88ab04ca103625 (diff)
downloadluajit-076d625dc6046c5f05d55a95d3b9afd5637d5a5a.tar.gz
luajit-076d625dc6046c5f05d55a95d3b9afd5637d5a5a.tar.bz2
luajit-076d625dc6046c5f05d55a95d3b9afd5637d5a5a.zip
Fix Cygwin support. Note: this is not a supported target.
Contributed by Yaakov Selkowitz.
Diffstat (limited to 'src/lj_err.c')
-rw-r--r--src/lj_err.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lj_err.c b/src/lj_err.c
index 11b07b56..6d8519bb 100644
--- a/src/lj_err.c
+++ b/src/lj_err.c
@@ -186,7 +186,7 @@ static void *err_unwind(lua_State *L, void *stopcf, int errcode)
186 186
187/* -- External frame unwinding -------------------------------------------- */ 187/* -- External frame unwinding -------------------------------------------- */
188 188
189#if defined(__GNUC__) && !LJ_NO_UNWIND && !LJ_TARGET_WINDOWS 189#if defined(__GNUC__) && !LJ_NO_UNWIND && !LJ_ABI_WIN
190 190
191/* 191/*
192** We have to use our own definitions instead of the mandatory (!) unwind.h, 192** We have to use our own definitions instead of the mandatory (!) unwind.h,
@@ -352,7 +352,7 @@ LJ_FUNCA int lj_err_unwind_arm(int state, void *ucb, _Unwind_Context *ctx)
352 352
353#endif 353#endif
354 354
355#elif LJ_TARGET_X64 && LJ_TARGET_WINDOWS 355#elif LJ_TARGET_X64 && LJ_ABI_WIN
356 356
357/* 357/*
358** Someone in Redmond owes me several days of my life. A lot of this is 358** Someone in Redmond owes me several days of my life. A lot of this is
@@ -417,7 +417,9 @@ LJ_FUNCA EXCEPTION_DISPOSITION lj_err_unwind_win64(EXCEPTION_RECORD *rec,
417 if (cf2) { /* We catch it, so start unwinding the upper frames. */ 417 if (cf2) { /* We catch it, so start unwinding the upper frames. */
418 if (rec->ExceptionCode == LJ_MSVC_EXCODE || 418 if (rec->ExceptionCode == LJ_MSVC_EXCODE ||
419 rec->ExceptionCode == LJ_GCC_EXCODE) { 419 rec->ExceptionCode == LJ_GCC_EXCODE) {
420#if LJ_TARGET_WINDOWS
420 __DestructExceptionObject(rec, 1); 421 __DestructExceptionObject(rec, 1);
422#endif
421 setstrV(L, L->top++, lj_err_str(L, LJ_ERR_ERRCPP)); 423 setstrV(L, L->top++, lj_err_str(L, LJ_ERR_ERRCPP));
422 } else if (!LJ_EXCODE_CHECK(rec->ExceptionCode)) { 424 } else if (!LJ_EXCODE_CHECK(rec->ExceptionCode)) {
423 /* Don't catch access violations etc. */ 425 /* Don't catch access violations etc. */