From 48f2d3a72d3cd92eea720a632ad71883779df708 Mon Sep 17 00:00:00 2001 From: akr Date: Thu, 9 Jun 2005 09:34:31 +0000 Subject: [PATCH] * 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 --- ChangeLog | 4 ++++ configure.in | 5 +++-- eval.c | 6 +++--- gc.c | 6 +++--- 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1cbd1eca8d..49444c3021 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Thu Jun 9 18:24:16 2005 Tanaka Akira + + * configure.in, eval.c, gc.c: use libunwind only on HP-UX. + Wed Jun 8 12:25:59 2005 Yukihiro Matsumoto * array.c (rb_ary_nitems): add the block feature to Array#nitems. diff --git a/configure.in b/configure.in index 4c51c0dfc8..00e4eb0f1d 100644 --- a/configure.in +++ b/configure.in @@ -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, diff --git a/eval.c b/eval.c index 1bdb582017..348b2e27c2 100644 --- a/eval.c +++ b/eval.c @@ -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 #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); diff --git a/gc.c b/gc.c index 391412f806..c33be1616d 100644 --- a/gc.c +++ b/gc.c @@ -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 #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);