Add qsort_s(3). Apart from the constraints, it also makes it easier
to port software written for Linux variant of qsort_r(3).
Details
- Reviewers
kib arichardson delphij - Group Reviewers
manpages - Commits
- rS356909: Add qsort_s(3). Apart from the constraints, it also makes it easier
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 28729 Build 26744: arc lint + arc unit
Event Timeline
lib/libc/stdlib/qsort.3 | ||
---|---|---|
270 | May suggest some wordsmithing, for English readability?
(Assuming I interpreted the existing wording correctly; it's a little hard to follow, which is why I'm suggesting the re-wording.) | |
337 | If the glibc version of qsort_r() is using non-standard ordering, perhaps note that? i.e. and the non-standard GNU libc implementation of |
lib/libc/stdlib/Symbol.map | ||
---|---|---|
123 | Where should it go instead? |
Looks fine to me but someone else should give the final approval.
include/stdlib.h | ||
---|---|---|
327 | Unrelated to this patch, but all other types use _FOO_DECLARED. Would be nice if we could be consistent. | |
lib/libc/tests/stdlib/qsort_s_test.c | ||
77 | Should this check for == EINVAL instead of != 0? And the same for the other tests. |
lib/libc/tests/stdlib/qsort_s_test.c | ||
---|---|---|
77 | I don't think so - the standard doesn't seem to define the actual error to return? |
lib/libc/stdlib/Makefile.inc | ||
---|---|---|
13–14 | qsort_r.c is missing now. |
lib/libc/tests/stdlib/qsort_s_test.c | ||
---|---|---|
77 | True, I don't think we need to be testing the specific implementation here so we could theoretically reuse the test for other implementations. |
lib/libc/stdlib/Symbol.map | ||
---|---|---|
123 | I think looking at the other symbol.map files 1.6 is the version for 13? |
lib/libc/stdlib/Symbol.map | ||
---|---|---|
123 | Ah, now I get it. I only looked at this particular Symbol.map. |
Hmm, https://reviews.freebsd.org/D17083 proposes to change qsort_r() argument order to glibc's since that is likely to become POSIX standard and is slightly better than our order.