mailing list of musl libc
 help / color / mirror / code / Atom feed
* [musl] Detect qsort_r() support with preprocessor
@ 2022-04-16  8:13 Nicholas Fraser
  2022-04-16 12:01 ` Markus Wichmann
  0 siblings, 1 reply; 11+ messages in thread
From: Nicholas Fraser @ 2022-04-16  8:13 UTC (permalink / raw)
  To: musl

Hello musl devs,

qsort_r() has been added to musl 1.2.3 and it has been backported to the previous version of musl in Alpine. How can I detect whether this function is available using the preprocessor?

The community wiki advocates "testing" for feature support, which I guess means compiling a test program like an autotools configure script. Can we not just test for a macro instead? Have you considered defining something like `__HAS_QSORT_R` to tell us directly that you support it?

I am writing a cross-platform header-only library. I want my users to be able to just drop the header files of my library into their codebase. I really don't want them to have to write their own configure tests just to tell my library whether musl provides qsort_r(). I am able to detect variants of qsort_r() or qsort_s() with the preprocessor on all other platforms that support such an extension. Is there a way to detect it with musl?

Nick


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2022-04-19 23:10 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-16  8:13 [musl] Detect qsort_r() support with preprocessor Nicholas Fraser
2022-04-16 12:01 ` Markus Wichmann
2022-04-16 14:16   ` Quentin Rameau
2022-04-16 17:50     ` Nicholas Fraser
2022-04-16 18:42       ` Quentin Rameau
2022-04-16 23:59         ` Nicholas Fraser
2022-04-17  2:04       ` Rich Felker
2022-04-19  3:38         ` Nicholas Fraser
2022-04-19  6:59           ` Markus Wichmann
2022-04-19 23:10             ` Nicholas Fraser
2022-04-19 13:32           ` Rich Felker

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).