Skip to content

Conversation

brad0
Copy link
Contributor

@brad0 brad0 commented Aug 25, 2025

qsort_r() is now part of POSIX.1-2024.

Enable qsort_r() on Android API level 36 AKA Android 16, Hurd (glibc),
Haiku, modern FreeBSD 14 versions or newer and modern NetBSD -current
or 11 and newer.

@meta-cla meta-cla bot added the CLA Signed label Aug 25, 2025
@brad0 brad0 force-pushed the qsort_r_os branch 4 times, most recently from 08ca420 to ded1780 Compare August 25, 2025 04:01
qsort_r() is now part of POSIX.1-2024.

Enable qsort_r() on Android API level 36 AKA Android 16, Hurd (glibc),
Haiku, modern FreeBSD 14 versions or newer and modern NetBSD -current
or 11 and newer.
@brad0 brad0 changed the title Enable qosrt_r() on more OS's Enable qsort_r() on more OS's Aug 25, 2025
@Cyan4973
Copy link
Contributor

qsort_r() is now part of POSIX.1-2024.

That's great news !

The updated detection method relies on specific OS versioning logic.
It works fine for the intended systems,
but it feels like, in the best of cases, it should be able to be more generic by employing posix macro variables,
thus making it compatible with a bunch of present and future posix OSes,
as opposed to special casing them one by one.

I would expect variables like _POSIX_VERSION and _POSIX_C_SOURCE to be used for this detection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants