Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <87a84620-df28-7e62-23e4-57e52bd068af@ludocode.com>
Date: Sat, 16 Apr 2022 04:13:56 -0400
From: Nicholas Fraser <nick@...ocode.com>
To: musl@...ts.openwall.com
Subject: Detect qsort_r() support with preprocessor

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

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.