Author: fijal
Branch:
Changeset: r82878:455ba7f390b8
Date: 2016-03-08 12:36 +0200
http://bitbucket.org/pypy/pypy/changeset/455ba7f390b8/
Log: an attempt to fix OS X 32bit
diff --git a/rpython/rlib/rvmprof/src/vmprof_getpc.h
b/rpython/rlib/rvmprof/src/vmprof_getpc.h
--- a/rpython/rlib/rvmprof/src/vmprof_getpc.h
+++ b/rpython/rlib/rvmprof/src/vmprof_getpc.h
@@ -54,6 +54,7 @@
// It will cause problems for FreeBSD though!, because it turns off
// the needed __BSD_VISIBLE.
#ifdef __APPLE__
+#include <limits.h>
#define _XOPEN_SOURCE 500
#endif
@@ -144,7 +145,11 @@
#else
intptr_t GetPC(ucontext_t *signal_ucontext) {
#ifdef __APPLE__
+#if ((ULONG_MAX) == (UINT_MAX))
+ return (signal_ucontext->uc_mcontext->__ss.__eip);
+#else
return (signal_ucontext->uc_mcontext->__ss.__rip);
+#endif
#else
return signal_ucontext->PC_FROM_UCONTEXT; // defined in config.h
#endif
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit