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);