Date: Mon, 3 Sep 2018 21:57:05 +0100 From: Balazs Kezes <rlblaster@...il.com> To: musl@...ts.openwall.com Subject: qsort_r or qsort_s in musl Hi! I can find a lot of discussions on the web around qsort_r and the pain that musl lacks it but I can't find any official word on this from musl devs. If there is one, could src/stdlib/qsort.c contain a pointer to it? Are there any plans having one of them in musl? I'd prefer qsort_r since that would provide greater compatibility with glibc. I even found patches for it: https://gist.github.com/izabera/e68927258ad2d29a1586bad276fabcab https://github.com/esmil/musl/commit/194f9cf93da8ae62491b7386edf481ea8565ae4e qsort_r differs between bsd/osx and glibc though: https://sourceware.org/ml/libc-alpha/2008-12/msg00003.html The argument for qsort_s is that it is in the C11 standard as an optional feature and has similar interface as glibc's qsort_r. To avoid choosing sides it could be even qsort_musl for all I care. I could then use preprocessor to choose the right version. I know there are many workarounds: global variables, thread local variables, copy pasting and changing qsort from musl in my own source tree, using glibc. None of them feel right. Any thoughts? Please CC me on the replies. Thank you, Balazs
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.