diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-09-15 20:05:12 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-09-15 20:05:12 +0000 |
commit | b9aa9711dfb5e7fd4cb1d8122b1a6fd1d4e7955b (patch) | |
tree | 4ab4b51d1a00acd308c69615552d50900c24608e | |
parent | c823659514e64f93dc20991f73ee8acdcd3777eb (diff) | |
download | ruby-b9aa9711dfb5e7fd4cb1d8122b1a6fd1d4e7955b.tar.gz |
* configure.in (rb_cv_thread_specific): check if no warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/mvm@19372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | configure.in | 7 |
2 files changed, 9 insertions, 2 deletions
@@ -1,3 +1,7 @@ +Tue Sep 16 05:04:56 2008 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * configure.in (rb_cv_thread_specific): check if no warnings. + Tue Sep 9 01:52:28 2008 Nobuyoshi Nakada <nobu@ruby-lang.org> * io.c (Init_IO): max_file_descriptor_lock is per-process resource. diff --git a/configure.in b/configure.in index 9db466ea40..b589e51ccc 100644 --- a/configure.in +++ b/configure.in @@ -1191,6 +1191,7 @@ if test x"$ac_cv_header_ucontext_h" = xyes; then fi AC_CACHE_CHECK([for thread specific data], rb_cv_thread_specific, [rb_cv_thread_specific=no +test "$GCC" = yes && saved_cflags="$CFLAGS" CFLAGS="$CFLAGS -Werror" for th in "__declspec(thread)" __thread; do AC_TRY_COMPILE(AC_INCLUDES_DEFAULT[ @%:@ifdef HAVE_PTHREAD_H @@ -1199,8 +1200,10 @@ for th in "__declspec(thread)" __thread; do extern $th int foo_th_extern; static $th int foo_th_static;], [if (foo_th_extern) return foo_th_static;], [rb_cv_thread_specific="$th"; break]) -done]) -test "$rb_cv_thread_specific" = "" || AC_DEFINE_UNQUOTED(THREAD_SPECIFIC, $rb_cv_thread_specific) +done +test "$GCC" = yes && CFLAGS="$saved_cflags" +]) +test "$rb_cv_thread_specific" = "no" || AC_DEFINE_UNQUOTED(THREAD_SPECIFIC, $rb_cv_thread_specific) if test "$ac_cv_func_fork" = "yes" -a "$rb_with_pthread" = "yes"; then AC_CACHE_CHECK([if fork works with pthread], rb_cv_fork_with_pthread, |