mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* configure.in: check if getcontext and setcontext are available.
* eval.c: use presence of getcontext/setcontext. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5305 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
88947c09c4
commit
ab0c37d0cf
3 changed files with 38 additions and 41 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
Fri Dec 26 18:33:54 2003 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* configure.in: check if getcontext and setcontext are available.
|
||||||
|
|
||||||
|
* eval.c: use presence of getcontext/setcontext.
|
||||||
|
|
||||||
Fri Dec 26 16:40:53 2003 Tanaka Akira <akr@m17n.org>
|
Fri Dec 26 16:40:53 2003 Tanaka Akira <akr@m17n.org>
|
||||||
|
|
||||||
* lib/pathname.rb (PathnameTest#test_plus): add 2 assertions.
|
* lib/pathname.rb (PathnameTest#test_plus): add 2 assertions.
|
||||||
|
|
47
configure.in
47
configure.in
|
@ -685,47 +685,38 @@ int main()
|
||||||
AC_DEFINE_UNQUOTED(STACK_GROW_DIRECTION, $rb_cv_stack_grow_dir)
|
AC_DEFINE_UNQUOTED(STACK_GROW_DIRECTION, $rb_cv_stack_grow_dir)
|
||||||
|
|
||||||
if test "$enable_pthread" = "yes"; then
|
if test "$enable_pthread" = "yes"; then
|
||||||
AC_CHECK_LIB(pthread, pthread_kill,
|
for pthread_lib in pthread pthreads c c_r; do
|
||||||
|
AC_CHECK_LIB($pthread_lib, pthread_kill,
|
||||||
rb_with_pthread=yes, rb_with_pthread=no)
|
rb_with_pthread=yes, rb_with_pthread=no)
|
||||||
if test "$rb_with_pthread" = "yes"; then
|
if test "$rb_with_pthread" = "yes"; then break; fi
|
||||||
LIBS="-lpthread $LIBS"
|
done
|
||||||
AC_DEFINE(_REENTRANT)
|
if test $rb_with_pthread = yes; then
|
||||||
AC_DEFINE(_THREAD_SAFE)
|
|
||||||
AC_DEFINE(HAVE_LIBPTHREAD)
|
|
||||||
else
|
|
||||||
AC_CHECK_LIB(pthreads, pthread_kill,
|
|
||||||
rb_with_pthread=yes, rb_with_pthread=no)
|
|
||||||
if test "$rb_with_pthread" = "yes"; then
|
|
||||||
LIBS="-lpthreads $LIBS"
|
|
||||||
AC_DEFINE(_REENTRANT)
|
|
||||||
AC_DEFINE(_THREAD_SAFE)
|
|
||||||
AC_DEFINE(HAVE_LIBPTHREAD)
|
|
||||||
else
|
|
||||||
AC_CHECK_LIB(c, pthread_kill,
|
|
||||||
rb_with_pthread=yes, rb_with_pthread=no)
|
|
||||||
if test "$rb_with_pthread" = "yes"; then
|
|
||||||
AC_DEFINE(_REENTRANT)
|
|
||||||
AC_DEFINE(_THREAD_SAFE)
|
|
||||||
AC_DEFINE(HAVE_LIBPTHREAD)
|
|
||||||
else
|
|
||||||
AC_CHECK_LIB(c_r, pthread_kill,
|
|
||||||
rb_with_pthread=yes, rb_with_pthread=no)
|
|
||||||
if test "$rb_with_pthread" = "yes"; then
|
|
||||||
AC_DEFINE(_REENTRANT)
|
AC_DEFINE(_REENTRANT)
|
||||||
AC_DEFINE(_THREAD_SAFE)
|
AC_DEFINE(_THREAD_SAFE)
|
||||||
AC_DEFINE(HAVE_LIBPTHREAD)
|
AC_DEFINE(HAVE_LIBPTHREAD)
|
||||||
|
case $pthread_lib in
|
||||||
|
c)
|
||||||
|
;;
|
||||||
|
c_r)
|
||||||
MAINLIBS="-pthread $MAINLIBS"
|
MAINLIBS="-pthread $MAINLIBS"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
LIBS="-l$pthread_lib $LIBS"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
else
|
else
|
||||||
AC_MSG_WARN("Don't know how to find pthread library on your system -- thread support disabled")
|
AC_MSG_WARN("Don't know how to find pthread library on your system -- thread support disabled")
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
AC_CHECK_FUNC(nanosleep)
|
AC_CHECK_FUNC(nanosleep)
|
||||||
if test "$ac_cv_func_nanosleep" = "no"; then
|
if test "$ac_cv_func_nanosleep" = "no"; then
|
||||||
AC_CHECK_LIB(rt, nanosleep, AC_DEFINE(HAVE_NANOSLEEP))
|
AC_CHECK_LIB(rt, nanosleep, AC_DEFINE(HAVE_NANOSLEEP))
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
if test $ac_cv_header_ucontext_h = yes; then
|
||||||
|
if test $target_cpu = ia64 -o $rb_with_pthread = yes; then
|
||||||
|
AC_CHECK_FUNCS(getcontext setcontext)
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
dnl default value for $KANJI
|
dnl default value for $KANJI
|
||||||
DEFAULT_KCODE="KCODE_NONE"
|
DEFAULT_KCODE="KCODE_NONE"
|
||||||
|
|
2
eval.c
2
eval.c
|
@ -29,7 +29,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#if defined(HAVE_UCONTEXT_H) && (defined(__ia64__) || defined(HAVE_NATIVETHREAD)) && !defined(__stub_getcontext)
|
#if defined(HAVE_GETCONTEXT) && defined(HAVE_SETCONTEXT)
|
||||||
#include <ucontext.h>
|
#include <ucontext.h>
|
||||||
#define USE_CONTEXT
|
#define USE_CONTEXT
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue