aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-09-09 07:49:04 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-09-09 07:49:04 +0000
commit1e228d4a3773ee032cf6530842a3c8c056facfb8 (patch)
treee50a9121b5d647750a3797c311f62eb4c3401123 /configure.ac
parent0c53fcc3c0543b6d084dacb2efcb72689685db4f (diff)
downloadruby-1e228d4a3773ee032cf6530842a3c8c056facfb8.tar.gz
util.c: qsort_s in C11
* configure.ac: macro for C11 to use qsort_s. * util.c (ruby_qsort): fix for C11 qsort_s. the comparison function for MSVCRT qsort_s is compatible with BSD qsort_r, but not with C11 qsort_s, in spite of its name. note that mingw defines __STDC_VERSION__ but uses qsort_s in MSVCRT, so the MSVCRT block needs to preced the C11 block. [ruby-core:88899] [Bug #15091] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64661 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac2
1 files changed, 1 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index b8ee572392..8e185a6e3c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1869,7 +1869,7 @@ AC_CHECK_FUNCS(utimes)
AC_CHECK_FUNCS(wait4)
AC_CHECK_FUNCS(waitpid)
-AS_IF([test "$ac_cv_func_memset_s" = yes],
+AS_CASE(["$ac_cv_func_memset_s:$ac_cvs_func_qsort_s"], [*yes*],
[RUBY_DEFINE_IF([!defined __STDC_WANT_LIB_EXT1__], [__STDC_WANT_LIB_EXT1__], 1)])
AS_IF([test "$ac_cv_func_getcwd" = yes], [