[前][次][番号順一覧][スレッド一覧]

ruby-changes:32816

From: nobu <ko1@a...>
Date: Sun, 9 Feb 2014 08:56:16 +0900 (JST)
Subject: [ruby-changes:32816] nobu:r44895 (trunk): * configure.in (rb_cv_bsd_qsort_r): ensure 'qsort_r' is not BSD version.

nobu	2014-02-09 08:56:11 +0900 (Sun, 09 Feb 2014)

  New Revision: 44895

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=44895

  Log:
    * configure.in (rb_cv_bsd_qsort_r): ensure 'qsort_r' is not BSD version.

  Modified files:
    trunk/configure.in
Index: configure.in
===================================================================
--- configure.in	(revision 44894)
+++ configure.in	(revision 44895)
@@ -1984,7 +1984,7 @@ RUBY_CHECK_BUILTIN_FUNC(__builtin_types_ https://github.com/ruby/ruby/blob/trunk/configure.in#L1984
 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, s https://github.com/ruby/ruby/blob/trunk/configure.in#L1992
       [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.

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]