1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* configure.in, eval.c, gc.c: use libunwind only on HP-UX.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8598 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2005-06-09 09:34:31 +00:00
parent e1885a0079
commit 48f2d3a72d
4 changed files with 13 additions and 8 deletions

View file

@ -1,3 +1,7 @@
Thu Jun 9 18:24:16 2005 Tanaka Akira <akr@m17n.org>
* configure.in, eval.c, gc.c: use libunwind only on HP-UX.
Wed Jun 8 12:25:59 2005 Yukihiro Matsumoto <matz@ruby-lang.org>
* array.c (rb_ary_nitems): add the block feature to Array#nitems.

View file

@ -492,7 +492,8 @@ AC_CHECK_FUNCS(fmod killpg wait4 waitpid fork spawnv syscall chroot fsync getcwd
getpriority getrlimit setrlimit\
dlopen sigprocmask sigaction _setjmp\
setsid telldir seekdir fchmod mktime timegm cosh sinh tanh\
setuid setgid daemon)
setuid setgid daemon \
_UNW_createContextForSelf)
AC_ARG_ENABLE(setreuid,
[ --enable-setreuid use setreuid()/setregid() according to need even if obsolete.],
[use_setreuid=$enableval])
@ -597,7 +598,7 @@ AC_C_INLINE
AC_C_VOLATILE
if test x"$target_cpu" = xia64; then
if test x"$ac_cv_header_unwind_h" = xyes; then
if test x"$ac_cv_header_unwind_h" = xyes -a x"$ac_cv_func__UNW_createContextForSelf" = xyes; then
LIBS="-lunwind $LIBS"
else
AC_CACHE_CHECK(IA64 backing store member in mcontext_t, rb_cv_ia64_bspstore,

6
eval.c
View file

@ -9684,7 +9684,7 @@ Init_Binding()
*/
#define __libc_ia64_register_backing_store_base (4ULL<<61)
#else
#ifdef HAVE_UNWIND_H
#if defined(HAVE_UNWIND_H) && defined(HAVE__UNW_CREATECONTEXTFORSELF)
#include <unwind.h>
#else
#pragma weak __libc_ia64_register_backing_store_base
@ -10271,7 +10271,7 @@ rb_thread_save_context(th)
#ifdef __ia64__
{
VALUE *top, *bot;
#ifdef HAVE_UNWIND_H
#if defined(HAVE_UNWIND_H) && defined(HAVE__UNW_CREATECONTEXTFORSELF)
_Unwind_Context *unwctx = _UNW_createContextForSelf();
_UNW_currentContext(unwctx);
@ -10431,7 +10431,7 @@ rb_thread_restore_context(th, exit)
#ifdef __ia64__
{
VALUE *base;
#ifdef HAVE_UNWIND_H
#if defined(HAVE_UNWIND_H) && defined(HAVE__UNW_CREATECONTEXTFORSELF)
_Unwind_Context *unwctx = _UNW_createContextForSelf();
_UNW_currentContext(unwctx);

6
gc.c
View file

@ -39,7 +39,7 @@
*/
#define __libc_ia64_register_backing_store_base (4ULL<<61)
#else
#ifdef HAVE_UNWIND_H
#if defined(HAVE_UNWIND_H) && defined(HAVE__UNW_CREATECONTEXTFORSELF)
#include <unwind.h>
#else
#pragma weak __libc_ia64_register_backing_store_base
@ -1347,14 +1347,14 @@ garbage_collect()
{
ucontext_t ctx;
VALUE *top, *bot;
#ifdef HAVE_UNWIND_H
#if defined(HAVE_UNWIND_H) && defined(HAVE__UNW_CREATECONTEXTFORSELF)
_Unwind_Context *unwctx = _UNW_createContextForSelf();
#endif
getcontext(&ctx);
mark_locations_array((VALUE*)&ctx.uc_mcontext,
((size_t)(sizeof(VALUE)-1 + sizeof ctx.uc_mcontext)/sizeof(VALUE)));
#ifdef HAVE_UNWIND_H
#if defined(HAVE_UNWIND_H) && defined(HAVE__UNW_CREATECONTEXTFORSELF)
_UNW_currentContext(unwctx);
bot = (VALUE*)(long)_UNW_getAR(unwctx, _UNW_AR_BSP);
top = (VALUE*)(long)_UNW_getAR(unwctx, _UNW_AR_BSPSTORE);