* 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
Родитель e1885a0079
Коммит 48f2d3a72d
4 изменённых файлов: 13 добавлений и 8 удалений

Просмотреть файл

@ -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> 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. * array.c (rb_ary_nitems): add the block feature to Array#nitems.

Просмотреть файл

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

6
eval.c
Просмотреть файл

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

6
gc.c
Просмотреть файл

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