diff options
author | Edward Tomasz Napierala <trasz@FreeBSD.org> | 2020-01-20 11:40:07 +0000 |
---|---|---|
committer | Edward Tomasz Napierala <trasz@FreeBSD.org> | 2020-01-20 11:40:07 +0000 |
commit | 0d2fabfc0439acfdb5d369feb2961e1b91faa39e (patch) | |
tree | 30cf2bc47c8bad01a1ca5c2101606756ae5e8110 /include | |
parent | f3f43ab1f0eadf3d298319ecb2e818dfcfd36eff (diff) | |
download | src-test2-0d2fabfc0439acfdb5d369feb2961e1b91faa39e.tar.gz src-test2-0d2fabfc0439acfdb5d369feb2961e1b91faa39e.zip |
Add qsort_s(3). Apart from the constraints, it also makes it easier
to port software written for Linux variant of qsort_r(3).
Reviewed by: kib, arichardson
MFC after: 2 weeks
Relnotes: yes
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D23174
Notes
Notes:
svn path=/head/; revision=356909
Diffstat (limited to 'include')
-rw-r--r-- | include/stdlib.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/stdlib.h b/include/stdlib.h index f9388037410c..6adab32743d5 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -324,6 +324,11 @@ extern char *suboptarg; /* getsubopt(3) external variable */ #if __EXT1_VISIBLE +#ifndef _RSIZE_T_DEFINED +#define _RSIZE_T_DEFINED +typedef size_t rsize_t; +#endif + #ifndef _ERRNO_T_DEFINED #define _ERRNO_T_DEFINED typedef int errno_t; @@ -339,6 +344,9 @@ _Noreturn void abort_handler_s(const char * __restrict, void * __restrict, errno_t); /* K3.6.1.3 */ void ignore_handler_s(const char * __restrict, void * __restrict, errno_t); +/* K.3.6.3.2 */ +errno_t qsort_s(void *, rsize_t, rsize_t, + int (*)(const void *, const void *, void *), void *); #endif /* __EXT1_VISIBLE */ __END_DECLS |