summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorglass <glass@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-02-08 12:50:28 (GMT)
committerglass <glass@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-02-08 12:50:28 (GMT)
commitcd476cd86be581cca4ca56ad1277228ea1dc24ee (patch)
tree5deff144b9c8229910e8ebbe309b326bfe405eff /util.c
parentc7652dec6f9c8cbbbe2953a1c435c12a484773f0 (diff)
* configure.in: check qsort_r(3) and whether it is GNU version.
BSD version has different prototype. * util.h: use qsort_r() as ruby_qsort() if it is GNU version. * util.c: define ruby_qsort() if needed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44889 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'util.c')
-rw-r--r--util.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/util.c b/util.c
index b0f9030..b999aff 100644
--- a/util.c
+++ b/util.c
@@ -186,6 +186,7 @@ ruby_strtoul(const char *str, char **endptr, int base)
#endif
+#ifndef HAVE_GNU_QSORT_R
/* mm.c */
#define mmtype long
@@ -452,6 +453,7 @@ ruby_qsort(void* base, const size_t nel, const size_t size, cmpfunc_t *cmp, void
else goto nxt; /* need not to sort both sides */
}
}
+#endif /* HAVE_GNU_QSORT_R */
char *
ruby_strdup(const char *str)