From 7788d102c9fe6f58ec9413009374ffeb6b58c84f Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 17 May 2012 14:04:02 +0000 Subject: [PATCH] fix NaCl support * configure.in: fix function name to be checked, to initialize rb_thread_cond_t properly. * thread_pthread.c (native_cond_initialize, native_cond_destroy): fix macro name. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35676 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 8 ++++++++ configure.in | 2 +- thread_pthread.c | 4 ++-- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0d8ebb1092..f1959af3cc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Thu May 17 23:03:58 2012 Nobuyoshi Nakada + + * configure.in: fix function name to be checked, to initialize + rb_thread_cond_t properly. + + * thread_pthread.c (native_cond_initialize, native_cond_destroy): + fix macro name. + Thu May 17 12:53:07 2012 Yuki Yugui Sonoda * thread.c, thread_pthread.c: Moved pthread-specific preprocessor diff --git a/configure.in b/configure.in index 24e650ba8d..3e157cacda 100644 --- a/configure.in +++ b/configure.in @@ -2005,7 +2005,7 @@ if test x"$enable_pthread" = xyes; then pthread_getattr_np pthread_attr_get_np pthread_attr_getstack\ pthread_get_stackaddr_np pthread_get_stacksize_np \ thr_stksegment pthread_stackseg_np pthread_getthrds_np \ - pthread_cond_initialize pthread_condattr_setclock pthread_condattr_init \ + pthread_cond_init pthread_condattr_setclock pthread_condattr_init \ pthread_sigmask) fi if test x"$ac_cv_header_ucontext_h" = xyes; then diff --git a/thread_pthread.c b/thread_pthread.c index 05a6af2a45..89b05e59da 100644 --- a/thread_pthread.c +++ b/thread_pthread.c @@ -245,7 +245,7 @@ int pthread_condattr_init(pthread_condattr_t *attr); static void native_cond_initialize(rb_thread_cond_t *cond, int flags) { -#ifdef HAVE_PTHREAD_COND_INITIALIZE +#ifdef HAVE_PTHREAD_COND_INIT int r; pthread_condattr_t attr; @@ -273,7 +273,7 @@ native_cond_initialize(rb_thread_cond_t *cond, int flags) static void native_cond_destroy(rb_thread_cond_t *cond) { -#ifdef HAVE_PTHREAD_COND_INITIALIZE +#ifdef HAVE_PTHREAD_COND_INIT int r = pthread_cond_destroy(&cond->cond); if (r != 0) { rb_bug_errno("pthread_cond_destroy", r);