Select BSD qsort_r argument order #10

Merged
fputs merged 1 commit from fputs/qsort-bsd into master 2026-11-05 09:33:06 -08:00 AGit
Owner

vec_sort now uses the thunk-first qsort_r wrapper and call on macOS, FreeBSD, and OpenBSD. Linux keeps the GNU comparator-first call.

The sort is not stable. The doc says the BSD path matches those platforms' headers and has not been executed in this tree's CI. This Linux build only ran the GNU path.

Tested with -DCMAKE_BUILD_TYPE=Debug -DFLINT_SANITIZE=ON -DCMAKE_C_EXTENSIONS=OFF. ctest --label-exclude slow: 25/25 passed.

`vec_sort` now uses the thunk-first `qsort_r` wrapper and call on macOS, FreeBSD, and OpenBSD. Linux keeps the GNU comparator-first call. The sort is not stable. The doc says the BSD path matches those platforms' headers and has not been executed in this tree's CI. This Linux build only ran the GNU path. Tested with `-DCMAKE_BUILD_TYPE=Debug -DFLINT_SANITIZE=ON -DCMAKE_C_EXTENSIONS=OFF`. `ctest --label-exclude slow`: 25/25 passed.
Select BSD qsort_r argument order
All checks were successful
test / test (pull_request) Successful in 14s
test / sanitize (pull_request) Successful in 14s
b3c51f8762
fputs merged commit d264cbfb62 into master 2026-11-05 09:33:06 -08:00
fputs referenced this pull request from a commit 2026-11-05 09:33:07 -08:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
fputs/libflint!10
No description provided.