mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
* 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
This commit is contained in:
parent
c7652dec6f
commit
cd476cd86b
4 changed files with 49 additions and 0 deletions
2
util.c
2
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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue