aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Pall <mike>2011-08-14 11:35:53 +0200
committerMike Pall <mike>2011-08-14 11:35:53 +0200
commit4a42933b1734b7ed07af748012f6a151373b145f (patch)
tree7e2da8cfe876abcce328abb0a8718c52f3663b95
parent10ffd05ba9c78c6b4869f827076a6c9073d2dcee (diff)
downloadluajit-4a42933b1734b7ed07af748012f6a151373b145f.tar.gz
luajit-4a42933b1734b7ed07af748012f6a151373b145f.tar.bz2
luajit-4a42933b1734b7ed07af748012f6a151373b145f.zip
Replace some _Unwind_* types. Fixes build issues on OSX 10.7.
-rw-r--r--src/lj_err.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lj_err.c b/src/lj_err.c
index 35dfeabb..63c5a22d 100644
--- a/src/lj_err.c
+++ b/src/lj_err.c
@@ -191,13 +191,13 @@ static void *err_unwind(lua_State *L, void *stopcf, int errcode)
191#if !LJ_TARGET_ARM 191#if !LJ_TARGET_ARM
192 192
193#define LJ_UEXCLASS 0x4c55414a49543200ULL /* LUAJIT2\0 */ 193#define LJ_UEXCLASS 0x4c55414a49543200ULL /* LUAJIT2\0 */
194#define LJ_UEXCLASS_MAKE(c) (LJ_UEXCLASS | (_Unwind_Exception_Class)(c)) 194#define LJ_UEXCLASS_MAKE(c) (LJ_UEXCLASS | (uint64_t)(c))
195#define LJ_UEXCLASS_CHECK(cl) (((cl) ^ LJ_UEXCLASS) <= 0xff) 195#define LJ_UEXCLASS_CHECK(cl) (((cl) ^ LJ_UEXCLASS) <= 0xff)
196#define LJ_UEXCLASS_ERRCODE(cl) ((int)((cl) & 0xff)) 196#define LJ_UEXCLASS_ERRCODE(cl) ((int)((cl) & 0xff))
197 197
198/* DWARF2 personality handler referenced from interpreter .eh_frame. */ 198/* DWARF2 personality handler referenced from interpreter .eh_frame. */
199LJ_FUNCA int lj_err_unwind_dwarf(int version, _Unwind_Action actions, 199LJ_FUNCA int lj_err_unwind_dwarf(int version, _Unwind_Action actions,
200 _Unwind_Exception_Class uexclass, struct _Unwind_Exception *uex, 200 uint64_t uexclass, struct _Unwind_Exception *uex,
201 struct _Unwind_Context *ctx) 201 struct _Unwind_Context *ctx)
202{ 202{
203 void *cf; 203 void *cf;
@@ -232,9 +232,9 @@ LJ_FUNCA int lj_err_unwind_dwarf(int version, _Unwind_Action actions,
232 return _URC_CONTINUE_UNWIND; 232 return _URC_CONTINUE_UNWIND;
233 } else if (cf) { 233 } else if (cf) {
234 _Unwind_SetGR(ctx, LJ_TARGET_EHRETREG, errcode); 234 _Unwind_SetGR(ctx, LJ_TARGET_EHRETREG, errcode);
235 _Unwind_SetIP(ctx, (_Unwind_Ptr)(cframe_unwind_ff(cf) ? 235 _Unwind_SetIP(ctx, (uintptr_t)(cframe_unwind_ff(cf) ?
236 lj_vm_unwind_ff_eh : 236 lj_vm_unwind_ff_eh :
237 lj_vm_unwind_c_eh)); 237 lj_vm_unwind_c_eh));
238 return _URC_INSTALL_CONTEXT; 238 return _URC_INSTALL_CONTEXT;
239 } 239 }
240#if LJ_TARGET_X86ORX64 240#if LJ_TARGET_X86ORX64
@@ -243,7 +243,7 @@ LJ_FUNCA int lj_err_unwind_dwarf(int version, _Unwind_Action actions,
243 ** Real fix: http://gcc.gnu.org/viewcvs/trunk/gcc/unwind-dw2.c?r1=121165&r2=124837&pathrev=153877&diff_format=h 243 ** Real fix: http://gcc.gnu.org/viewcvs/trunk/gcc/unwind-dw2.c?r1=121165&r2=124837&pathrev=153877&diff_format=h
244 */ 244 */
245 _Unwind_SetGR(ctx, LJ_TARGET_EHRETREG, errcode); 245 _Unwind_SetGR(ctx, LJ_TARGET_EHRETREG, errcode);
246 _Unwind_SetIP(ctx, (_Unwind_Ptr)lj_vm_unwind_rethrow); 246 _Unwind_SetIP(ctx, (uintptr_t)lj_vm_unwind_rethrow);
247 return _URC_INSTALL_CONTEXT; 247 return _URC_INSTALL_CONTEXT;
248 } 248 }
249#endif 249#endif