diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-02-08 23:56:11 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-02-08 23:56:11 +0000 |
commit | 5659a79453e601d66719ed4e88861136bae9a49c (patch) | |
tree | c30b7571d4351263b683c4542200b65ee920fae6 | |
parent | 846e046203f59c3852f3a3545f67c532f5678a91 (diff) | |
download | ruby-5659a79453e601d66719ed4e88861136bae9a49c.tar.gz |
* configure.in (rb_cv_bsd_qsort_r): ensure 'qsort_r' is not BSD version.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44895 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | configure.in | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/configure.in b/configure.in index 9f8b31f60f..678fe18e01 100644 --- a/configure.in +++ b/configure.in @@ -1984,7 +1984,7 @@ RUBY_CHECK_BUILTIN_FUNC(__builtin_types_compatible_p, [__builtin_types_compatibl if test "$ac_cv_func_qsort_r" != no; then AC_CACHE_CHECK(whether qsort_r is GNU version, rb_cv_gnu_qsort_r, [AC_TRY_COMPILE([ -#include <stdlib.h> +@%:@include <stdlib.h> void qsort_r(void *base, size_t nmemb, size_t size, int (*compar)(const void *, const void *, void *), void *arg); @@ -1992,9 +1992,19 @@ void qsort_r(void *base, size_t nmemb, size_t size, [rb_cv_gnu_qsort_r=yes], [rb_cv_gnu_qsort_r=no]) ]) - if test "$rb_cv_gnu_qsort_r" != no; then + AC_CACHE_CHECK(whether qsort_r is BSD version, rb_cv_bsd_qsort_r, + [AC_TRY_COMPILE([ +@%:@include <stdlib.h> +void qsort_r(void *base, size_t nmemb, size_t size, + void *arg, int (*compar)(void *, const void *, const void *)); +],[ ], + [rb_cv_bsd_qsort_r=yes], + [rb_cv_bsd_qsort_r=no]) + ]) + AS_CASE("$rb_cv_gnu_qsort_r:$rb_cv_bsd_qsort_r", + [yes:no], [ AC_DEFINE(HAVE_GNU_QSORT_R, 1) - fi + ]) fi # Some platform need -lrt for clock_gettime, but the other don't. |